Home

Debian Sarge and php4-mysql

2006/08/09

I was bitten by this lately, so I post it here as a hint (it may bite you too):

You use apt on your Debian/Sarge to install apache2, mysql, php4 and of course you also install php4-mysql. One should expect that after:

apt-get install php4-mysql

you can connect immediately from your php script to a MySQL database. Calling simply phpinfo() will prove you wrong because of a minor detail: You must add the following line

extension=mysql.so

at /etc/php4/apache2/php.ini and then issue an apache2ctl graceful .

Now you are OK.

Advertisements

One Response to “Debian Sarge and php4-mysql”

  1. cess Says:

    Thanks for the tip, sometimes the easiest turn into a problem, I hoped apache would re-read php.ini with apache2ctl -k restart -t, but it didn’t.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: