|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #50061 5.2.11 doesn't reconize mysql_connect function
Submitted: 2009-11-03 11:18 UTC Modified: 2009-11-03 13:04 UTC
From: lunaelipsis at hotmail dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.2.11 OS: Windows 7
Private report: No CVE-ID: None
 [2009-11-03 11:18 UTC] lunaelipsis at hotmail dot com
I encountered the known issue of the "Fatal error: Call to undefined function mysql_connect()" with PHP 5.2.11 runnnig Apache 2.2 on Windows 7 connecting to distant MySQL 5 database.

What i did to try to resolve it :
Checked that C:\PHP was in windows PATH variable
Checked that libmysql.dll was present 
Checked that php_mysql.dll was present
Checked that extension=php_mysql.dll was uncommented

Ran cmd.exe -> php -m 
it shown every module loaded with php including MySQL.

Reproduce code:
Install PHP 5.2.11 on Windows 7 with Apache 2.2 and do the required configurations to use mysql. 

Expected result:
PHP doesn't reconize any mysql_* functions

Actual result:
I reinstalled php and it worked directly.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-11-03 13:04 UTC]
You certainly use two different php for CLI (php -m) and apache. Verify that the php.ini loaded by the apache's php is the same than cli.

But there is no bug here, it is a configuration problem.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Jul 24 18:01:29 2024 UTC