aung
-
Posts
3 -
Joined
-
Last visited
Never
Posts posted by aung
-
-
Hello,
I installed My SQL version 5.0.51a (msi) and PHP version 5.2.5 (msi). But when I run the script, the error message saying that there is no "My SQL extensions".
In fact, when I installed PHP, I selected to install My SQL extensions. Please note that I installed by msi installer package.
PHP.ini include for My SQL extensions. Please see the followings.
[PHP_MYSQL]
extension=php_mysql.dll
[PHP_MYSQLI]
extension=php_mysqli.dll
php_mysql.dll is located at C:\PHP\ext.
libmysql.dll is located at C:\PHP
C:\PHP is also in the PATH.
But it didn't work. After reading this forum, I moved "php.ini" to C:\Windows directory and "phpinfo()" now include the section for "My SQL".
Again I tried to run the script below and it return "Unable to connect to MySQL".
Could you advice on that?
<?php
$username = "pee_wee";
$password = "let_me_in";
$hostname = "localhost";
$dbh = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
print "Connected to MySQL<br>";
// you're going to do lots more here soon
mysql_close($dbh);
?>
Thanks.
Tin Aung Soe -
Hello,
I installed My SQL version 5.0.51a and PHP version 5.2.5. But when I run the script, the error message saying that there is no "My SQL extensions".
In fact, when I installed PHP, I selected to install My SQL extensions. Please note that I installed by msi installer package.
PHP.ini include for My SQL extensions. Please see the followings.
[php_MYSQL]
extension=php_mysql.dll
[php_MYSQLI]
extension=php_mysqli.dll
php_mysql.dll is located at C:\Program Files\PHP\ext.
Could you suggest on that?
Thanks.
Tin Aung Soe
Call To Undefinded Function mysql_connect
in PHP Installation and Configuration
Posted
It returns the error due to login name and password I used. I used "root" and its password. But, somehow it did not work.
I created the new user and then tried again.
It worked on this time.
Thanks again.
Tin Aung Soe