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