How to solve problem with local connection from apache to myssql
Using MySQL with Apache from NuSphere TechPlatfrom
It was not easy to find all checks to do. However, to solve this I did the following ;
1) Open the C:\Program Files\nusphere\TechPlat\apache\bin\php.ini file in an editor (notepad)
2) Remove the leading semicolon from the following line
;extension=php_mysql.dll
3) Locate the below line and make sure you have correct port, for me it was empty at start.
mysql.default_port = 3306
I found 3306 by executing the local mysql command line client and inputed the command status.
4) Save the file
5) Restart Apache server (if you selected NT-service when installing, you have an icon bottom right)
6) In your script, use the following values;
define('DB_HOST','localhost');
define('DB_USER','root');
define('DB_PASS','hobbe'); // or whatever you used as password...
define('DB_NAME','test');
$conn = mysql_connect(DB_HOST, DB_USER, DB_PASS)) or die("Could not connect to db..!");
if (!mysql_select_db(DB_NAME, $conn)) die("Could not select db..!");
$result = mysql_query("show tables;",$conn);
while($row = mysql_fetch_array($result)) {
...
}
All values during installation was default. My PC is a new HP laptop running XP with latest TechPlatfrom from NuSphere.
/Henrik Laurell, Sweden
Edited 1 time(s). Last edit at 08/18/2007 04:39PM by Henrik Laurell.
Subject
Views
Written By
Posted
How to solve problem with local connection from apache to myssql
7252
August 18, 2007 04:30PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.