yshua Posted October 5, 2012 Share Posted October 5, 2012 Dear Folks: Have some programs needing MySQL version 5.1.65 on Win 7, Apache2.2 server, PHP5.3.8, but the mysql_connect, $mysql = mysql_connect("localhost", "root", “mypassword”); if (!$mysql) { die('Could not connect: ' . mysql_error()); } keeps getting following error: Fatal error: Call to undefined function mysql_connect() in C:\Program Files (x86) \Apache Software Foundation\Apache2.2\htdocs\includes\db.php on line 19 So my mysql_connect() is failing. Have tried various php.ini entries for Windows such as, extension=msql.dll , ( Am unsure what other Windows extension applies above, but ready to try any) Here are mysql extensions filled out: [MySQL] mysql.allow_local_infile = On mysql.allow_persistent = On mysql.cache_size = 2000 mysql.max_persistent = -1 mysql.max_links = -1 mysql.default_port = 3306 mysql.default_socket = mysql.default_host = 'localhost' mysql.default_user = 'root' mysql.default_password = 'mypassword' mysql.connect_timeout = 60 mysql.trace_mode = Off What else could be causing the Fatal error? Also, do you have to reinstall any time you change any of those entries? Thanks, Yshua Link to comment https://forums.phpfreaks.com/topic/269094-needing-mysql5165-for-compatibility-and-mysql_connect-fails/ Share on other sites More sharing options...
Barand Posted October 5, 2012 Share Posted October 5, 2012 the one you need is extension=php_mysql.dll but you would be better advised to use mysqli instead as mysql is obsolete. Link to comment https://forums.phpfreaks.com/topic/269094-needing-mysql5165-for-compatibility-and-mysql_connect-fails/#findComment-1382763 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.