Good Evening Gentlemen,
I'm realy new to all this stuff, but I have been trying to get php to connect to MySql and doesn't seem to be working.
Any help you guys can provide will be highly appreciated.
I just installed Apache, MySql and Php on a windows XP machine.
The apache seems to be working fine and I tested the PHP part of it with the PHPINFO() script and it worked.
To test my sql, I have created a script called mysqlconnect.php as recomended in the book I'm using:
<?php
$conn = mysql_connect("localhost", "test", "test");
echo $conn;
?>
but I just get a blank screen when I call the script from the browser (No Errors).
Then I made the changes as sugested in this thread:
*************Quote:**********************
to get mysql work with the php 5 copy /dll/libmySQL.dll to the directory where php 5 resides and copy the /extensions/php_mysql.dll to the directory where php.exe resides.(if you can't find the two above files probably you are using an old release of php 5.you should check for latest at :http://snaps.php.net/)
in additon uncomment extension line in php.ini
and add the following code to a gnereal database file(dbcon.php) in my case and include it in each file which needs access to datanase.
if (!class_exists('mysql')) {
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN')
dl('php_mysql.dll');
else
dl('php_mysql.so');
}
I tried to eliminate above code and leave php_mysql.dll in extensions directory. But it didn't work shouting the familiar dialouge: Unable to load ......
************ End of Quote*****************
I didn't add the code to the dbcon.php file , because I didn't know where to find it.
So now when I start apache I get the following error:
"PHP Start Up: UNABLE TO LOAD DYNAMIC LIBRARY './PHP_MSQL.DLL'
THE SPECIFIED MODULE COULD NOT BE FOUND"
Also here's my PHP info results and php.ini-see attachments :
Please Help.
Sincerly
fred123