Skamasle / sk-php-selector

PHP selector for centos 7
80 stars 70 forks source link

version = beta 0.4 FastCGI Error #13

Closed FDiskas closed 5 years ago

FDiskas commented 5 years ago

All websites shows

500
Internal Server Error

Logs:

Sat Feb 09 23:47:44 2019] [warn] [client ***] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Sat Feb 09 23:47:44 2019] [error] [client ***] Premature end of script headers: test.php

httpd -V

Server version: Apache/2.2.15 (Unix)
Server built:   Nov 15 2012 15:52:50
Server's Module Magic Number: 20051115:24
Server loaded:  APR 1.3.9, APR-Util 1.3.9
Compiled using: APR 1.3.9, APR-Util 1.3.9
Architecture:   64-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="run/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

rpm httpd -V

.......T.    /etc/httpd/conf.d/README
.......T.  c /etc/httpd/conf.d/welcome.conf
S.5....T.  c /etc/httpd/conf/httpd.conf
S.5....T.  c /etc/logrotate.d/httpd
.M.......    /var/log/httpd
Skamasle commented 5 years ago

Is centos 6 ?

In what php version get error ?

FDiskas commented 5 years ago

This error happens in all versions. CentOS release 6.10 works only on PHP Version 5.5.28

image

Skamasle commented 5 years ago

Can you try change version to some web and check if fcgi-starter was create and what have inside ?

/home/admin/web/DOMAIN.COM/cgi-bin/fcgi-starter

Should look like this:

#!/bin/sh
PHPRC=/usr/local/lib
export PHPRC
export PHP_FCGI_MAX_REQUESTS=500
export PHP_FCGI_CHILDREN=10
exec  /usr/bin/php73-cgi

Also check if template for example sk-php73 is in httpd dir and have conntent

/usr/local/vesta/data/templates/web/httpd/

sk-php73.sh check if this isnt empty sk-php73.stpl this is a symlink sk-php73.tpl this is a symlink

Of course you can try with any orther version.

Skamasle commented 5 years ago

Also check if from your server you can download templates:

http://mirror.skamasle.com/vestacp/PHP/sk-php70-centos.sh

I forget upload it to github so maybe you expect some conection problem if *.sh is empty in your server.

FDiskas commented 5 years ago

This template works: http://c.vestacp.com/0.9.8/rhel/templates/web/httpd/phpcgi.tpl

FDiskas commented 5 years ago

All your provided templates are not empty

FDiskas commented 5 years ago

I reinstalled vesta and tried again. This time I got error starting httpd

Invalid command 'php_admin_value', perhaps misspelled or defined by a module not included in the server configuration
FDiskas commented 5 years ago

I commented out all thous php_admin_value in all templates and the result is the same

Connection reset by peer: mod_fcgid: error reading data from FastCGI server

:shipit:

FDiskas commented 5 years ago

Compleatly wiped out server, installed centos 7 and vesta. And before everything else installed your beta 0.4 version, then restored users from backup and everything works. Changing php version also works. Thanks for the script :baggage_claim: