0

i install windows7 ultimate and php 5.3.1 and mysql server 5.1

mysql server work fine from

                  mysql>

and if see phpinfo();

i get the following table

              mysql
       MySQL Support enabled 
      Active Persistent Links  0  
      Active Links  0  
      Client API version  mysqlnd 5.0.5-dev - 081106 - $Revision: 289630 $  
      Persistent cache enabled 
      put_hits  0  
      put_misses  0  
      get_hits  0  
      get_misses  0  
      size  2000  
       free_items  2000  
      references  2  

but when i connect with following php command

   $db_host="localhost"; 
   $db_name="mysql";
   $db_user="root";
   $db_pass="*****"; 

   $dbc=mysql_connect($db_host,$db_user,$db_pass) OR DIE (mysql_error());
   $dbs=mysql_select_db($db_name) OR DIE (mysql_error());

when i run page, page take long time in loading and then return nothing. and if i pass any query it return false, i think its connection problem.

Thanks

air
  • 6,136
  • 26
  • 93
  • 125
  • You should review the Apache error log as it's probably some other kind of issue (I once had an issue with APC, then switched to VC9 compiled version). – aefxx Feb 17 '10 at 14:22

2 Answers2

2

Yes, use 127.0.0.1 instead of localhost. Alternatively you can disable IPv6 or disable the IPv6 localhost alias in your HOSTS file.

Pierre
  • 716
  • 4
  • 10
0

You should try to connect using pure php.exe, not web server. What error message is shown? Also maybe try '127.0.0.1' intsead of 'localhost'

noonex
  • 1,975
  • 1
  • 16
  • 18