LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Bug Reports > All PHP calls stopped working

Reply
 
Thread Tools Display Modes
  #1  
Old 10-03-2007, 11:37 AM
gboudreau gboudreau is offline
Member
 
Join Date: Oct 2006
Location: Montr
Posts: 49
Default All PHP calls stopped working

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.
__________________
- Guillaume Boudreau

Last edited by gboudreau; 10-03-2007 at 11:52 AM..
Reply With Quote
  #2  
Old 10-03-2007, 11:55 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
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.
Reply With Quote
  #3  
Old 10-03-2007, 12:03 PM
gboudreau gboudreau is offline
Member
 
Join Date: Oct 2006
Location: Montr
Posts: 49
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
__________________
- Guillaume Boudreau
Reply With Quote
  #4  
Old 10-03-2007, 12:17 PM
gboudreau gboudreau is offline
Member
 
Join Date: Oct 2006
Location: Montr
Posts: 49
I tried with PHP 4, and it works fine:
http://megaone.danslereseau.com/ping.php3
__________________
- Guillaume Boudreau
Reply With Quote
  #5  
Old 10-03-2007, 12:18 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Please check lsws/logs/stderr.log, some thing wrong with the 5.2.4 PHP binary.
Reply With Quote
  #6  
Old 10-03-2007, 12:26 PM
gboudreau gboudreau is offline
Member
 
Join Date: Oct 2006
Location: Montr
Posts: 49
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...
__________________
- Guillaume Boudreau
Reply With Quote
  #7  
Old 10-03-2007, 12:37 PM
gboudreau gboudreau is offline
Member
 
Join Date: Oct 2006
Location: Montr
Posts: 49
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.
__________________
- Guillaume Boudreau

Last edited by gboudreau; 10-03-2007 at 12:49 PM..
Reply With Quote
  #8  
Old 10-03-2007, 12:56 PM
gboudreau gboudreau is offline
Member
 
Join Date: Oct 2006
Location: Montr
Posts: 49
I found my problem!
Instead of copying sapi/litespeed/php to lsws/fcgi-bin/, I copied /php5/bin/php in there! Oopsy!
__________________
- Guillaume Boudreau
Reply With Quote
  #9  
Old 10-03-2007, 03:40 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
"lsphp -v" should tell you which version of PHP binary it is.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:10 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.