0

I am trying to install WAMP on my computer. I opened phpinfo just fine, but when I try to run testmysql.php, I get a very blank page. Any echo statements before mysql_connect work fine, but any echo statements afterwards never show up.

testmysql.php:

<?php 
echo 'before';
$link = mysql_connect('localhost','root','');
echo 'after';
if (!$link) { 
    die('Could not connect to MySQL: ' . mysql_error()); 
} 
echo 'Connection OK'; 
mysql_close($link); 
?> 

the log fine mysql.log has

130503 14:39:26 [Note] Plugin 'FEDERATED' is disabled.
130503 14:39:26 InnoDB: The InnoDB memory heap is disabled
130503 14:39:26 InnoDB: Mutexes and rw_locks use Windows interlocked functions
130503 14:39:26 InnoDB: Compressed tables use zlib 1.2.3
130503 14:39:26 InnoDB: Initializing buffer pool, size = 128.0M
130503 14:39:26 InnoDB: Completed initialization of buffer pool
130503 14:39:26 InnoDB: highest supported file format is Barracuda.
130503 14:39:26  InnoDB: Waiting for the background threads to start
130503 14:39:27 InnoDB: 1.1.8 started; log sequence number 1595675
130503 14:39:27 [Note] Server hostname (bind-address): '(null)'; port: 3306
130503 14:39:27 [Note]   - '(null)' resolves to '::';
130503 14:39:27 [Note]   - '(null)' resolves to '0.0.0.0';
130503 14:39:27 [Note] Server socket created on IP: '0.0.0.0'.
130503 14:39:27 [Note] Event Scheduler: Loaded 0 events
130503 14:39:27 [Note] wampmysqld: ready for connections.
Version: '5.5.24-log'  socket: ''  port: 3306  MySQL Community Server (GPL)

so i believe the problem lies in setting mysql on an actual ip address. how do i do this?

Ankit Ahuja
  • 73
  • 2
  • 14

1 Answers1

-1

Check your php.ini and set error_reporting to E_ALL (error_reporting = E_ALL). I think you get a fatal error and the script stops after that!

Étienne Laneville
  • 3,143
  • 3
  • 10
  • 26
e-Learner
  • 517
  • 1
  • 4
  • 15
  • i set error_reporting to E_ALL like you said, but again, nothing shows up! i dont know what it could be – Ankit Ahuja May 03 '13 at 18:41
  • the only error i am getting is `127.0.0.1 - - [05/May/2013:15:18:43 -0400] "GET /testmysql.php HTTP/1.1" 500 6` which is not helpful. it is in the file `access.log` – Ankit Ahuja May 05 '13 at 19:23
  • Open cmd with admin privilèges and type `php -i > C:\phpConfig.txt` and post the content of the file here. The file will be in `C:\phpConfig.txt` – e-Learner May 06 '13 at 10:15