C
C
cat_crash2012-12-19 23:46:19
PHP
cat_crash, 2012-12-19 23:46:19

Installing multiple versions of php handlers for apache2

There is a production server with php 4.4.9 installed on it (these were the requirements for the current CMS) The server is spinning under Ubuntu 10.04
Now there is a need to deploy php 5.3
I did everything according to the instructions www.bsntech.com/bsntech-blog-mainmenu-321/computers- mainmenu-281/1681-install-two-versions-of-php-on-ubuntu-lucid-1004-php-53-and-php-52.html
In particular, I downloaded and installed the necessary version of PHP 5.3 in /opt/ php5.3.19
and make the corresponding config in apache:

<VirtualHost 127.0.0.1:80>
 ServerAdmin [email protected]
 DocumentRoot /var/www/new.unistar.by
 ServerName new.unistar.by
 ErrorLog /var/log/apache2/unistar_error_log
 CustomLog /var/log/unistar_custom_log combined

ScriptAlias /cgi-bin-php/ "/opt/php5.3.19/bin/"
SetEnv PHP_INI_SCAN_DIR "/opt/php5.3.19/"
AddHandler php-script .php
Action php-script /cgi-bin-php/php-cgi
<FilesMatch "\.php">
SetHandler php-script
</FilesMatch>
</VirtualHost>


but the result still gives phpinfo() when requested:
PHP Version 4.4.9

System Linux unistar 2.6.32-45-generic #100-Ubuntu SMP Wed Nov 14 10:47:49 UTC 2012 x86_64
Build Date Dec 8 2011 22: 45:06
Configure Command './configure' '--prefix=/usr' '--with-apxs2=/usr/bin/apxs2' '--with-mysql=/usr/' '--with-gd' '--with-mcrypt' '--enable-ftp' '--with-zlib-dir=/usr/lib' '--with-iconv' '--with-jpeg' '--with-gif' ' --with-jpeg-dir=/usr/lib'
Server API Apache 2.0 Handler
...

WHAT?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Cherepanov, 2012-12-20
@fear86

Once I managed to run the second version according to this instruction aboutubuntu.ru/content/php-5-2-fastcgi-php-5-3-apache2-ubuntu-10-04 , only to support pdo There are correct compilation arguments in the comments.

J
JekaRu, 2012-12-20
@JekaRu

I tried it, it should work.
Apache definitely restarted after the settings?
I used to run different versions of php either on different Apache instances, which hung on different ports, or one on Apache, the other through factcgi.

O
Oleg Maksimenko, 2016-12-16
@olegprof

Solved a similar problem. Blog post https://www.olegpro.ru/post/odnovremennaya_rabota_...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question