Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

UPDATE

I Asked this over on StackOverflow as I hadn't got any answers on here at the time. Here's the link to the answers for completeness' sake. I'll like that page back over here once I've tried Dan C's solution below.


ORIGINAL

A while ago a large client of ours moved to a single hosting provider who spec'd out a software environment which would be consistent accross all the live servers.

Amongs other things this includes Apache 2.2.8 and PHP 5.1.6.

We had an ubuntu 8.04 server for development and these versions of Apache and PHP are not the default installed. So I had to compile them from source. These versions have happily been running for over a year now.

We're starting a new site build and we want to use ZendFrameword which requires PDO_MySQL.

I've tried recompiling with the following...

./configure --with-apxs2=/usr/local/apache2/bin/apxs \
--with-config-file-path=/user/local/apache2/conf/php.ini \
--with-curl=/usr/lib/ --with-mysql=shared --with-mysqli=shared \
--with-zlib --with-gd --with-jpeg-dir=/usr/local/lib/ \
--with-freetype-dir=/usr/lib/ --enable-soap --enable-pdo=shared \
--with-pdo-mysql=shared --with-sqlite=shared
...
make
...
make install
...
libtool --finish /sources/php-5.1.6/libs

Which all works fine, and when I bring apache back up, it shows me the new ./configure in the phpinfo().

After doing this MySQL stops working, the MYSQL section disappears and msyql stops working.

The make, make install, libtool... puts the *.so files in

/usr/local/lib/php/extensions/no-debug-non-zts-20050922

The configure I have used previously which enabled MySQL but not PDO is

./configure --with-apxs2=/usr/local/apache2/bin/apxs \
--with-config-file-path=/user/local/apache2/conf/php.ini \
--with-curl=/usr/lib/ --with-mysql --with-mysqli \
--with-zlib --with-gd --with-jpeg-dir=/usr/local/lib/ \
--with-freetype-dir=/usr/lib/ --enable-soap

I'm not a massive *nix person, can anyone tell me where I'm going wrong.

Thanks

share|improve this question

1 Answer 1

up vote 1 down vote accepted

First:

You have an extraneous "e" in your --with-config-file-path flag.

If the typo's in your real configure too then it could be a cause of your problem.

Second:

PHP needs to know where to load the extension from.

You can tell it to search the directory you've noted by editing your php.ini as follows:

extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20050922/"

Just of note:

Backslashes are the common notation for line continuations.

Your shell will interpret them safely if you copy/paste a command to the terminal.

share|improve this answer
    
Thanks for the backslashes tip. Also, good spot on the "user" and I'll give the extension_dir a whirl. –  Greg B Jul 23 '09 at 10:05

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.