I am trying to compile PHP from source with the MySQL extension as a shared library. The instructions provided by ./configure --help say:
--with-mysql=DIR Include MySQL support. DIR is the MySQL base directory.
However, I have no idea what they mean by MySQL base directory! Is this the directory where the mysql client executable is? (e.g. on my machine /usr/bin). Or do they mean where the shared libraries (i.e. libmysqlclient.so and libmysqlclient_r.so) are located (e.g. on my machine /usr/lib)? Or some other place? I have tried several locations, but still when I try to use the compiled version of php I get the errors like:
Call to undefined function mysql_connect()
Please help! Thanks in advance.
As the ./configure –help says it is the “DIR is the MySQL base directory.
Which would be the directory where MySQL was installed, in my case: /usr/local/mysql
You can try:
And look for the “basedir” config value