简体   繁体   中英

Apache 2.2.20 + PHP 5.2.6 installation

I need to install PHP 5.2.6 on Apache 2.2.20 (UBUNTU 11.10) (local server).
I've already install Apache, now I want to install PHP but there is a problem :

I've downloaded php-5.2.6.tar.gz, gunzip it, tar -xvf it, then in the instructions, I've to run ./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql , but I don't have dir named apxs.
So I've tried to run ./configure --with-mysql , it's works.
Finally, I've to run make and make install in my php-5.2.6 folder, but I've an error :
make: *** Pas de cibles spécifiées et aucun makefile n'a été trouvé. Arrêt.
(In english : ~ there is no makefile. stop)


Please help ! I really need this version of PHP, is there something wrong in my steps ? Is there a better way to install PHP 5.2.6 on Apache 2.2.20 ?
Thanks.

If you have installed apache2-threaded-dev the apxs are not part of the package, you need to uninstall it and install prefork to have apxs2 :

sudo apt-get remove apache2-threaded-dev
sudo apt-get install apache2-prefork-dev

That should do the trick. Then just do your standard PHP compile. Not even sure you need to specify apxs2 folder to PHP.

If you get the "aucun makefile n'a été trouvé" error, that means your ./configure failed. If so, please copy the last lines of your ./configure here.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM