LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Recomplie PHP from srpm on redhat 9 (https://www.linuxquestions.org/questions/linux-newbie-8/recomplie-php-from-srpm-on-redhat-9-a-144861/)

devil_flake 02-11-2004 10:54 AM

Recomplie PHP from srpm on redhat 9
 
Ok... I haven't used rpm all that much, and I need to recompile PHP on my redhat 9 box with some option changes. The man pages are not giving me what I need and the info is either absent from the redhat site or buried under the weight of their removal of support.

First, where's a good place to get the latest PHP srpm's (oddly enough, I'm having trouble finding anything later than php 4.2.2)?

Second, I need a very brief walkthrough on installation and configuration. How's it done? And, most importantly, what is the best way to edit the option flags for installation (I need to insert --enable-pcntl)? Do I install first and recompile using an edited .spec file or can I edit the specs on the front end?

Help...

Wynd 02-11-2004 12:21 PM

If you're compiling from source you could do it using the tarball from the PHP website (http://us2.php.net/get/php-4.3.4.tar.gz/from/a/mirror). Go to the directory, and type 'tar xzf php-4.3.4.tar.gz'. This extracts all the files into a folder called php-4.3.4. Now, type these commands:
Code:

cd php-4.3.4
./configure --enable-pcntl
make
make install

The ./configure line tells it what options you want PHP to have. Make compiles it and make install installs it. If you want to make an RPM out of it, get checkinstall (http://asic-linux.com.mx/~izto/check...5.3-1.i386.rpm), install that, and type 'checkinstall' instead of 'make install' and choose RPM when it asks you. Either way, you need to be root to install stuff. Hope this helps :)

devil_flake 02-11-2004 01:22 PM

Quote:

Go to the directory, and type 'tar xzf php-4.3.4.tar.gz'. This extracts all the files into a folder called php-4.3.4. Now, type these commands:
That's what I tried originally without success. I am working on a redhat 9 box, and I cannot seem to update PHP. I feel like a complete moron at this point. I am using apache2, and php is installed as a module. I cannot figure out where to put PHP... The installation procedure works, but it simply makes a new instance of php. It does not replace the operative version... at least I think that's what happens

I want to upgrade from PHP 4.2.2 to 4.3.3 with process control enabled on my redhat machine. I can't find the information I need anywhere. I have tried everything I can think of. Does anyone know the solution to this... My hair is about to be pulled from my head.

Thanks in advance.

Wynd 02-11-2004 10:48 PM

You say it just makes a new instance of PHP. Are you sure you removed the old one?


All times are GMT -5. The time now is 09:43 PM.