NYCPHP Meetup

NYPHP.org

[nycphp-talk] setting up AMP w/ RH 9.0

Hans Zaunere zaunere at yahoo.com
Sat Jun 14 14:45:32 EDT 2003


--- David Mintz <dmintz at panix.com> wrote:
> 
> Hello
> 
> I've been hacking PHP for a while but I am a RedHat system administration
> rookie, trying to migrate from Windows 2K (tho I sometimes wonder why).
> The goal here is get a development machine working, and serve some
> personal stuff to the world just for kicks.
> 
> This RH9 comes with Mysql 3.32.56 and Apache 2.0.40 and PHP 4.2.2 right
> out of the box and everything appeared fine at first. Then I tried
> connecting to a mysql database with PEAR.

Heh, that's an evil combination of versions - bad RedHat, no bone.

> Spent a couple hours going crazy wondering why pear kept saying "DB
> extension not found", messing with include_path() and require()  and so
> forth till I finally decided, hey, try connecting to mysql the traditional
> way. Guess what:
> 
> Fatal error: Call to undefined function: mysql_connect() in ....
> 
> Then I recalled again that people say apache 2.x has security as well as
> compatibilty problems (while The Apache folks tells us 2.x is the latest
> and greatest).

There are certainly stability/sanity issues with apache 2.x (IMHO anyway). 
I've had success compiling everything from source, but wouldn't want to do it
again.

> So here's the question (thanx for your patience): what do you experienced
> and wise folks recommend as a general strategy for this? Upgrade PHP or
> downgrade Apache? Build either or both from source, or get RPMs somewhere?

If you want the full ecstasy of AMP, I'd downgrade Apache to 1.3, upgrade PHP
to the latest, and install mysql.com's binary package of 4.0.13.  Personally,
I always like to compile everything from source (except MySQL) but if you can
find the proper RPMs then it'd probably work just as well.

That said, your specific problem is related to the versions so much as it is
the RPM packages.  For whatever reason, the PHP package doesn't seem to be
loading the MySQL extension.  Check your php.ini to ensure that it's getting
loaded somewhere (although I have no idea why RH wouldn't just compile it in
staticly).

H




More information about the talk mailing list