dbTalk Databases Forums  

Getting mySQL to connect in PHP (.ini related?)

mailing.database.mysql-win32 mailing.database.mysql-win32


Discuss Getting mySQL to connect in PHP (.ini related?) in the mailing.database.mysql-win32 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
LRW
 
Posts: n/a

Default Getting mySQL to connect in PHP (.ini related?) - 09-02-2004 , 12:09 PM






I'm using WinXP Pro, with Apache 1.3? and PHP5.
Then today I installed mySQL 2.0.49.
Technically it works. I can use the command line to create tables and
insert data, I can use WinmySQLAdmin to view processes, etc.
But when I make a test script in PHP, nothing happens.

For example:

$dbh = mysql_connect("localhost", "username", "password") or die("I
cannot connect to the database because: " . mysql_error());

Nothing happens. I don't even get the error message. So changing
"localhost" to the PC name and the IP address of course didn't work,
because PHP isn't seeming to be talking to mySQL.

I opened up my php.ini and uncommented the one and only line with
mysql.dll in it.

Is there something in Apache's httpd.conf, that might need to be
changed? I couldn't find any commented out mysql lines.

Thanks for any help!
Liam

Reply With Quote
  #2  
Old   
Polaris
 
Posts: n/a

Default Re: Getting mySQL to connect in PHP (.ini related?) - 09-10-2004 , 10:16 AM






Copy all dlls (espsecially libmysql.dll) to your windows map and he will
read the php_mysql.dll extension and connect...

Polaris.

"LRW" <deja (AT) celticbear (DOT) com> schreef in bericht
news:3a1d1813.0409020909.3bb201bf (AT) posting (DOT) google.com...
Quote:
I'm using WinXP Pro, with Apache 1.3? and PHP5.
Then today I installed mySQL 2.0.49.
Technically it works. I can use the command line to create tables and
insert data, I can use WinmySQLAdmin to view processes, etc.
But when I make a test script in PHP, nothing happens.

For example:

$dbh = mysql_connect("localhost", "username", "password") or die("I
cannot connect to the database because: " . mysql_error());

Nothing happens. I don't even get the error message. So changing
"localhost" to the PC name and the IP address of course didn't work,
because PHP isn't seeming to be talking to mySQL.

I opened up my php.ini and uncommented the one and only line with
mysql.dll in it.

Is there something in Apache's httpd.conf, that might need to be
changed? I couldn't find any commented out mysql lines.

Thanks for any help!
Liam



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.