Joined: 18 Aug 2007 |
Posts: 5 |
|
|
|
Posted: Fri Aug 17, 2007 5:34 pm |
|
|
|
|
|
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
|
|