php4 and php5 together questions

felosi

Well-Known Member
#1
I had a vps customer recently telling me they needed php4 for something. I have replaced the php that comes with it, with 5.24,
I tried to add this one line
addType application/x-httpd-php4 php

but we got a forbidden. So I replaced lsphp with the original and his script worked.
How can we keep php5 as the main php and call php4 from htaccess?
 

mistwang

LiteSpeed Staff
#2
Just rename the original lsphp to lsphp4, then add an external application for lsphp4, then add a script handler for "php4" suffix with the lsphp4 external application.
 

felosi

Well-Known Member
#5
Keep on getting this
2007-09-11 22:49:32.518 [INFO] [uds://tmp/lshttpd/lsphp4.sock] Connection refused, restart!
2007-09-11 22:49:32.518 [INFO] [uds://tmp/lshttpd/lsphp4.sock] Connection refused, restart!
2007-09-11 22:49:32.518 [INFO] [uds://tmp/lshttpd/lsphp4.sock] Connection refused, restart!
2007-09-11 22:52:51.375 [INFO] [uds://tmp/lshttpd/lsphp4.sock] Connection refused, restart!


For the command to run I got $SERVER_ROOT/fcgi-bin/lsphp4 -c ../php4

when entered from the command line it appears to work. Its just when I try to call a script I get a 503 and connect refused in error log
 

mistwang

LiteSpeed Staff
#6
Does /tmp/lshttpd/lsphp4.sock exist? has "auto start" being checked?
If it is a lsphp4 executable problem you should be able find some clue in stderr.log and error.log.
 
Top