php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36193 Can't connect to MySQL
Submitted: 2006-01-28 21:02 UTC Modified: 2006-01-29 09:24 UTC
From: anishxt at gmail dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.1.2 OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: anishxt at gmail dot com
New email:
PHP Version: OS:

 

 [2006-01-28 21:02 UTC] anishxt at gmail dot com
Description:
------------
I was using the PHP 4.3.4 with MySQL 5.0.15. There was no problem with PHP when connecting to the MySQL using 

mysql_connect(($dbhost, $dbusername, $dbuserpass);

But, after installed the PHP 5.1.2, I can't connect to MySQL using the same command:

mysql_connect(($dbhost, $dbusername, $dbuserpass);

which would prompt an error:

"Call to undefined function mysql_connect()"

Reproduce code:
---------------
mysql_connect(($dbhost, $dbusername, $dbuserpass);

Expected result:
----------------
Successful connection to MySQL 5.0.15

Actual result:
--------------
Call to undefined function mysql_connect()in line 12

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-28 21:36 UTC] helly@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

How about  installing ext/mysql or using ext/mysqli?
And RTFM
 [2006-01-29 09:24 UTC] anishxt at gmail dot com
OoopS! I am very sorry. You was right. It wasn't a bug. I didn't configure the extension_dir in the php.ini file. And I didn't put the libmysql.dll into the system32 dir. 
Now it is working smoooooooothly! :)
Thank you for spending your time with my problem.
 
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Jan 31 21:05:54 2023 UTC