I tried to install PHP 4.0.0 and then PHP-3.0.16 but failed both the times. I am working on i386/ Caldera Linux 2.2.14
My apache server (1.3.11) is working alright.
I tried both the rpm and gz install packages.

Hi!
I just installed PHP 4.0 and Apache on WinLinux (it's a Slackware-based distribution) and it went all right. First of all, after you followed those instructions, you should have run ./configure in the apache dir (which in your case is in the same folder as php). The configure should be run with --prefix=PATH parameter (but it's not required) and -this is important- --with-php-something (I don't remember, it's something about the yet unexistant php.h script - DO CHECK the INSTALL document in the php dir). After you make and make install the apache, you need to change into the apache dir (/usr/local/apache by default), go to conf dir and change the httpd.conf as indicated in the INSTALL doc from the PHP dir. Also you may uncomment the server location (127.1.1.1 or something is default, change to 'localhost' to remember more easily). Change into bin (../bin), run apachectl start. Fire up Netscape, type localhost/path-to-your-script.php(3 - for php 3). The script should exist in your htdocs dir under /usr/local/apache).

The best you can do is just follow all the directions in the PHP install documentation supplied with the package .tar.gz.

(3) cd back to Apache directory (Now you will recofigure and compile). Enter # ./configure --activate-module=src/modules/php4/libphp4.a (and any other configuration options you want)
# make
# make install

That should do it ;-)

P.S. I noticed someone (above) was answering at the same time I was. He is right about fixing the httpd.conf file (uncomment the Loadmodule line for PHP, search for and uncomment other lines related to php, and add .php to the DirectoryIndex list), but you must follow the order I describe above first.

Thanks for replying to my query. I tried it again but I get an error when I execute the "make" command.
The error is
Makefile:34: /build/rules.mk: No such file or directory
Makefile:35: /build/library.mk: No such file or directory
Makefile:36: /build/program.mk: No such file or directory
make: *** No rule to make target `/build/program.mk'.

Incidentally when I ./configure the php-4.0.0 then I do not get any file by the name of Makefile. Instead I get Makefile.in
the make command doesn't work with this setup. SO I copied Makefile.in to Makefile and then tried "make" which resulted in the error above.

<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by freebsd:>>Makefile:34: /build/rules.mk: No such file or directory
>>Makefile:35: /build/library.mk: No such file or directory
>>Makefile:36: /build/program.mk: No such file or directory

If you cd to /build directory, can you see those files?

Okay, once again.
1) tar -zxvf php-4.0.0.tar.gz
when you run this, /build and its contents are the very first directory that get uncompressed.

2) cd php-4.0.0
Make sure you cd to php-4.0.0, if you don't, of course /build will not be found.

3) Run ./configure, then a Makefile will be created. Never copy Makefile.in to Makefile yourself.

Hi freedbsd,
Thanks for your tip. Earlier I had placed the tar file in tmp/download
I moved it out and then executed the steps. Now I was able to make, make install and configure.
Is there a commandline test to check whether php is working with apache? I tried a test script but that is not working.
Thanks

>>I tried a test script but that is not working.
Try this:
#test.php4 (with just a single line in it)
<? echo "Hello World"; ?>

place it in your public_html directory. If it prints just:
Hello World
then it's working.
If it prompts you with a "save as" window, then you forgot the "step 13" at http://www.devshed.com/Talk/Forums/F...ML/000020.html
If it prints:
<? echo "Hello World"; ?>
check "step 11" and "step 12"

>>Any thoughts on whether Apache is any more efficient with the compile method

Yes technically but not significantly. For fresh install, it's better to go with compile method if one has no plan to add additional modules. There are just plenty of new born modules out there in this fast-pace-changing internet world. It's a pain to recompile over and over again for each additional modules.

Further, I supposed this is more like a newbie forum and most of us have the mind of experiencing something or test-drive something new to them far more than wanting to run something alone permanently. I suggest the apxs method over the compile method so they can install additional modules like: mod_perl, mod_jserv, mod_dtcl, mod_python, mod_frontpage and etc in an eaiser way.