php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47512 can't connect to mysql
Submitted: 2009-02-26 18:16 UTC Modified: 2009-02-26 18:32 UTC
From: dnguyen at stewleonards dot com Assigned:
Status: Not a bug Package: IIS related
PHP Version: 5.2.8 OS: window server 2003
Private report: No CVE-ID: None
 [2009-02-26 18:16 UTC] dnguyen at stewleonards dot com
Description:
------------
i'm trying to set up php,mysql and i can't get it to work. i can create table and user name fine in mysql. i can do phpinfo() fine. but when i try to have connection to mysql from php, it keeps giving me an error saying php has encountered an access violation at 01b0ac5a
can you help.

Reproduce code:
---------------
<?php
$db_server='localhost';

$db_user='test_user';
$db_password='test_password';

$db_name='test';
$connect_test = mysql_connect("$db_server", "$db_user", "$db_password") 
  or die("Unable to connect to the database!");
print "The connection to the \"$db_name\" database was successful.";
?>

Expected result:
----------------
the connection to test database was successful.
or unable to connect to the database

Actual result:
--------------
the connection to test database was successful.
or unable to connect to the database

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-02-26 18:32 UTC] pajoye@php.net
Do not use mysql 5.1 dlls with PHP (see other bugs report for an explanation).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 29 08:01:32 2024 UTC