Welcome Guest, Not a member yet? Register   Sign In
Can't access my code igniter 3 website
#1

My website has been working for almost a year and then it suddenly stopped loading. When I go to the link it just keeps loading. I am hosting on a shared server. I found this error on the cpanel:
 client denied by server configuration: /site.com/system/
[i] client denied by server configuration: /site.com/application[/i]
[i][i] client denied by server configuration: /site.com/php.ini[/i][/i]

I can access HTML pages that I put at the root of the website but not PHP ones. 
By renaming the index.php and changing from the build from production to development and vice versa, the website works for a short period and the problem reoccurs. I'm assuming the problem is the .htaccess file and apache. 
Any ideas on how to solve the problem?
Reply
#2

(This post was last modified: 04-07-2021, 02:49 AM by Muzikant.)

In application/config/config.php file set $config['log_threshold'] = 1;

Make sure, the application/logs directory is writable.

Disable .htaccess file by renaming it to htaccess (remove dot from the beginning).

Try to access pages with index.php in the URL. For example: site.com/index.php/controller/method

If it is working with index.php, then the problem is in .htaccess rules. There is no universal solution for this and you must play with it. Every shared hosting is different.

Rename htaccess file back to .htaccess

If it is not working at all, then look in the log files in application/logs directory for more information. There should be some.
Reply
#3

(04-07-2021, 02:46 AM)Muzikant Wrote: In application/config/config.php file set $config['log_threshold'] = 1;

Make sure, the application/logs directory is writable.

Disable .htaccess file by renaming it to htaccess (remove dot from the beginning).

Try to access pages with index.php in the URL. For example: site.com/index.php/controller/method

If it is working with index.php, then the problem is in .htaccess rules. There is no universal solution for this and you must play with it. Every shared hosting is different.

Rename htaccess file back to .htaccess

If it is not working at all, then look in the log files in application/logs directory for more information. There should be some.

Thanks, I'll play with it.  
This is funny cause it's an intermittent error and it was gone when checked today without any effort from me.  So I'll wait to see if the error returns or I'll try to deal with it preemptively. I'm sure these steps will come in handy.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB