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

0 Members and 1 Guest are viewing this topic.

Offline
*
Re: suPHP - 500 Internal Server Error
« Reply #45 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
« Last Edit: March 04, 2019, 01:13:36 PM by Dzonny »

Offline
*
Re: suPHP - 500 Internal Server Error
« Reply #46 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"
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*
Re: suPHP - 500 Internal Server Error
« Reply #47 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>

Offline
*
Re: suPHP - 500 Internal Server Error
« Reply #48 on: July 06, 2019, 09:17:09 PM »
thank you to write the right answer and share it with us
Regards

Offline
*
Re: suPHP - 500 Internal Server Error
« Reply #49 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

Offline
*
Re: suPHP - 500 Internal Server Error
« Reply #50 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.

Offline
*
Re: suPHP - 500 Internal Server Error
« Reply #51 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"