Re: Re: [PHP-DB] Cannot connect to MySQL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gunawan Wibisono wrote:
Hello,

 First of all, I apologise if I do something wrong, because I'm new to this
 weird system.

 For test purposes, I have installed Apache 2.2.14 with PHP 5.3.1 and MySQL
 5.1.44 on Windows 7 Home Premium. However, whenever I try accessing MySQL
 via PHP, I get the following error:

 A connection attempt failed because the connected party did not properly
 respond after a period of time, or established connection failed because
 connected host has failed to respond.

 MySQL's command line client is still working fine. I think that PHP simply
 does not see MySQL, though the settings in php.ini seem to be correct.
 Earlier (before I upgraded to Windows 7 and PHP 5.3) it worked. I've tried
 turning off the antivirus, because sometimes it may cause timeouts, but it
 didn't help. Can someone please help me fix this?

PHP does not come with any database enabled by default, so you will need to enable one. For MySQL just look in php.ini for the line
;extension=php_mysql.dll
and remove the ';' at the front, and then restart Apache.
The first page you should create is

<?php
phpinfo();
?>

Which will list all the modules that are active ;)



--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux