Trouble with Apache, PHP, pear

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
When I installed Mandrake 10.0 I thought I had Apache, PHP, and MySQL
installed correctly. I could serve web pages, MySQL worked, and when I
tried the phpinfo() function, I got a page that looked OK. I could
create simple php pages and serve them up. Then I tried to install
pear, and things started to be not OK after all.

phpinfo() told me that the 'Configure Command' had both the following
in it:


So I tried to install pear manually, and when I tried the command:

$ lynx -source / | php

I got the following response:

bash: php: command not found

I went looking for the executable so I could run it from that
directory, and I couldn't find it anywhere.

I apparently have the following rpms installed:


Also the following php-related rpms:


When I use rpmdrake to search for other packages to install, I see the
following choices:


There are a bunch of other php modules available, but I don't think I
need them right away.

Here's my question: Should I just uninstall Apache and reinstall it,
then install php and pear? Should I compile Apache myself? If I do
that, I'm not sure of all the configuration options I should choose.
Or should I just install the new rpms that I think I want, and
rpmdrake will make everything work nicely together?

Sorry if this is too Mandrake-centric, but I'd like to use RPMs if
possible, I'm hoping that makes it easier to upgrade in the future.

Thanks,  Ron

Re: Trouble with Apache, PHP, pear

Quoted text here. Click to load it

Have a go at installing manually, I did Apache 2.0.50 & php 5.0.0 yesterday
from source and it all compiled and installed smoothly. I was even able to
add in stuff that Mandrake leaves out such as curl.

Bare in mind that Mandrake offers apache 1 & 2 so mod_php shouldn't be
installed. You'll need to install the php-pear stuff for pear.

Re: Trouble with Apache, PHP, pear

Quoted text here. Click to load it

I assume I should uninstall everything I have now and start from
scratch? Could I at least keep Apache, which is otherwise fine?

Quoted text here. Click to load it

Could you please explain this further? My Apache book tells me that
there are 3 ways to install php: 1) shared module with apxs, 2) static
module, and 3) CGI binary. How can I tell which I have. I'm pretty
sure it's not CGI.

Thanks,  Ron

Re: Trouble with Apache, PHP, pear

Quoted text here. Click to load it

No, the Mandrake version of Apache is still in it's original position and
can be run.

When you run the configure script use ./configure --prefix=/usr/local and
that'll build apache well away from your existing install.

This should give you pretty much the same as Mandrake installs (I've added

../configure --prefix=/usr/local --with-apxs2=/usr/local/bin/apxs --with-mysq
--with-curl=/usr/local --with-gd=/usr --with-gd-native-ttf --enable-discard-
path --disable-force-cgi-redirect --enable-shared --disable-static --disable
-debug --disable-rpath --enable-pic --enable-inline-optimization --enable-me
mory-limit --with-pear=/usr/share/pear --enable-magic-quotes --enable-debugg
er --enable-track-vars  --with-versioning --with-mod_charset --with-regex=ph
p --enable-trans-sid --enable-safe-mode --enable-ctype --enable-ftp --with-g
ettext=/usr --enable-posix --enable-session --enable-sysvsem --enable-sysvsh
m --enable-yp --with-openssl=/usr --without-kerberos --with-ttf --with-freet
ype-dir=/usr --with-zlib=/usr --with-zlib=/usr --with-zlib-dir=/usr --with-p

Quoted text here. Click to load it

Apache 2 with php is not yet considered stable enough for production sites.
So Mandrake are hedging their bets by including Apache 1 and 2 in the
distribution. The mod_php package is for running php with apache 1.

Site Timeline