Internal server error and other problems

Status
Not open for further replies.

camzenxbt

New Member
Messages
8
Reaction score
0
Points
1
Hi there,

For some reason, I'm receiving an 'Internal Server Error' message/page whenever I try to access just one directory on my domain: http://cpsecure.x10.mx/secure/ - anything past this, such as http://cpsecure.x10.mx/secure/account/, also displays the error. However, every other location on my website doesn't display the error, such as the parent directory (I think it's called - i.e. http://cpsecure.x10.mx/) and other directories (for example: http://cpsecure.x10.mx/site/index.html). Can I ask why this is happening? Is there a way to prevent this error? (i.e. do I have a file that's causing it to happen in a subdirectory located in the /secure/ directory?).

Another problem I'm having is being required to enter the index file name in a directory in order to see it's contents - if I just type the directory name on the end of the URL, I'm presented with my custom 404 page (the URL doesn't change). For example: http://cpsecure.x10.mx/site/ will show you my custom 404 page (without changing the URL to http://cpsecure.x10.mx/error, strangely), so I have to type index.html on the end of the URL (i.e. http://cpsecure.x10.mx/site/index.html) to see the actual page. Why is this happening? Is there something wrong with my .htaccess file?
Also - I've also created a test subdirectory in the /site/ directory - this contains no index(.html) file and so I would expect it to show me the contents of the folder (like an "index of" followed by links to the subdirectories contained in there - isn't something like this meant to display when you don't have an index(.html) file?). It instead shows me the custom 404 page! The URL: http://cpsecure.x10.mx/site/test/

Thanks in advance for any support!
 

tonynadi

Member
Messages
41
Reaction score
1
Points
6
Check your error_log. There should be a log file somewhere in your root directory that will tell you what those errors are.
 

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi camzenxbt,

This is being caused by a section of the .htaccess file in your "secure" directory, because the RewriteRule line is using an invalid flag. Here's the section that is causing the Internal Server Error:

Code:
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule !.*\.php$ %{REQUEST_FILENAME}.php [L, QSA]


Your second issue is being caused by the rewrite rule at the bottom of the .htaccess file in "public_html". It is attempting to rewrite "/site" to "/site.php", which does not exist. You can fix this by removing these rules. ;)

Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]


Please let me know if you have any further questions. :)

Thank you,
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
Check your error_log. There should be a log file somewhere in your root directory that will tell you what those errors are.
by default - error logging is set off in free-hosting accounts
and if set on the user would not see the 'why' of the 'Internal Server Error'
 

tonynadi

Member
Messages
41
Reaction score
1
Points
6
by default - error logging is set off in free-hosting accounts
and if set on the user would not see the 'why' of the 'Internal Server Error'

If that's true, then this is a linux setup I've never before encountered.

The most common 500 Errors are PHP errors (which are supposed to show up in the log)
After than it would be Apache or htaccess errors (for which SOMETHING should show up)
Last would be oddities like internal networking errors, or DB issues, which probably wouldn't show in the logs.

If none of that is true, then I would suggest turning on display errors until you get it working:


.htaccess:
php_flag display_startup_errors on
php_flag display_errors on
php_flag html_errors on
#php_flag log_errors on
#php_value error_log /PHP_errors.log

If that works, try again with the last two # removed.
Should then be able to see the error.
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
Last edited:
Status
Not open for further replies.
Top