mysql_connect(): not working with apache 2.2, no error msg
Posted: Thu Sep 04, 2008 10:07 pm
I have installed mysql Server 5.0, Apache 2.2 and PHP on a localhost. I am running a simple connect.php script:
<?php
error_reporting(E_ALL);
echo "Trying to Connect to DB!!!";
$connx = mysql_connect('localhost', 'Xenia', 'password');
echo "Connected to DB!!!";
if(!$connx)
{
die("DB connection failed: " . mysql_error());
}
else {
echo "Connected to DB!!!";
}
?>
It prints out "Trying to Connect to DB!!!"... and nothing else after that..
My php.ini includes the lines:
[PHP_MYSQL]
extension=php_mysql.dll
MySQL server is running (I have run telnet localhost 3306 and connected)
I have executed GRANT ALL ON *.* TO Xenia@localhost IDENTIFIED BY "password"; just in case my used didn't have access.
The MySql service is running on apache...
What am I missing here? Any ideas would be really helpful. I am very new to this so this may be something obvious.
Thanks in advance.
<?php
error_reporting(E_ALL);
echo "Trying to Connect to DB!!!";
$connx = mysql_connect('localhost', 'Xenia', 'password');
echo "Connected to DB!!!";
if(!$connx)
{
die("DB connection failed: " . mysql_error());
}
else {
echo "Connected to DB!!!";
}
?>
It prints out "Trying to Connect to DB!!!"... and nothing else after that..
My php.ini includes the lines:
[PHP_MYSQL]
extension=php_mysql.dll
MySQL server is running (I have run telnet localhost 3306 and connected)
I have executed GRANT ALL ON *.* TO Xenia@localhost IDENTIFIED BY "password"; just in case my used didn't have access.
The MySql service is running on apache...
What am I missing here? Any ideas would be really helpful. I am very new to this so this may be something obvious.