PHP Module

Ok..i've installed Apache 1.3.14, and it runs... BUT...I can't figure out how to get the php-4.0.4 module to run, and i've read through the install file and EVERYTYHING, aafter about 10 attempts I pissed myself off enough to goto sleep...Can anyone suggest a place to look for a lil bit more help?
The order of operations is more of what I probably need more then anything, cause I just don't know which one to compile first, And i'm thinking that I should just be able to compile the PHP and then configure the conf file in Apache


There are a least two ways to add PHP functionality to Apache. One is as a loadable module, the other is as a static extension. I have found that following the instructions for building a static extension is much easier than building a loadable module. So, all my PHP, Apache configs use this later approach.

In this approach, the instructions are clear, but complex. You compile PHP as instructed and then instruct Apache to compile with PHP, the compile Apache. This is somewhat complex and is not something I would expect a newbie to do very easily. There are distributions which combine both PHP and Apache with a script to make it easier. You might consider finding one of these 'combined distros'.

Also, I found that the Wrok PHP book was helpful and used it for my install. (the red ones with the pictures of authors on the front).

(After I install apache and it runs)
then I can make the php module just run with it?:

1)(PHP)./configure --with-apache=home/usr/apache_1.3.14/apache ?


then goto apache dir:
3)./configure --add-module=home/usr/php-4.0.4/libphp4.a (or whatever)

5)switch to php directory, MAKE INSTALL
6)switch to Apache directory, MAKE INSTALL
then edit the httpd file.. then it should run?


You can do the make install for the PHP distro anytime. The trick is to make the PHP module and then to recompile apache to link to the PHP module you created. Then, you install apache (complete with PHP statically linked). The directions in the PHP distro were pretty straight-forward, as I recall. The PHP book just repeats the same info in the PHP distro (again, just relying on memory).

Hmm, yea i'm kinda stupid when it comes to UNIX but i'm trying to learn how to do this ... And i've gone over the "How-To's for idiots" heh.. and it still won't work..
So what your saying is "./configure THEN MAKE" the apache", then go back to PHP and make / make install that.. then just
go back to apache then re-configure it to --add-module to the php lipphp4.a then MAKE/MAKE INSTALL.. then it should work after I edit the .conf?


No. What I'm saying is to configure and make PHP, then configure and make apache with PHP, with PHP code linked. The README is very straight forward and describes this in very good detail. If you don't understand the README, then your next best bet is to go get a copy the Wrok PHP book. The book has a nice chapter on installing PHP/Apache. The install is complex and we will not be able to do it over the forum unless you dive into the supporting books and literature, sorry.

Where can I get that at? Books-a-million is that a order only book? Cause i'm gonna go look on their site..

Here is our link to the PHP book on Fatbrain:

This is the book I used to get up PHP+Apache. As I recall, I was able to get it up and running very quickly after getting the book. I think they explain in better detail than the README, plus I need the MySQL info and they have a chapter on installing MySQL as well. This forum runs on Apache with PHP and MySQL, BTW.

Thanks again Neo..

The logical next step for you is to install and enable MySQL. This can be more trickly, in many ways, as Apache+PHP. However, if you check on you will find that most PHP applications use MySQL in the background. Getting up Apache+PHP is the first step in getting up the triple-threat combo Apache+PHP+MySQL :wink: Rock-n-Roll !! I hope you build a site, go public, and "may your stock go as high as Yahoo!" ++ don't forget to sell your holdings in the $200 range :slight_smile:

When you do, please let us know and we will provide instructions to wire a small and humble $$$$ contribution to :slight_smile: :slight_smile: Electric power is getting expensive and now costs more than our ISP-DSL !! Bzzzzzzzzzzt.

OBTW: There is another secret-weapon for the bunker which energizes our marching bunny, but this device does not yet have an IP address so we can't put it on our network and serve it to forum members:

Actually, we have the Capresso 101 which is under $200 but I could not find it on Amazon :slight_smile: We got ours at the local Coffee Beanery. Without this advanced chemical weapon, we are hopelessly lost and zombied most of the time; this is the hidden-element that keeps our slave-hamsters running the site generation wheels.

[Edited by Neo on 02-11-2001 at 02:21 PM]
removed html tags for readability --oombera

i did the combo last week on two of my solaris boxes. I was able to get MySQL compiled on one, then it would not compile on the other so I packed it up and moved over the binary which worked.

as long as everything compiles ok, this is not such a bad install (the php/mysql/apache combo) - i was compiling apache with php and mod_dav modules.

However, it has been my experience that problem free compiling is a fairy tale. something always craps out! there is always something else you have to download and install, which often needs something else.

'make clean' is your friend!!

if you're interested, I have compiled some installation notes which will pretty much take one through the process of installing MySQL, PHP, DAV, and Apache.

[Edited by hotani on 02-13-2001 at 02:48 PM]