Click to See Complete Forum and Search --> : Best way to install php?


joelmon
10-20-2001, 05:49 PM
I use a cobalt cube 3 and it is not installed, I noticed php.net doesn't offer for linux (Or so they said) and I was wondering if any .pkg files are avail (to use in the admin console) or any other ways
(sources to download) php and install it on the machine?

Thanks

Strike
10-20-2001, 06:56 PM
Of course they offer it for Linux - that's what the source code is for. They just don't want to bother packaging it for different distros because the distros themselves will do it (and probably do a better job of it). What distribution of Linux do you use?

joelmon
10-20-2001, 07:09 PM
Cobalt Linux release 5.0 (Pacifica)
Kernel 2.2.14C10 on an i586

david
10-20-2001, 08:32 PM
I've never worked with Cobalt at all, but you should just have to compile it.

su to root.
download the source. open a console window, cd to the dir where it's downloaded. unpack it, cd to the new dir it creates, then:
./configure --help (this will show you all of the compile options.)
./configure --with-apxs=/path/to/apxs --with-mysql (this will configure it to compile as an apacke module, and compile in mysql. your needs will probably be different though)
make && make install


now, whenever I've compiled PHP for Apache, it sets it up automatically in apache's httpd.conf. keep an eye on what the last few lines of the "make install" say. it should tel you where it's putting the php module. libphp4.so, IIRC. when PHP sets up apache, or at least tries to, it puts the path to that module in wrong. So if apache won't restart after you compile, then it's probably that.

this is, assuming you are actually using apache :)