PHP won't work with MySQL: help!

Rob Schumann yellowdog-general@lists.terrasoftsolutions.com
Tue May 7 18:25:00 2002


Hi,

On 07-05-2002 Kimball Larsen wrote:

 > The php build that comes with YDL 2.2 is broken.  In order to
 > make mysql work with it correctly, you will need to build your
 > own php.  In my case, I am going to go a step farther and build
 > my own mysql, apache, and php.

I had the same problem a couple of days ago and raised the question on linuxppc-user list. The solution (which works) does not require a rebuild of php, rather all you need do is edit the /etc/php.ini file.

About 2/3 down this file are places to define

extension_dir and extension

Change these to

extension_dir /usr/lib/php4

extension mysql.so

You can also add the other extensions found in the same directory, if you are nee3ding to use them

extension imap.so
extension ldap.so
extension odbc.so
extension pgsql.so

That's it. Save the new file as /etc/php.ini and restart httpd

service httpd restart

And you now have a working apache+php+mysql

Enjoy

Rob