help40 wrote:
> Thank you for your fast reply and for directions you gave me
>
> but I am not sure how I must configure / install php4 separate , so php5 keep running
>
> something like adding
>
> ./configure --prefix=/usr/local/php4 --exec-prefix=/usr/local/php4 --program-suffix=4
>
> when configure php4 ? but is it enough
>
> any additional directions will be in favour
>
> Regards, Alexiev
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?3,28263,28383#msg-28383
>
You just need to be sure that both PHP installations do not overlap each
other. So if you have PHP5 installed on /usr, then you can install PHP4
on a different prefix (/usr/local, /opt, /srv/php4)
Then running something like this should work:
/usr/local/bin/php-fpm --fpm-config /usr/local/etc/php-fpm/php-fpm.conf
I assume you have PHP5 listening on port 9000, so you have to configure
PHP4 (the fpm) to listen on a different pot, i.e. 90001, and tell nginx
you want to use that port for your PHP4 websites:
server {
...
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9001;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
Regards