testmysql.php WAMP设置

问题描述 投票:1回答:2

我想在我的电脑上安装WAMP。我打开phpinfo很好,但是当我尝试运行testmysql.php时,我得到一个非常空白的页面。 mysql_connect之前的任何echo语句都可以正常工作,但之后的任何echo语句都不会显示出来。

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); 
?> 

日志很好mysql.log有

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)

所以我认为问题在于在实际的IP地址上设置mysql。我该怎么做呢?

php mysql wamp
2个回答
0
投票

也许MySQL还没有开始?


0
投票

检查你的php.ini并将error_reporting设置为E_ALL error_reporting = E_ALL我认为你得到一个致命的错误,然后脚本停止!

© www.soinside.com 2019 - 2024. All rights reserved.