php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #38903 connect to the Myql server
Submitted: 2006-09-20 15:55 UTC Modified: 2006-09-21 12:39 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: cdenedelea at yahoo dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.1.6 OS: windows xp sp2
Private report: No CVE-ID: None
 [2006-09-20 15:55 UTC] cdenedelea at yahoo dot com
Description:
------------
Connection to the MySql vs. 4.1.21 server from PHP language.

Reproduce code:
---------------
<?php
echo mysql_connect('localhost', 'username', 'password');
?>

Expected result:
----------------
Resource id #2

Actual result:
--------------
Fatal error: Call to undefined function mysql_connect() in d:\Inetpub\wwwroot\phpcode\chptest\test.php on line 2


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-20 16:09 UTC] cdenedelea at yahoo dot com
Maybe the problem is for PHP? (If we analize the answer?)
 [2006-09-20 16:37 UTC] bjori@php.net
MySQL is no longer enabled by default.
See: www.php.net/mysql
 [2006-09-20 19:39 UTC] cdenedelea at yahoo dot com
So, if this is the reason, I have to re-install MySql Server? If Yes, no problem.

Once again thanks you!
 [2006-09-21 12:39 UTC] cdenedelea at yahoo dot com
Today is 9/21/06

Continue to persists the problem from yesterday.
When I installed mysql 4.1.21 and php 5.1.6 I activated 
 ;extension=php_mysql.dll  to  extension=php_mysql.dll  and  extensiom_dir = " ./"  to 
extension_dir = " D:/php/ext" (I am in D:/ not in C:/) .

After I checked and I did all you told me (I did and the extension ;D:\php) continue to persists the message: "Fatal error: Call to undefined function mysql_connect() in
d:\Inetpub\wwwroot\phpcode\chptest\test.php on line 2
" at the code: "<?php echo mysql_connect('localhost', 'username', 'password'); ?>".

What I have to do to elimine the error?

The Bug# is: #38903.

Best Regards,

Cristian Nedelea
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 00:01:27 2024 UTC