note 34238 added to install.unix
| From: | jan dot mentzel at raumcomputer dot com | Date: | Sat, 19 Jul 2003 10:01:24 +0000 |
| Subject: | note 34238 added to install.unix | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-52378@lists.php.net to get a copy of this message | ||
PHP-5.0.0b1 and MySQL on SuSE
Since in this PHP-release mysql-client stuff is not included you have to use your own mysql-client
header- and .so-files.
configure expects the mysql-client-files to be in an include and a lib subdirectory inside one
common directory:
...
+- mysql
+- include
| +- mysql.h
| ...
+- lib
+- libmysqlclient.so
...
But on SuSE8.0 - maybe other Linux-distros too - the mysql-include and mysql-lib directories are
installed like this:
usr
+- include
| +- mysql
| +- mysql.h
| ...
+- lib
+- mysql
+- libmysqlclient.so
...
Efect/Problem:
./configure --with-mysql=/usr/lib/mysql ...
or
./configure --with-mysql=/usr/include/mysql ...
ends with an error:
checking for MSSQL support via FreeTDS... no
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... no
checking for mysql_close in -lmysqlclient... no
checking for mysql_error in -lmysqlclient... no
configure: error: mysql configure failed. Please check config.log for more information.
Solution:
Create a directory "mysql" e.g. in /usr/local/lib
mkdir /usr/local/lib/mysql
and create symlinks "include" and "lib" pointing to the original directories
(here /usr/include/mysql and /usr/lib/mysql)
cd /usr/local/lib/mysql
ln -s /usr/include/mysql include
ln -s /usr/lib/mysql lib
Now, go back to where you extracted the PHP-source and call configure again, telling it to search in
/usr/local/lib/mysql for the mysql-client stuff.
./configure --with-mysql=/usr/local/lib/mysql ...
Now the mysql-extension should compile.
----
Manual Page -- http://www.php.net/manual/en/install.unix.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34238
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34238&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34238&report=yes