views:

50

answers:

2

Hi for my research, i modify the c code that makes the php ( not the code that is written with php but that which actually makes php ). I want some way of compiling it and making it work with apache.. How do i do that?

+1  A: 

Grab a tarball of PHP source, and untar it.

Make sure you can compile it. See the INSTALL file from the tarball. The basic process is the typical:

./configure --with-some-options...
make
make install

That you're probably familiar with if you've ever compiled software from source on linux.

Make whatever changes you'd like to the source.

Compile again, using the same steps.

timdev
+2  A: 

The manual is your friend:

http://www.php.net/manual/en/install.unix.apache2.php

./configure --with-apxs2=/usr/local/apache2/bin/apxs --other-options
make
make install
Wrikken
I have been trying this for quite sometime..I have been trying this for quite sometime.. I get the error"Sorry, I cannot run apxs. Possible reasons follow: 1. Perl is not installed 2. apxs was not found. Try to pass the path using --with- apxs2=/path/to/apxs 3. Apache was not built using --enable-so (the apxs usage page is displayed)"
Karthick
locate apxs returns the following results"/usr/share/doc/apache2-doc/manual/de/programs/apxs.html/usr/share/doc/apache2-doc/manual/en/programs/apxs.html/usr/share/doc/apache2-doc/manual/es/programs/apxs.html/usr/share/doc/apache2-doc/manual/fr/programs/apxs.html/usr/share/doc/apache2-doc/manual/ja/programs/apxs.html/usr/share/doc/apache2-doc/manual/ko/programs/apxs.html/usr/share/doc/apache2-doc/manual/pt-br/programs/apxs.html/usr/share/doc/apache2-doc/manual/tr/programs/apxs.html"
Karthick
Have you either build apache yourself, or installed an apache(-src/-devel) package? Have you installed Perl?
Wrikken
i did apt-get install apache2 for installing apacheI have not installed perl
Karthick
Install either the devel/src/dev package of aapache (I'm not sure how it would be called in your distro), and install `perl`
Wrikken
Hey Wrikken.. I don know why.. but the latest version(php-2.3.6) of php didnt work for me.. when I tried php-2.3.5 everything was fine..THanks
Karthick