Click to See Complete Forum and Search --> : mysql not recognized


oopsi8abug
11-17-2005, 03:13 PM
Hi,

I'm having trouble getting php to work with mysql. I can access mysql at the command line but not via php.

I've got php configured with mysql. But there's no mysql section in the phpinfo file.

'./configure' '--enable-magic-quotes' '--enable-safe-mode' '--with-png-dir=/usr/include' '--with-config-file-path=/sav/conf' '--with-mcrypt=/usr/local/bin' '--with-regex=php' '--with-mandir=/usr/share/man' '--with-curl=/usr/share' '--with-mhash=/usr/include' '--with-pear=/usr/local/bin' '--with-openssl' '--with-mysql=shared,/usr/share' '--with-mysqli=shared' '--with-tiff-dir=/usr' '--with-zlib=shared,/usr' '--enable-gd-native-ttf' '--with-gd=shared,/usr' '--with-ttf=/usr' '--with-freetype' '--with-jpeg' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-include-path=/usr/lib/php' '--with-extension-dir=/usr/local/lib/php/extensions/no-debug-non-zts-20041030'

I've tried reinstalling php and mysql. I've installed the mysql libraries but still nothing.

I'm running Linux (Trustix 2.4) and the latest versions of php and mysql.

Can someone point me in a possible direction to look for problems.

thanks

mmonaco
11-18-2005, 09:36 PM
Create a simple page like this:

</php
phpinfo();
?>


There should be a heading for MySQL. If not be sure to add this line to your php.ini file in the extensions section

extension=php_mysql.dll

That file, along with libmysql.dll should be places in your system32 directory (for ease). There are other folders where they will be found but system32 is the easiest.

oopsi8abug
11-18-2005, 10:03 PM
There's no mysql section in my phpinfo() file.

The rest would be excellent advice if I was running Windows but I'm running Linux. I appreciate the response though.

drew010
11-18-2005, 10:31 PM
if you are configuring php4, try removing the switch
'--with-mysql=shared,/usr/share'
it comes bundled with php 4.
if you want to use the binary you have installed yourself, try --with-mysql=/path/to/mysql
rather than using the shared and the , notation