PDA

View Full Version : php4 and php5 together questions


felosi
09-11-2007, 02:34 PM
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
09-11-2007, 05:45 PM
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
09-11-2007, 06:13 PM
what do I put for the address?
I tried this uds://tmp/lshttpd/lsphp4.sock and it didnt work

mistwang
09-11-2007, 07:13 PM
should be fine. please check your error log,

felosi
09-12-2007, 02:29 AM
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
09-12-2007, 09:39 AM
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.

felosi
09-14-2007, 12:53 AM
hey, just updating you to let you know that putting on auto-start fixed the issue and its working like a charm
Thanks