cabzzz
February 3rd, 2012, 10:39 PM
Hi,
I am trying to find a way to install and configure apache2 along with php4. Apache2 is already installed.
The reason why I want php4 is because I'm working on a project that cannot be upgraded right now, so I have to stick with this old php version. We already have hosted & managed servers that works with that version of php, but I can't speak with them directly. This is to setup a local dev server.
Now, here's what I did :
apt-get install flex
wget http://uk.php.net/distributions/php-4.4.9.tar.gz
tar zxf php-4.4.9.tar.gz
cd php-4.4.9/
./configure
make
sudo make install
sudo cp sapi/cli/php /usr/bin/php4
sudo cp sapi/cgi/php /usr/lib/cgi-bin/php4
a2enmod rewrite
sudo a2enmod actions
sudo /etc/init.d/apache2 restart
After a reboot, when I type "php -v", it shows me PHP4.4.9 (woohoo!)
But my problem is that is doesn't seem to consider .htaccess correctly. I tried to turn on the option AllowOverride All, without any success. And I can confirm the .htaccess is working on hosted servers.
Is there an easier way to install php4, libapache2-mod-php4 with apache2 ? Or is there a way to make sure the .htaccess works.
Sorry if it misses some informations. I'm fairly new to Linux, Apache and PHP, I'm just trying to understand all of that in a really short time.
Thanks to all ! :)
I am trying to find a way to install and configure apache2 along with php4. Apache2 is already installed.
The reason why I want php4 is because I'm working on a project that cannot be upgraded right now, so I have to stick with this old php version. We already have hosted & managed servers that works with that version of php, but I can't speak with them directly. This is to setup a local dev server.
Now, here's what I did :
apt-get install flex
wget http://uk.php.net/distributions/php-4.4.9.tar.gz
tar zxf php-4.4.9.tar.gz
cd php-4.4.9/
./configure
make
sudo make install
sudo cp sapi/cli/php /usr/bin/php4
sudo cp sapi/cgi/php /usr/lib/cgi-bin/php4
a2enmod rewrite
sudo a2enmod actions
sudo /etc/init.d/apache2 restart
After a reboot, when I type "php -v", it shows me PHP4.4.9 (woohoo!)
But my problem is that is doesn't seem to consider .htaccess correctly. I tried to turn on the option AllowOverride All, without any success. And I can confirm the .htaccess is working on hosted servers.
Is there an easier way to install php4, libapache2-mod-php4 with apache2 ? Or is there a way to make sure the .htaccess works.
Sorry if it misses some informations. I'm fairly new to Linux, Apache and PHP, I'm just trying to understand all of that in a really short time.
Thanks to all ! :)