Error 403, Access Denied - php

How can i fix this? i just hosted my site at byethost33.com for free, because this is my project and in need to host it.
I am getting problems with a page that says 403 access denied. how will i fix it? i dont have the error log since this is just free hosting. I don't know what to do because this is my first time hosting awebsite, i fixed database connections and stuff. but still it says 403 access denied.
and i have other problems, when logging in it wont load the page, just the header, because in my index.php i have a condition that would only change the header if logged in but will store the session. how can i fix this? thank you

Just try to examine your code for resolving URLs, since you may direct some visits to wrong places.

Related

Forbidden access but working with a refresh

I'm trying to access a streaming page but I get the error "Forbidden. You do not have permission to access this document."
However I can skip this message with F5/refresh and watch the video.
Is there any way to open this URL and do a refresh automatically? (using PHP)
I've tried something like this but it does not seem to work
header("Refresh:0; url=http://www.url.com");
Thank you in advance.
The forbidden access message is most likely coming from your web server configuration (apache?). The browser will stop there, and no document will be loaded from your server.
Since PHP is only interpreted after that, it will actually not get interpreted at all... you have no way to override this behavior in PHP alone, you need to fix your configuration on the server.
If you have a behavior that shows a 403 once every two load, chances are you have either a load balancer type of setup (loading one server or the other), or something that alternate between two configuration (for example issues in your domain name configuration, like the ServerName configuration).
In that case, if you add a header("Refresh:0; url=http://www.url.com"); in your page, you will only get this worse, since the successful load will reload, and then get back to the forbidden message (403).
check your web server config and logs to find the issue.
It's more likely the page is using HTTP REFERER restriction from it's own domain.
If you accessing the page by code, just added the referer condition on it.
In php you can use curl and add this line
curl_setopt($ch, CURLOPT_REFERER, 'domain_url');

Drupal access denied error while try to login

I am trying to access my website administrator in drupal but it is showing me access denied error. Here is my website URL http://www.virginiamoca.org/
I tried to login via
http://www.virginiamoca.org/admin and http://www.virginiamoca.org/administrator
Try this:
1) Find base_url in settings.php file
2) it will better to configure your site in virtual host in php configuration
As per my experience on Drupal 7, http://www.virginiamoca.org/admin will give you access denied by default as you are not logged in, So instead try to hit http://www.virginiamoca.org/user/login. This page will give you login form, But you website have some issue to render this page might be some code issue. Have a look at DBlog or apache error log, you will get some help from there

How to remove Access denied and empty server response error?

I am getting access denied and empty server response error when I open the menu or any Page of my website. This is short time error that gone with refresh or page reload.
I changed the permissions of my file to 755 but still the error exists
Because of this I am loosing my customers.
Please help me to fix my problem.
My website http://rainingdeal.com

Unable to access the admin section of my Wordpress site

This is the URL of the site I am referring to: http://www.nagorik.org/
The site seems to be working fine.
However, when I am trying to access the admin site through http://www.nagorik.org/wp-login.php, I get the following message in Firefox:
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
This problem can sometimes be caused by disabling or refusing to accept cookies.
Any idea why this might be happening?
Some notes:
I checked the error log file; nothing new in it.
I have nagorik.org redirecting to www.nagorik.org
Firefox has detected that the server is redirecting the request for
this address in a way that will never complete. This problem can
sometimes be caused by disabling or refusing to accept cookies.
Let's try to check the cookie settings to see if it helps.
https://support.mozilla.org/en-US/kb/enable-and-disable-cookies-website-preferences
One issue I see is you're missing a ton of Wordpress files in /wp-admin/. You might want to consider reinstalling wordpress or at least re-uploading the /wp-admin/ directory.

Error 404 Forbidden in simple machines SMF

Please I need your help on this. I have a site hosted using SMF, when I try login, this is the error I see. Please what may be the cause? Below is the error that display as I login in.
Forbidden
You don't have permission to access /government/index.php on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
An error telling you that you aren't allowed to use this file means, that you need to change the permissions of this file, because the web service can not open it. Make sure you have all necessary permissions.
You can change permissions on a Linux based system with chmod.

Categories