Re: Problems with PHP and MySQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



disregard if you've already done this...

you might want to do a quick php app with phpinfo, to determine if/what version of mysql php sees.. it's quite possible that php isn't seeing/interfacing with mysql. 

php needs to not only be built with a version of mysql, but the php.ini file also needs to be setup correctly.

-bruce


-----Original Message-----
From: Jochem Maas <jochem@xxxxxxxxxxxxx>
Sent: Feb 5, 2005 8:46 AM
To: Sarah <weregirl@xxxxxxxxxxxxxxxx>
Cc: php-general@xxxxxxxxxxxxx
Subject: Re:  Problems with PHP and MySQL

Sarah wrote:
> Hi,
> 
> I'm relatively new to PHP, but have already written a few functional 
> web-based scripts. I recently decided to implement a MySQL-based system, 
> but hit the following problem...
> 
> I have PHP version 5.03, and MySQL v 4.19. I downloaded and compiled 
> both, and both work perfectly alone. However, when I run a command-line 
> app to manipulate my database, I get the following error:
> 
> __________________________________________________________________________
> veep@tinsel:~# ./useradmin -a -u unclebulgaria -p uberwomble
> constructor called
> 
> Fatal error: Call to undefined function mysql_connect() in 
> veep/useradmin on line 16
> 
> Fatal error: Call to undefined function mysql_close() in /veep/useradmin 
> on line 22
> veep@tinsel:~#
> __________________________________________________________________________
> 

I _think_, given the version of MySQL you are using, you should compile in
and use the mysqli extension iso of the mysql extension.
	         ^----!

these to links may help you:

http://www.zend.com/php5/articles/php5-mysqli.php
http://be.php.net/mysqli

failing that you might want to check this page for an overview of funcs you
can use to determine exactly what is available, with more accuracy than phpinfo()
e.g.:

var_dump( extension_loaded("mysql"),
	  extension_loaded("mysqli"),
	  get_loaded_extensions(),
	  get_extension_funcs ("mysql"),
	  get_extension_funcs ("mysqli") );	

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux