NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
How to solve problem with local conn from apache to mySQL


Joined: 18 Aug 2007
Posts: 5
Reply with quote
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
View user's profileFind all posts by henrix72seSend private message
How to solve problem with local conn from apache to mySQL
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic