Author Topic: suPHP - 500 Internal Server Error  (Read 168786 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
suPHP - 500 Internal Server Error
« on: June 13, 2014, 03:26:53 PM »
This error  is usually related to a permissions/ownership issue.
suPHP requires that the files are owned by the user name. Permissions on php files should also be set to 644 (-rw-r-r-), folder permission must be 755.

How to change ownership on the files and folders

Quote
option no.1. (this will fix all permissions for the user account)
go to CWP menu --> User Accounts -- > Fix Permissions and select user

option no.2.
For one file eg. /home/test/public_html/index.php
Code: [Select]
chown USERNAME:USERNAME /home/test/public_html/index.php
For all files in /home/test/public_html folder (RECOMMENDED)
Code: [Select]
chown -R USERNAME:USERNAME /home/test/public_html/*


How to change permissions on the files and folders

For one file eg. /home/test/public_html/index.php
Code: [Select]
chmod 644 /home/test/public_html/index.php
For all files in /home/test/public_html folder (RECOMMENDED)
Code: [Select]
cd /home/test/public_html
find . -type f -exec chmod 644 {} \;


If not of the above helps than you can check .htaccess file
you can check, disable, rename .htaccess file as rules inside this file can cause this issue.

You can also tail/monitor error log using command
Code: [Select]
tail -f /usr/local/apache/logs/error_log
« Last Edit: September 19, 2014, 12:30:18 PM by Administrator »
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: suPHP - 500 Internal Server Error
« Reply #1 on: July 23, 2014, 01:24:52 AM »
hello

I did the procedure as described and did not work.

how can I solve the problem?

Offline
*
Re: suPHP - 500 Internal Server Error
« Reply #2 on: July 23, 2014, 05:44:50 AM »
have you checked logs like described in last step?
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: suPHP - 500 Internal Server Error
« Reply #3 on: July 23, 2014, 10:50:55 AM »
In the error log

[Tue Jul 22 22:46:41 2014] [error] [client 10.1.107.11] SoftException in Application.cpp:221: File "/home/mega/public_html/index.php" is not in document root of Vhost "/usr/local/apache/htdocs"
[Tue Jul 22 22:46:41 2014] [error] [client 10.1.107.11] Premature end of script headers: index.php


could help?

Offline
*
Re: suPHP - 500 Internal Server Error
« Reply #4 on: July 23, 2014, 03:54:58 PM »
yes this is ownership or file location error.

all files needs to be located in users home folder public_html and need to be chowned as user owner.
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: suPHP - 500 Internal Server Error
« Reply #5 on: July 24, 2014, 02:05:17 PM »
ok

But how do I do that?

'm newbie in this system.

Could you inform me I shall step to setting this up?

Offline
*
Re: suPHP - 500 Internal Server Error
« Reply #6 on: July 24, 2014, 02:45:52 PM »
you have instructions in first post.

for advanced support contact
http://centos-webpanel.com/contact
« Last Edit: July 24, 2014, 07:19:25 PM by Administrator »
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: suPHP - 500 Internal Server Error
« Reply #7 on: July 27, 2014, 10:29:31 AM »
 [error] [client 127.0.0.1] Premature end of script headers: phpinfo.php

i give this message.
pls help

Offline
*
Re: suPHP - 500 Internal Server Error
« Reply #8 on: July 29, 2014, 02:40:36 AM »
where, more details about this?
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: suPHP - 500 Internal Server Error
« Reply #9 on: July 31, 2014, 03:13:59 PM »

tail -f /usr/local/apache/logs/error_log


[root@cwp public_html]# tail -f /usr/local/apache/logs/error_log
[Thu Jul 31 18:00:23 2014] [error] [client 88.246.102.209] SoftException in Application.cpp:221: File "/home/test/public_html/index.php" is not in document root of Vhost "/usr/local/apache/htdocs"
[Thu Jul 31 18:00:23 2014] [error] [client 88.246.102.209] Premature end of script headers: index.php
[Thu Jul 31 18:04:25 2014] [notice] caught SIGTERM, shutting down
[Thu Jul 31 18:05:31 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Jul 31 18:05:31 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/local/apache/bin/suexec)
[Thu Jul 31 18:05:32 2014] [notice] Apache/2.2.27 (Unix) mod_ssl/2.2.27 OpenSSL/1.0.1e-fips configured -- resuming normal operations
[Thu Jul 31 18:06:04 2014] [error] [client 88.246.102.209] File does not exist: /usr/local/apache/htdocs/img, referer: http://195.244.63.95/
[Thu Jul 31 18:06:04 2014] [error] [client 88.246.102.209] File does not exist: /usr/local/apache/htdocs/favicon.ico




[Thu Jul 31 18:06:12 2014] [error] [client 88.246.102.209] SoftException in Application.cpp:221: File "/home/test/public_html/index.php" is not in document root of Vhost "/usr/local/apache/htdocs"
[Thu Jul 31 18:06:12 2014] [error] [client 88.246.102.209] Premature end of script headers: index.php
[Thu Jul 31 18:09:41 2014] [error] [client 88.246.102.209] SoftException in Application.cpp:221: File "/home/test/public_html/index.php" is not in document root of Vhost "/usr/local/apache/htdocs"
[Thu Jul 31 18:09:41 2014] [error] [client 88.246.102.209] Premature end of script headers: index.php
[Thu Jul 31 18:09:43 2014] [error] [client 88.246.102.209] SoftException in Application.cpp:221: File "/home/test/public_html/index.php" is not in document root of Vhost "/usr/local/apache/htdocs"
[Thu Jul 31 18:09:43 2014] [error] [client 88.246.102.209] Premature end of script headers: index.php
[Thu Jul 31 18:09:44 2014] [error] [client 88.246.102.209] SoftException in Application.cpp:221: File "/home/test/public_html/index.php" is not in document root of Vhost "/usr/local/apache/htdocs"
[Thu Jul 31 18:09:44 2014] [error] [client 88.246.102.209] Premature end of script headers: index.php

Offline
*
Re: suPHP - 500 Internal Server Error
« Reply #10 on: August 01, 2014, 06:00:02 AM »
you need to provide all details about error message which you get in your browser, file permission and ownership including all parent folders.
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: suPHP - 500 Internal Server Error
« Reply #11 on: August 01, 2014, 07:10:20 AM »



Offline
***
Re: suPHP - 500 Internal Server Error
« Reply #12 on: November 11, 2014, 07:49:35 AM »
yes this is ownership or file location error.

all files needs to be located in users home folder public_html and need to be chowned as user owner.

This is quite confuse to me. I 've read somewhere in that forum like "you must add an alias..." but seems NO alias will work untill you have suPHP installed.

You say "in the same folder". It's that 100% true? I know user it's a must of suPHP, but don't know much about folder permisions.

I have poste same problem in a new thread, phpmyadmin related here http://forum.centos-webpanel.com/aplications/phpmyadmin-alias-error-500-internal-server/

Sorry for duplicity. Search function in forum IS NOT GOOD. It's hard to find certain posts, even if the search words are right.

EDIT: Seems not easy but seems that we can solve. Take a look here http://ubuntuforums.org/showthread.php?t=1753871. Seems we have to edit vHost templates to make it work onthefly for new domains too...

Regards.
« Last Edit: November 11, 2014, 07:53:28 AM by erm3nda »
8==D it's a function that try to compare 8 (int) against D (string) which returns True or False depending on the asker.

Offline
*
Re: suPHP - 500 Internal Server Error
« Reply #13 on: November 11, 2014, 05:30:43 PM »
Please be aware that the instructions in the Ubuntu Forum link above is for debian based builds only and need to be 'adapted' to CentOS/RHEL based systems.

Offline
*
Re: suPHP - 500 Internal Server Error
« Reply #14 on: November 12, 2014, 03:49:40 AM »
all files must be in proper document root (home folder) of the user account or they will not work, this are security features of SuExec.
AntiDDoS Protection (web + mail)
http://centos-webpanel.com/website-ddos-protection-proxy

Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp


Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor


Do you need Fast and FREE Support included for your CWP linux server?
http://centos-webpanel.com/noc-partner-list
Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services