All PHP calls stopped working

gboudreau

Well-Known Member
#1
All my PHP scripts stopped working today on LS 3.2.3 STD.

I re-compiled my PHP (5.2.3 LSAPI) earlier today, but I've tried to go back to what it was before, and it doesn't help.

Code:
root@megaone fcgi-bin]# ./lsphp -i | grep configure
Configure Command =>  './configure' '--prefix=/php5' '--with-litespeed' '--build=i386-redhat-linux' '--host=i386-redhat-linux' '--target=i386-redhat-linux-gnu' '--includedir=/usr/include' '--libdir=/usr/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-libdir=lib' '--with-config-file-path=../conf' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--without-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' '--with-pspell' '--with-expat-dir=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx' '--with-kerberos' '--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr' '--enable-memory-limit' '--enable-calendar' '--enable-dbx' '--enable-dio' '--without-sqlite' '--with-libxml-dir=/usr' '--with-xml' '--without-mysql' '--without-gd' '--without-odbc' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter'
It works from the command-line:
Code:
[root@megaone html]# cd /var/www/html/
[root@megaone html]# cat ping.php
pong
[root@megaone html]# cd /usr/local/lsws/fcgi-bin/
[root@megaone fcgi-bin]# cat /var/www/html/ping.php | ./lsphp
pong
[root@megaone fcgi-bin]#
But calling that in a browser: http://megaone.danslereseau.com/ping.php
results in a 503 error after quite a long time of waiting.

Debug logs show this for every request to a PHP script:
Code:
2007-10-03 11:25:13.035	DEBUG	[*:80] New connection from 207.182.162.96:2038.
2007-10-03 11:25:13.035	DEBUG	[*:80] 1 connections accepted!
2007-10-03 11:25:13.035	DEBUG	[207.182.162.96:2038-0] HttpIOLink::handleEvents() events=1!
2007-10-03 11:25:13.035	DEBUG	[207.182.162.96:2038-0] HttpConnection::onReadEx(), state: 0!
2007-10-03 11:25:13.035	DEBUG	[207.182.162.96:2038-0] readToHeaderBuf().
2007-10-03 11:25:13.035	DEBUG	[207.182.162.96:2038-0] Read from client: 662
2007-10-03 11:25:13.035	DEBUG	[207.182.162.96:2038-0] read 662 bytes to header buffer
2007-10-03 11:25:13.035	DEBUG	[207.182.162.96:2038-0] processHeader() return 0, header state: 3.
2007-10-03 11:25:13.035	DEBUG	[207.182.162.96:2038-0] readToHeaderBuf() return 0.
2007-10-03 11:25:13.035	DEBUG	[207.182.162.96:2038-0#dataproxy.pommepause.com] New request:
Method=[GET], URI=[/videotron_usage.php],
QueryString=[test]
Content Length=0
2007-10-03 11:25:13.035	DEBUG	[207.182.162.96:2038-0#dataproxy.pommepause.com] Find context with URI: [/], location: [/var/www/html/dataproxy.pommepause.com/]
2007-10-03 11:25:13.035	DEBUG	[HTAccess] Updating configuration file [/var/www/html/dataproxy.pommepause.com/.htaccess]
2007-10-03 11:25:13.036	DEBUG	[207.182.162.96:2038-0#dataproxy.pommepause.com] Find handler [php5Lsapi] for [.php]
2007-10-03 11:25:13.036	DEBUG	[207.182.162.96:2038-0#dataproxy.pommepause.com] processContextPath() return 0
2007-10-03 11:25:13.036	DEBUG	[207.182.162.96:2038-0#dataproxy.pommepause.com] run lsapi processor.
2007-10-03 11:25:13.036	DEBUG	[uds://tmp/lshttpd/lsphp5.sock] connection available!
2007-10-03 11:25:13.036	DEBUG	[uds://tmp/lshttpd/lsphp5.sock] request [207.182.162.96:2038-0#dataproxy.pommepause.com:lsapi] is assigned with connection!
2007-10-03 11:25:13.036	DEBUG	[207.182.162.96:2038-0#dataproxy.pommepause.com:lsapi] [ExtConn] reconnect()
2007-10-03 11:25:13.036	DEBUG	[php5Lsapi] add child process pid: 2915
2007-10-03 11:25:13.037	DEBUG	[207.182.162.96:2038-0#dataproxy.pommepause.com:lsapi] [ExtConn] connecting to [uds://tmp/lshttpd/lsphp5.sock]...
2007-10-03 11:25:13.037	DEBUG	[207.182.162.96:2038-0#dataproxy.pommepause.com:lsapi] ExtConn::onWrite()
2007-10-03 11:25:13.037	DEBUG	[207.182.162.96:2038-0#dataproxy.pommepause.com:lsapi] request header is done
2007-10-03 11:25:13.037	DEBUG	[207.182.162.96:2038-0#dataproxy.pommepause.com:lsapi] ExtConn::continueRead()
2007-10-03 11:25:13.037	DEBUG	[207.182.162.96:2038-0#dataproxy.pommepause.com:lsapi] Request body done!
2007-10-03 11:25:13.037	DEBUG	[207.182.162.96:2038-0#dataproxy.pommepause.com:lsapi] ExtConn::suspendWrite()
2007-10-03 11:25:13.037	DEBUG	[207.182.162.96:2038-0#dataproxy.pommepause.com:lsapi] processNewReq() return 0.
...
2007-10-03 11:25:23.051	DEBUG	[207.182.162.96:2038-0#dataproxy.pommepause.com:lsapi] No response in 10 seconds, possible dead lock, try starting a new instance.
I also see other types of errors:
Code:
2007-10-03 11:27:42.184	NOTICE	[207.182.162.96:2036-1#www.pommepause.com:lsapi] ExtConn timed out while processing.
2007-10-03 11:27:42.184	DEBUG	[207.182.162.96:2036-1#www.pommepause.com:lsapi] connection to [uds://tmp/lshttpd/lsphp5.sock] on request #0, error: Connection timed out!
2007-10-03 11:27:42.184	DEBUG	[207.182.162.96:2036-1#www.pommepause.com:lsapi] [ExtConn] close()
2007-10-03 11:27:42.184	DEBUG	[uds://tmp/lshttpd/lsphp5.sock] No Request has been processed successfully through this connection, the maximum connections allowed will be reduced!
2007-10-03 11:27:42.184	DEBUG	[207.182.162.96:2036-1#www.pommepause.com:lsapi] HttpExtConnector::tryRecover()...
2007-10-03 11:27:42.184	DEBUG	[207.182.162.96:2036-1#www.pommepause.com:lsapi] HttpIOLink::continueWrite()...
2007-10-03 11:27:42.184	DEBUG	[207.182.162.96:2036-1#www.pommepause.com:lsapi] write resumed!
2007-10-03 11:27:42.185	DEBUG	[207.182.162.96:2036-1#www.pommepause.com:lsapi] HttpIOLink::suspendWrite()...
2007-10-03 11:27:42.185	DEBUG	[207.182.162.96:2036-1#www.pommepause.com:lsapi] HttpConnection::sendHttpError(),code=503 Service Unavailable
2007-10-03 11:27:42.185	DEBUG	[207.182.162.96:2036-1#www.pommepause.com:lsapi] HttpConnection::flush()!
2007-10-03 11:27:42.185	DEBUG	[207.182.162.96:2036-1#www.pommepause.com:lsapi] Written to client: 621
2007-10-03 11:27:42.185	DEBUG	[207.182.162.96:2036-1#www.pommepause.com:lsapi] HttpConnection::nextRequest()!
2007-10-03 11:27:42.185	DEBUG	[207.182.162.96:2036-1#www.pommepause.com:lsapi] HttpExtConnector::cleanUp() ...
2007-10-03 11:27:42.185	DEBUG	[207.182.162.96:2036-1#www.pommepause.com:lsapi] abort request...
2007-10-03 11:27:42.185	DEBUG	[207.182.162.96:2036-1#www.pommepause.com:lsapi] release ExtProcessor!
2007-10-03 11:27:42.185	DEBUG	[207.182.162.96:2036-1#www.pommepause.com:lsapi] Non-KeepAlive, CLOSING!
2007-10-03 11:27:42.185	DEBUG	[207.182.162.96:2036-1#www.pommepause.com:lsapi] Shutting down out-bound socket ...
2007-10-03 11:27:42.273	DEBUG	[207.182.162.96:2036-1#www.pommepause.com:lsapi] HttpIOLink::handleEvents() events=17!
2007-10-03 11:27:42.273	DEBUG	[207.182.162.96:2036-1#www.pommepause.com:lsapi] Close socket ...
2007-10-03 11:27:43.074	DEBUG	[MMAP] Release mapped data at 0x148000
2007-10-03 11:27:43.074	DEBUG	[MMAP] Release mapped data at 0x140000
Any idea how I can fix this ?

Thanks.
 
Last edited:

mistwang

LiteSpeed Staff
#2
If you have PHP opcode cache installed, APC or eaccelerator, please remove that from the php.ini ,
if you upgrade from 4.4 to 5.2, you need to use the php.ini for the PHP 5.
 

gboudreau

Well-Known Member
#3
I've been using 5.2.x for quite a while now.
I tried disabling eAccelerator, but it didn't help.

Code:
[root@megaone fcgi-bin]# vi ../conf/php.ini
[root@megaone fcgi-bin]# ./lsphp -i | grep -i eacc
[root@megaone fcgi-bin]# ./lsphp -i | grep -i APC
[root@megaone fcgi-bin]# service lsws restart
 

gboudreau

Well-Known Member
#6
That file is empty:
-rw-r--r-- 1 apache apache 0 Oct 3 12:14 stderr.log

I also tried to go back to using old LSAPI PHP 5.1.6 and 5.2.2 binaries that I kept around, and it's not working. I'm positive that those binaries were working in the past, which makes me think something is misconfigured or something...
 

gboudreau

Well-Known Member
#7
Renaming my php.ini to php.ini.bak seems to fix the problem if I go back to PHP 5.2.2. It still doesn't work with PHP 5.2.3 though. I'll continue to debug in this direction.
 
Last edited:
Top