FRIHOSTFORUMSSEARCHFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Trouble using PHP5 with mysql

 


abhinav_shah
I recently installed PHP5 and when I run a php script it gives me an error :
PHP Fatal error: Call to undefined function mysql_connect()
I'm using Mysql server 5.0
Please help me out...
ml
MySQL is no longer enabled in PHP 5 by default, so the php_mysql.dll DLL must be enabled inside of php.ini. Also, PHP needs access to the MySQL client library. A file named libmysql.dll is included in the Windows PHP distribution and in order for PHP to talk to MySQL this file needs to be available to the Windows systems PATH. See the FAQ titled "How do I add my PHP directory to the PATH on Windows" for information on how to do this. Although copying libmysql.dll to the Windows system directory also works (because the system directory is by default in the system's PATH), it's not recommended.

As with enabling any PHP extension (such as php_mysql.dll), the PHP directive extension_dir should be set to the directory where the PHP extensions are located. See also the Manual Windows Installation Instructions. An example extension_dir value for PHP 5 is c:\php\ext

Note: If when starting the web server an error similar to the following occurs: "Unable to load dynamic library './php_mysql.dll'", this is because php_mysql.dll and/or libmysql.dll cannot be found by the system.
abhinav_shah
Thanx Man. I tried it and it worked. Thanx a lot...
Related topics

Trouble connecting to MySQL
Trouble using the Gallery 2 pre-installer
PHP5 MySQL Config on XP
quick question about mysql but quite urgent!
Suppressing mysql error

Which book is best for beginner of PHP and MySQL?
PHP5!
Using PHP "OR" Logical Operator
MySQL Tools
Photoshop tutorial

Wow.
can't access local mysqlserver. help plz!
[MySQL (& php)] += in SQL?
CSS Problems + Cache control
SELECTing from MySQL with PHP
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.