You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Richard Dunne <ri...@yahoo.com> on 2007/12/22 01:05:05 UTC

[users@httpd] php5 mysql localhost

Can someone help me with the configuration of Apache.
I have PHP5, MySQL and Apache2.2 all installed and working independantly on Windows XP.  
which dir in Apache should the php.ini file be located? I tried /htdocs and /lib but still cannot view any php on localhost.
I have these lines in my http/conf:
AddType text/html .php .phps
AddType application/x-httpd-php .php
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php-source .phps#
LoadModule php5_module "c:/php/php5apache2_2.dll"
When trying to connect to MySQL server using this test script, I am getting Access denied for 'user'@'localhost'. No idea why!
<?php
$mysqluser = 'root';
$mysqlpasswd = ' ';
$mysqlhost = 'localhost';
$connID = mysql_connect($mysqlhost, $mysqluser, $mysqlpasswd);
$result = mysql_list_dbs();
echo "<p>Databases in the local MySQL server</p>\n";
echo "<p>";
while ($row = mysql_fetch_row($result)) {
  echo "<br><em>$row[0]</em>\n";
}
echo "</p>";
?>

Any pointers would be appreciated.

Richard.


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

Re: [users@httpd] php5 mysql localhost

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
The PHPIniDir directive is really useful ;-)

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org