Control Web Panel

WebPanel => PHP => Topic started by: Administrator on June 13, 2014, 03:26:53 PM

Title: suPHP - 500 Internal Server Error
Post by: Administrator 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
Title: Re: suPHP - 500 Internal Server Error
Post by: Giba 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?
Title: Re: suPHP - 500 Internal Server Error
Post by: Administrator on July 23, 2014, 05:44:50 AM
have you checked logs like described in last step?
Title: Re: suPHP - 500 Internal Server Error
Post by: Giba 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?
Title: Re: suPHP - 500 Internal Server Error
Post by: Administrator 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.
Title: Re: suPHP - 500 Internal Server Error
Post by: Giba 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?
Title: Re: suPHP - 500 Internal Server Error
Post by: Administrator on July 24, 2014, 02:45:52 PM
you have instructions in first post.

for advanced support contact
http://centos-webpanel.com/contact
Title: Re: suPHP - 500 Internal Server Error
Post by: carmageddon63 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
Title: Re: suPHP - 500 Internal Server Error
Post by: Administrator on July 29, 2014, 02:40:36 AM
where, more details about this?
Title: Re: suPHP - 500 Internal Server Error
Post by: carmageddon63 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
Title: Re: suPHP - 500 Internal Server Error
Post by: Administrator 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.
Title: Re: suPHP - 500 Internal Server Error
Post by: carmageddon63 on August 01, 2014, 07:10:20 AM
(http://195.244.63.95/~test/Untitled.jpg)

Title: Re: suPHP - 500 Internal Server Error
Post by: erm3nda 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/ (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 (http://ubuntuforums.org/showthread.php?t=1753871). Seems we have to edit vHost templates to make it work onthefly for new domains too...

Regards.
Title: Re: suPHP - 500 Internal Server Error
Post by: apmuthu on November 11, 2014, 05:30:43 PM
Please be aware that the instructions in the Ubuntu Forum (http://ubuntuforums.org/showthread.php?t=1753871) link above is for debian based builds only and need to be 'adapted' to CentOS/RHEL based systems.
Title: Re: suPHP - 500 Internal Server Error
Post by: Administrator 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.
Title: Re: suPHP - 500 Internal Server Error
Post by: thiago on November 13, 2014, 04:49:13 PM
Hi,

I Add New Account with name test;
i put files in /home/test/public_html and shows me a error:

Internal Server Error

"SoftException in Application.cpp:221: File "/home/test/public_html/index.php" is not in document root of Vhost "/usr/local/apache/htdocs"
[Thu Nov 13 11:43:32 2014] [error] [client SHAREDIP] Premature end of script headers: index.php"
"

I fix permissions, the all files are correct and still shows a error.

I access http://SHAREDIP/~test/

I need help.
Title: Re: suPHP - 500 Internal Server Error
Post by: Administrator on November 18, 2014, 12:48:54 AM
is this a new installation or the older server ?
Title: Re: suPHP - 500 Internal Server Error
Post by: Alnatih on December 17, 2014, 08:36:30 PM
Same problem here
New installation CentOS release 6.6 (Final)

I Add New Account with name admin;
i put files in /home/admin/public_html and shows me a error:

Internal Server Error

[Wed Dec 17 14:15:48 2014] [error] [client SHAREDIP] Premature end of script headers: index.php
[Wed Dec 17 14:16:24 2014] [error] [client SHAREDIP] SoftException in Application.cpp:221: File "/home/admin/public_html/index.php" is not in document root of Vhost "/usr/local/apache/htdocs"
[Wed Dec 17 14:16:24 2014] [error] [client SHAREDIP] Premature end of script headers: index.php

I fix permissions, the all files are correct and still shows a error.

I access http://SHAREDIP/~admin/

admin.com
rwxr-x---  17 admin nobody 4096 Dec 17 13:57 public_html

admin/public_html:
total 20
drwxr-x--- 17 admin nobody 4096 Dec 17 13:57 .
drwx--x--x 5 admin admin   4096 Dec 17 13:57 ..
-rw-r--r-- 1 admin admin   4670 Dec 17 13:57 index.php



I access http://SHAREDIP/~test/
test.com  (no error)
drwxr-x---  3 test nobody 4096 Dec 17 13:57 public_html

test/public_html:
total 20
drwxr-x--- 3 test nobody 4096 Dec 17 13:57 .
drwx--x--x 5 test test   4096 Dec 17 13:57 ..
drwxr-xr-x 2 test test   4096 Dec 17 13:57 img
-rw-r--r-- 1 test test   4670 Dec 17 13:57 index.html








Title: Re: suPHP - 500 Internal Server Error
Post by: Glenn on December 18, 2014, 07:30:00 AM
Do you have any .htaccess or php.ini in the folder with the web files also ?
Title: Re: suPHP - 500 Internal Server Error
Post by: Martin Lai on January 20, 2015, 03:52:31 AM
Help I am newbie using CWP and Got a Problem.

I am create a username and want to access via my ip public server http://128.199.73.171/~bjj/ -> bjj-> username
problem went i testing running the php script its show error Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request.

 :'( :'(

and log error_log shows like this

[Mon Jan 19 22:50:57 2015] [error] [client 127.0.0.1] SoftException in Application.cpp:221: File "/home/bjj/public_html/bahasa.php" is not in document root of Vhost "/usr/local/apache/htdocs", referer: http://128.199.73.171/~bjj/
[Mon Jan 19 22:50:57 2015] [error] [client 127.0.0.1] Premature end of script headers: bahasa.php, referer: http://128.199.73.171/~bjj/


Please help how to solve it? any solution?
Noted already following instruction post 1 but no results


Title: Re: suPHP - 500 Internal Server Error
Post by: erm3nda on January 20, 2015, 08:25:57 PM
I woul recommend for all people getting this problem to try rebuild vhost from the admin cwp panel.
Title: Re: suPHP - 500 Internal Server Error
Post by: sergejdds on January 21, 2015, 08:46:14 AM
I have exactly the same error, i tried to setup varnish, by switching the ports, and now all my php files are not loading anymore with the exact same error message described numerous times above...
Title: Re: suPHP - 500 Internal Server Error
Post by: qheart on January 21, 2015, 10:27:09 AM
I have exactly the same error, i tried to setup varnish, by switching the ports, and now all my php files are not loading anymore with the exact same error message described numerous times above...

try using menu : user account > fix permission >  user

Title: Re: suPHP - 500 Internal Server Error
Post by: Igor S. on January 22, 2015, 06:20:01 PM
Quote
is not in document root of Vhost "/usr/local/apache/htdocs"

This one too easy fix. Open /usr/local/etc/suphp.conf and change check_vhost_docroot=true to check_vhost_docroot=false
I have another error. When I try open http://sharedip/~test/ I see
Mismatch between target UID (99) and UID (502) of file "/home/test/public_html/index.php" (UID must bi different)
When I open http://test.com/~test/  it works. How to fix it?
Title: Re: suPHP - 500 Internal Server Error
Post by: Igor S. on January 22, 2015, 06:27:03 PM
Oh, Sorry. this is easy too...
Somebody TOUCH THIS ONE /usr/local/apache/conf.d/suphp.conf and write there suPHP_UserGroup nobody nobody !!!!!!
Question is closed. Thank you.
Title: Re: suPHP - 500 Internal Server Error
Post by: erm3nda on January 23, 2015, 07:58:08 AM
Quote
is not in document root of Vhost "/usr/local/apache/htdocs"

This one too easy fix. Open /usr/local/etc/suphp.conf and change check_vhost_docroot=true to check_vhost_docroot=false
I have another error. When I try open http://sharedip/~test/ I see
Mismatch between target UID (99) and UID (502) of file "/home/test/public_html/index.php" (UID must bi different)
When I open http://test.com/~test/  it works. How to fix it?

I cant believe... are u serious?
Title: Re: suPHP - 500 Internal Server Error
Post by: Igor S. on January 25, 2015, 12:50:19 PM
I cant believe... are u serious?

It works for me. I tested few configs and OS version.
Title: Re: suPHP - 500 Internal Server Error
Post by: erm3nda on January 28, 2015, 08:29:51 AM
Yes, you literally fuckup the security on your server.
This is why i ask you if you are serious.

Obviosly it works. Uninstall suPHP to make it work better...
Title: Re: suPHP - 500 Internal Server Error
Post by: oguz657 on June 15, 2015, 07:06:05 PM
dont work buddy.
Title: Re: suPHP - 500 Internal Server Error
Post by: oguz657 on June 16, 2015, 09:24:02 PM
chmod test:test (all files and folders)
test 711
public_html 755
all files 644
all folders 755

Why why why dont work :(((((

[Wed Jun 17 00:12:17 2015] [error] [client 88.235.xxx.xxx] SoftException in Application.cpp:404: Mismatch between target UID (99) and UID (500) of file "/home/test/public_html/index.php"
[Wed Jun 17 00:12:17 2015] [error] [client 88.235.xxx.xxx] Premature end of script headers: index.php

other config
-----------------------------------------------------
vhost.conf Template
# vhost_start %domain_name%
<VirtualHost *:%domain_port%>
ServerName %domain_name%
ServerAlias www.%domain_name%
ServerAdmin %admin_email%
DocumentRoot "%homedir%/%username%/public_html"
ScriptAlias /cgi-bin/ "%homedir%/%username%/public_html/cgi-bin/
#
# Custom settings are loaded below this line (if any exist)
# Include "/usr/local/apache/conf/userdata/%username%/%domain_name%/*.conf

<IfModule mod_suexec.c>
        SuexecUserGroup %username% %username%
</IfModule>

<IfModule mod_suphp.c>
        suPHP_UserGroup %username% %username%
        suPHP_ConfigPath /home/%username%
</IfModule>

<Directory "/">
        AllowOverride All
</Directory>

</VirtualHost>
# vhost_end %domain_name%
--------------------------------------------------------



httpd.conf
--------------------------------------------------------
# Virtual hosts
Include conf.d/vhosts.conf

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
Include /usr/local/apache/conf/sharedip.conf
Include /usr/local/apache/conf.d/*.conf
ExtendedStatus On
<Directory "/usr/local/apache/htdocs">
        suPHP_UserGroup nobody nobody
        suPHP_AddHandler x-httpd-suphp
</Directory>

--------------------------------------------------------


Title: Re: suPHP - 500 Internal Server Error
Post by: davidpbro on August 05, 2015, 10:04:49 AM
Hello to the forum!
Similar situation for me.
I am spending a lot of hours trying to resolve this issue. But, now, it is time to ask your help.
I have this VPS server with only one public/shared IP.(http://s8.postimg.org/eplqjjiwh/server_config.jpg) (http://postimg.org/image/eplqjjiwh/)
I have setup a Vhost with one only domain (registered with Registrar with DNS management correctly configured) running a small Wordpress network (The installation went Ok, but I have experienced a lot of permission denied and forbidden and so all, when in wordpress admin). Anyway, until this afternoon I was able to install wordpress, setup a working mail server, sending and receiving email via roundcube webmail, at  the price of security setting
Code: [Select]
;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=false
in /usr/local/etc/suphp.conf. Thinking about that, in fact, I am still in "development mode", I revert to TRUE the line above.
Result: 500 internal server error. Also in roundcube.
I have made all the actions suggested here in the forum and in the Wiki: fix permission thousands of times, re-upload manually wp-admin and wp-include folder in their proper location, renamed .htaccess (Leave it untouched as default wordpress network required), rebuild virtual hosts, increase in the php.ini memory limit to 256 Mb, disabling all plugins, nothing.
Looking inside apache error log, it says at the recent few lines:
Code: [Select]
[Tue Aug 04 21:08:27 2015] [error] [client 93.41.199.45] ParsingException in IniFile.cpp:198: Malformed line "[global]\r"
[Tue Aug 04 21:08:27 2015] [error] [client 93.41.199.45] Premature end of script headers: themes.php
[Tue Aug 04 21:08:28 2015] [error] [client 93.41.199.45] ParsingException in IniFile.cpp:198: Malformed line "[global]\r"
[Tue Aug 04 21:08:28 2015] [error] [client 93.41.199.45] Premature end of script headers: themes.php
[Tue Aug 04 21:11:32 2015] [error] [client 180.76.15.146] ParsingException in IniFile.cpp:198: Malformed line "[global]\r"
[Tue Aug 04 21:11:32 2015] [error] [client 180.76.15.146] Premature end of script headers: index.php
[Tue Aug 04 21:13:21 2015] [error] [client 180.76.15.153] ParsingException in IniFile.cpp:198: Malformed line "[global]\r"
[Tue Aug 04 21:13:21 2015] [error] [client 180.76.15.153] Premature end of script headers: index.php
[Tue Aug 04 21:18:26 2015] [error] [client 93.41.199.45] ParsingException in IniFile.cpp:198: Malformed line "[global]\r"
[Tue Aug 04 21:18:26 2015] [error] [client 93.41.199.45] Premature end of script headers: themes.php
[Tue Aug 04 21:32:51 2015] [error] [client 93.41.199.45] ParsingException in IniFile.cpp:198: Malformed line "[global]\r"
[Tue Aug 04 21:32:51 2015] [error] [client 93.41.199.45] Premature end of script headers: index.php
[Tue Aug 04 21:32:53 2015] [error] [client 93.41.199.45] ParsingException in IniFile.cpp:198: Malformed line "[global]\r"
[Tue Aug 04 21:32:53 2015] [error] [client 93.41.199.45] Premature end of script headers: index.php
[Tue Aug 04 21:52:28 2015] [error] [client 66.249.78.57] ParsingException in IniFile.cpp:198: Malformed line "[global]\r"
[Tue Aug 04 21:52:28 2015] [error] [client 66.249.78.57] Premature end of script headers: index.php

At this point, any suggestion is appreciated.
Thank you.
David
Title: Re: suPHP - 500 Internal Server Error
Post by: margeslt on August 27, 2015, 05:36:00 PM
I have a problem with this panel. I need to run a php script, execution time him are quite large.
In browser sho error(500):
Internal Server Error
In apache log(/usr/local/apache/logs/error):
Script timed out before returning headers: index.php

The values for:
max_input_time, max_execution_time
set great value - 999

I tried to correct the error, the value(Timeout) of the rules:
in file /usr/local/apache/conf/extra/httpd-default.conf

But it did not help.
Some time later, still an error: 500
How to increase the timeout.
Help me please.
Title: Re: suPHP - 500 Internal Server Error
Post by: brijendrasial on August 31, 2015, 08:10:57 PM
nano /usr/local/apache/conf/httpd.conf
Title: Re: suPHP - 500 Internal Server Error
Post by: lethang on January 16, 2016, 06:09:31 PM
Hi,

I am facing with this error - 500 Internal Server Error but for SUB DOMAIN ONLY. Main domain works fine. I tried to use fix permissions but It still happen.

After I created sub domain demo.xxx.com with path: /home/USERNAME/public_html/demo.xxx.com then checking it in File Manager, I see an empty demo.xxx.com folder is created in public_html

Could Anyone help this?
Thank you

Some info about server:
Apache version: Apache/2.2.27
PHP version: 5.4.45
MySQL version: 5.1.73
CWP version: 0.9.8.11
Title: Re: suPHP - 500 Internal Server Error
Post by: Administrator on January 17, 2016, 01:43:07 AM
you can check your apache logs

tail -f /usr/local/apache/logs/error_log
Title: Re: suPHP - 500 Internal Server Error
Post by: lethang on January 17, 2016, 07:11:07 AM
you can check your apache logs

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

Thank you for the reply

This is the logs

[root@mail ~]# tail -f /usr/local/apache/logs/error_log
[Sun Jan 17 13:55:29 2016] [alert] [client 14.161.68.128] /home/username/public_html/.htaccess: Options not allowed here, referer: http://courses.xxx.edu.vn/
[Sun Jan 17 13:55:36 2016] [alert] [client 14.161.68.128] /home/username/public_html/.htaccess: Options not allowed here
[Sun Jan 17 13:55:36 2016] [alert] [client 14.161.68.128] /home/username/public_html/.htaccess: Options not allowed here, referer: http://demo.xxx.edu.vn/
[Sun Jan 17 13:55:36 2016] [alert] [client 14.161.68.128] /home/username/public_html/.htaccess: Options not allowed here, referer: http://demo.xxx.edu.vn/
[Sun Jan 17 13:55:36 2016] [alert] [client 14.161.68.128] /home/username/public_html/.htaccess: Options not allowed here, referer: http://demo.xxx.edu.vn/
[Sun Jan 17 13:57:08 2016] [error] [client 66.249.77.122] File does not exist: /usr/local/apache/htdocs/index.php
[Sun Jan 17 13:57:49 2016] [alert] [client 14.161.68.128] /home/username/public_html/.htaccess: Options not allowed here
[Sun Jan 17 13:57:49 2016] [alert] [client 14.161.68.128] /home/username/public_html/.htaccess: Options not allowed here, referer: http://demo.xxx.edu.vn/
[Sun Jan 17 13:57:49 2016] [alert] [client 14.161.68.128] /home/username/public_html/.htaccess: Options not allowed here, referer: http://demo.xxx.edu.vn/
[Sun Jan 17 13:57:49 2016] [alert] [client 14.161.68.128] /home/username/public_html/.htaccess: Options not allowed here, referer: http://demo.xxx.edu.vn/


xxx.edu.vn: is my domain
username: user name
Title: Re: suPHP - 500 Internal Server Error
Post by: ohandy1 on February 01, 2016, 03:55:50 PM
Please don't stop this thread, finally I've found someone working on a similar problem.  I've installed suitecrm and having nothing but permissions problems.

This is the most informative thread I've found so far and none that I've started draw responses.

If you find resolution please continue to share.
Title: Re: suPHP - 500 Internal Server Error
Post by: undone on February 10, 2016, 07:24:22 AM
You need to put content of your .htaccess file here (the one in your public_html directory.
Title: Re: suPHP - 500 Internal Server Error
Post by: thanh_tan on May 05, 2016, 07:17:48 AM
Hello,

I got PHP Parse error, how can i fix it?

Code: [Select]
[Thu May 05 02:59:14 2016] [error] [client 108.162.222.31] PHP Parse error:  syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home/banchong/public_html/index.php on line 50
Title: Re: suPHP - 500 Internal Server Error
Post by: Sandeep on May 05, 2016, 10:18:01 AM
did you modified Index.php?

probably reinstalling the software/script (wordpress, etc) files will fix this issue and i recommend to install Suhosin
Code: [Select]
cd /usr/local/src
wget https://download.suhosin.org/suhosin-0.9.38.tar.gz
tar zxvf suhosin-0.9.38.tar.gz
cd suhosin-0.9.38
phpize
./configure
make
make install
echo extension=suhosin.so >> /usr/local/php/php.ini
Title: Re: suPHP - 500 Internal Server Error
Post by: idc on May 28, 2016, 11:24:29 AM
Hi
I too am getting 500 error when I try to access phpmyadmin or roundcube webmail from admin panel

My vps is IP only no domain associated with it (yet)
I have a website I am building, and editing hosts file to create site before I point existing domain to new ip

I have tried reset permission for both nobody and user acount for new domain.

in cw.admin the apache server is stopped with errors
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using ########.### for ServerName
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down

Not sure if the above helps, the website I am creating is working but even this i cannot acces phpmyadmin or webmail

I hope it is something I have forgotten that is easily rectified.

Thanks in advance
Title: Re: suPHP - 500 Internal Server Error
Post by: Sandeep on May 28, 2016, 11:33:19 AM
Hi
I too am getting 500 error when I try to access phpmyadmin or roundcube webmail from admin panel

My vps is IP only no domain associated with it (yet)
I have a website I am building, and editing hosts file to create site before I point existing domain to new ip

I have tried reset permission for both nobody and user acount for new domain.

in cw.admin the apache server is stopped with errors
Starting httpd: httpd: Could not reliably determine the server's fully qualified domain name, using ########.### for ServerName
(98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down

Not sure if the above helps, the website I am creating is working but even this i cannot acces phpmyadmin or webmail

I hope it is something I have forgotten that is easily rectified.

Thanks in advance

Pm me the VPS credentials need to check it
Title: Re: suPHP - 500 Internal Server Error
Post by: Sandeep on May 28, 2016, 01:52:33 PM
problem resolved fixed apache and permission
Title: Re: suPHP - 500 Internal Server Error
Post by: idc on June 04, 2016, 04:23:36 PM
Hi

Apologies for late reply, unfortunately I only have time to work on this in the weekends.

Big thanks to Sandeep for fixing the issues that I had, and for taking the time to converse via PM etc in resolving the issue.

A Big thanks for this wonderful support.


IDC
Title: Re: suPHP - 500 Internal Server Error
Post by: helsywarner on August 15, 2017, 06:50:10 AM
The first thing you need to know about an "Internal Server Error (http://net-informations.com/q/mis/500.html)" is that the error can only be resolved by fixes to the Web server software. It is not a client-side problem meaning that the problem is not with our plugin. This is a 'catch-all' error generated by the Web server. Basically something has gone wrong, but the server can not be more specific about the error condition in its response to the client. In addition to the 500 error notified back to the client, the Web server should generate some kind of internal error log which gives more details of what went wrong. It is up to the operators of the Web server site to locate and analyse the logs which should give further information about the error.
Title: Re: suPHP - 500 Internal Server Error
Post by: yamano on January 24, 2019, 12:13:48 AM
Hi guys.

I'm trying to solve this HTTP ERROR 500 (6 days trying and nothing....),
but i can't solve...
I read about a solution:

"Big thanks to Sandeep for fixing the issues that I had, and for taking the time to converse via PM etc in resolving the issue.

A Big thanks for this wonderful support. "

But i cant see the solution..  can you guys say what to do or help me in some way?

I'll be gratefull.
regards
Title: Re: suPHP - 500 Internal Server Error
Post by: Dzonny on March 04, 2019, 01:10:26 PM
Hello there guys,

Another one in desperate need for help here.

I'm getting 500 error whenever I try to open php page. I can open html pages though.
I have newly installed CentOS 7 with CWP.

I have very limited knowledge about linux environment, though I know how to use ssh (i own another linux server, which was already in working condition when I get it).

Here's files and permissions that I have in htdocs directory:
-rw-r--r-- 1 root root     49 Feb 20 09:31 index.html
-rw-r--r-- 1 root root   5069 Feb 26  2018 index-orig.html
-rw-r--r-- 1 root root 550726 Feb 19 23:30 najava2019.png
-rw-r--r-- 1 root root     24 Feb 19 23:32 nikola.php
-rw-r--r-- 1 root root     10 Feb 19 13:07 phpinfo.php
drwxr-xr-x 6 root root   4096 Aug 22  2014 webftp_simple

And here's an error from error_log:
[Mon Mar 04 14:07:41.395390 2019] [:error] [pid 2115:tid 140338167944960] [client 212.200.80.129:59946] SoftException in Application.cpp:350: UID of script "/usr/local/apache/htdocs/phpinfo.php" is smaller than min_uid
[Mon Mar 04 14:07:41.395436 2019] [core:error] [pid 2115:tid 140338167944960] [client 212.200.80.129:59946] End of script output before headers: phpinfo.php

I assume it's permission/ownership problem with suPHP, but It's frustrating as I'm trying to figure it out by reading a tons of articles from the web, but can't seems to find a solution. I don't even know how to check if I'm using the right user (root:root) for files, though I haven't changed/added new users or anything, this is something that should be working by default, right?

Note that I have just one site hosted on this server, and I'm not gonna add new ones, so I don't need different users, permissions and stuff, just one global setting for everything, for what it's worth.

Please advice where to go from here.

Thanks,
Nikola
Title: Re: suPHP - 500 Internal Server Error
Post by: studio4host on March 04, 2019, 02:29:47 PM
simple under users in the cwp admin you have option fix account permissions and select user "nobody"
Title: Re: suPHP - 500 Internal Server Error
Post by: TheEAK on July 04, 2019, 01:35:29 AM
Hello Friends.

i solved this error.
our server was giving error Mismatch between target UID (525) and UID (99) of file /usr/local/apache/htdocs/roundcube/index.php.

suPHP_UserGroup nobody needs to be added to suphp.conf.
but when adding this, the system appends the file to the end.
This is the source of the problem.
<Directory />

* other expressions
suPHP_UserGroup nobody nobody
*
</ Directory>
if this happens, the problem is corrected

my suphp.conf file.

LoadModule suphp_module modules / mod_suphp.so
suPHP_Engine on
AddType application / x-httpd-php .php5 .php4 .php .php3
<Directory />
suPHP_AddHandler application / x-httpd-php
        suPHP_AddHandler application / x-httpd-php44
        suPHP_AddHandler application / x-httpd-php52
        suPHP_AddHandler application / x-httpd-php53
        suPHP_AddHandler application / x-httpd-php54
        suPHP_AddHandler application / x-httpd-php55
        suPHP_AddHandler application / x-httpd-php56
        suPHP_AddHandler application / x-httpd-php7
        suPHP_AddHandler application / x-httpd-php70
        suPHP_AddHandler application / x-httpd-php71
        suPHP_AddHandler application / x-httpd-php72
        suPHP_UserGroup nobody nobody
</ Directory>
Title: Re: suPHP - 500 Internal Server Error
Post by: Mighty Dr.Wolf on July 06, 2019, 09:17:09 PM
thank you to write the right answer and share it with us
Regards
Title: Re: suPHP - 500 Internal Server Error
Post by: kshitij.singh on September 19, 2019, 12:23:34 PM
[Fri Sep 06 09:09:30.844668 2019] [core:error] [pid 30256:tid 140662234072832] [client 223.225.37.101:60428] AH00524: Handler for application/x-httpd-php72 returned invalid result code 70007
[Fri Sep 06 09:39:45.949119 2019] [core:error] [pid 30686:tid 140662343177984] [client 223.225.37.101:57408] AH00524: Handler for application/x-httpd-php72 returned invalid result code 70007
[Fri Sep 06 09:39:58.291818 2019] [core:error] [pid 30686:tid 140662259250944] [client 223.225.37.101:44403] AH00524: Handler for application/x-httpd-php72 returned invalid result code 70007
[Fri Sep 06 09:40:11.551669 2019] [core:error] [pid 30254:tid 140662376748800] [client 223.225.37.101:47060] AH00524: Handler for application/x-httpd-php72 returned invalid result code 70007
[Fri Sep 06 09:40:36.091556 2019] [core:error] [pid 30254:tid 140662259250944] [client 223.225.37.101:22191] AH00524: Handler for application/x-httpd-php72 returned invalid result code 70007
[Fri Sep 06 09:40:51.024428 2019] [core:error] [pid 30254:tid 140662385141504] [client 223.225.37.101:1426] AH00524: Handler for application/x-httpd-php72 returned invalid result code 70007
[Fri Sep 06 09:41:22.290134 2019] [core:error] [pid 30686:tid 140662376748800] [client 223.225.37.101:47211] AH00524: Handler for application/x-httpd-php72 returned invalid result code 70007
[Mon Sep 09 07:39:12.271701 2019] [core:error] [pid 30539:tid 139849176680192] [client 106.202.102.25:15756] AH00524: Handler for application/x-httpd-php72 returned invalid result code 70007
[Fri Sep 13 08:31:32.705256 2019] [:error] [pid 21511:tid 140702474245888] [client 185.234.217.41:39818] [client 185.234.217.41] ModSecurity: Access denied with code 403 (phase 1). Matched phrase "/.env" at REQUEST_URI. [file "/usr/local/apache/modsecurity-cwaf/rules/02_Global_Generic.conf"] [line "122"] [id "210492"] [rev "3"] [severity "CRITICAL"] [tag "CWAF"] [tag "Generic"] [hostname "www.perfectdrive.in"] [uri "/.env"] [unique_id "XXtT5FeBLd1H7To8mkllDwAAAJU"]
[Mon Sep 16 14:02:17.531053 2019] [core:error] [pid 20358:tid 140495045797632] [client 146.196.37.100:56025] AH00524: Handler for application/x-httpd-php72 returned invalid result code 70007
[Mon Sep 16 14:16:02.923446 2019] [core:error] [pid 20494:tid 140495070975744] [client 146.196.37.100:56079] AH00524: Handler for application/x-httpd-php72 returned invalid result code 70007
[Tue Sep 17 05:31:25.717093 2019] [core:error] [pid 30809:tid 139948455802624] [client 146.196.37.250:56528] AH00524: Handler for application/x-httpd-php72 returned invalid result code 70007
[Tue Sep 17 05:45:47.982552 2019] [core:error] [pid 2814:tid 139871473608448] [client 146.196.37.250:56685] AH00524: Handler for application/x-httpd-php72 returned invalid result code 70007
[Tue Sep 17 05:58:20.085985 2019] [core:error] [pid 2799:tid 139871440037632] [client 146.196.37.250:56736] AH00524: Handler for application/x-httpd-php72 returned invalid result code 70007
[Tue Sep 17 06:00:17.412459 2019] [core:error] [pid 8272:tid 140380496480000] [client 146.196.37.250:56749] AH00524: Handler for application/x-httpd-php72 returned invalid result code 70007
[Tue Sep 17 06:10:14.142740 2019] [core:error] [pid 8360:tid 140380402087680] [client 146.196.37.250:56769] AH00524: Handler for application/x-httpd-php72 returned invalid result code 70007
[Tue Sep 17 06:12:46.024869 2019] [core:error] [pid 11041:tid 139923284776704] [client 146.196.37.250:56785] AH00524: Handler for application/x-httpd-php72 returned invalid result code 70007
[Tue Sep 17 06:14:29.643570 2019] [core:error] [pid 10926:tid 139923293169408] [client 146.196.37.250:56795] AH00524: Handler for application/x-httpd-php72 returned invalid result code 70007
[Tue Sep 17 06:18:14.925550 2019] [core:error] [pid 10928:tid 139923139041024] [client 146.196.37.250:56850] AH00524: Handler for (null) returned invalid result code 70007
[Tue Sep 17 07:28:17.440417 2019] [core:error] [pid 11041:tid 139923172611840] [client 146.196.37.250:57142] AH00524: Handler for (null) returned invalid result code 70007
[Tue Sep 17 07:38:35.887638 2019] [core:error] [pid 11041:tid 139923147433728] [client 146.196.37.250:57180] AH00524: Handler for (null) returned invalid result code 70007
[Tue Sep 17 08:58:56.323034 2019] [core:error] [pid 3919:tid 140685039355648] [client 146.196.37.250:57696] AH00524: Handler for (null) returned invalid result code 70007
[Tue Sep 17 08:59:42.410328 2019] [core:error] [pid 4244:tid 140403353319168] [client 146.196.37.250:57699] AH00524: Handler for (null) returned invalid result code 70007
[Tue Sep 17 09:37:56.577140 2019] [core:error] [pid 9253:tid 139665575188224] [client 1.187.242.212:56820] AH00524: Handler for (null) returned invalid result code 70007
[Thu Sep 19 10:16:21.285650 2019] [core:error] [pid 13509:tid 140486090155776] [client 146.196.37.75:49348] AH00524: Handler for (null) returned invalid result code 70007
[Thu Sep 19 10:17:17.637872 2019] [core:error] [pid 13509:tid 140486039799552] [client 146.196.37.75:49405] AH00524: Handler for (null) returned invalid result code 70007
[Thu Sep 19 10:29:18.672443 2019] [core:error] [pid 13509:tid 140486081763072] [client 146.196.37.75:50080] AH00524: Handler for (null) returned invalid result code 70007
[Thu Sep 19 10:43:19.968744 2019] [core:error] [pid 13405:tid 140486098548480] [client 146.196.37.75:50949] AH00524: Handler for (null) returned invalid result code 70007
[Thu Sep 19 10:44:30.199194 2019] [core:error] [pid 13404:tid 140486204655360] [client 146.196.37.75:51014] AH00524: Handler for (null) returned invalid result code 70007
[Thu Sep 19 10:58:29.203172 2019] [core:error] [pid 13404:tid 140486221440768] [client 146.196.37.75:51840] AH00524: Handler for (null) returned invalid result code 70007
[Thu Sep 19 11:03:39.831428 2019] [core:error] [pid 31965:tid 140705586464512] [client 146.196.37.75:52111] AH00524: Handler for (null) returned invalid result code 70007
[Thu Sep 19 11:07:20.075704 2019] [core:error] [pid 934:tid 140082430306048] [client 146.196.37.75:52299] AH00524: Handler for (null) returned invalid result code 70007
[Thu Sep 19 11:18:23.701457 2019] [core:error] [pid 963:tid 140082379949824] [client 146.196.37.75:52922] AH00524: Handler for (null) returned invalid result code 70007
[Thu Sep 19 11:19:38.035115 2019] [core:alert] [pid 1040:tid 140082455484160] [client 146.196.37.75:53049] /home/perfectdrive/public_html/public/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Thu Sep 19 11:19:41.562126 2019] [core:alert] [pid 1040:tid 140082346379008] [client 146.196.37.75:53055] /home/perfectdrive/public_html/public/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Thu Sep 19 11:19:42.168953 2019] [core:alert] [pid 1040:tid 140082489054976] [client 146.196.37.75:53056] /home/perfectdrive/public_html/public/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Thu Sep 19 11:19:43.467544 2019] [core:alert] [pid 936:tid 140082463876864] [client 146.196.37.75:53057] /home/perfectdrive/public_html/public/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Thu Sep 19 11:19:50.626358 2019] [core:alert] [pid 1040:tid 140082413520640] [client 146.196.37.75:53062] /home/perfectdrive/public_html/public/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration
[Thu Sep 19 11:19:51.479536 2019] [core:alert] [pid 1040:tid 140082388342528] [client 146.196.37.75:53061] /home/perfectdrive/public_html/public/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration, referer: https://perfectdrive.in/login
[Thu Sep 19 11:21:26.883121 2019] [core:error] [pid 936:tid 140082312808192] [client 146.196.37.75:53141] AH00524: Handler for (null) returned invalid result code 70007
[Thu Sep 19 11:34:12.232752 2019] [core:error] [pid 1040:tid 140082363164416] [client 146.196.37.75:53992] AH00524: Handler for (null) returned invalid result code 70007
[Thu Sep 19 11:34:36.300698 2019] [core:error] [pid 1040:tid 140082321200896] [client 146.196.37.75:54027] AH00524: Handler for (null) returned invalid result code 70007
[Thu Sep 19 11:59:43.902156 2019] [core:error] [pid 17933:tid 140610048620288] [client 146.196.37.75:55452] AH00524: Handler for (null) returned invalid result code 70007
[Thu Sep 19 12:00:25.560145 2019] [core:error] [pid 18350:tid 140072461281024] [client 146.196.37.75:55483] AH00524: Handler for (null) returned invalid result code 70007
[Thu Sep 19 12:01:57.322709 2019] [core:error] [pid 19052:tid 139872044050176] [client 146.196.37.75:55570] AH00524: Handler for (null) returned invalid result code 70007
[Thu Sep 19 12:03:29.619226 2019] [core:error] [pid 19765:tid 140174335911680] [client 146.196.37.75:55646] AH00524: Handler for (null) returned invalid result code 70007
[Thu Sep 19 12:20:34.651784 2019] [core:error] [pid 19794:tid 140174218413824] [client 146.196.37.75:56445] AH00524: Handler for (null) returned invalid result code 70007
Title: Re: suPHP - 500 Internal Server Error
Post by: Dumnezeu on May 23, 2023, 06:37:28 PM
I got internal server error 500 after clean install in php74. All websites got the same error on php74 while using php selector. No problems found while using php-fpm selector. The server is using Nginx & Varnish & Apache .
Code: [Select]
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at xxx to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.
I go to server log and the server is giving me this error:
Code: [Select]
[Tue May 23 20:56:46.053393 2023] [:error] [pid 21597:tid 140026747442944] [client xx.xx.xx.xx:56656] SecurityException in Application.cpp:498: Handler not found in configuration
[Tue May 23 20:56:46.053669 2023] [:error] [pid 21597:tid 140026747442944] [client xx.xx.xx.xx:56656] Caused by KeyNotFoundException in Configuration.cpp:241: Handler "application/x-httpd-php74" not found
[Tue May 23 20:56:46.053716 2023] [core:error] [pid 21597:tid 140026747442944] [client xx.xx.xx.xx:56656] End of script output before headers: info.php
Where can i find Configuration.cpp seams theat the error is located in theat file.
Title: Re: suPHP - 500 Internal Server Error
Post by: MonM on November 21, 2023, 10:11:12 PM
Hi,

@Dumnezeu I had the same problem. It appeared that in the file /usr/local/etc/suphp.conf this line was missing:

application/x-httpd-php74="php:/opt/alt/php74/usr/bin/php-cgi"