我在win2003安装的php是PHP Version 5.3.10,在phpinfo()里mysql显示是mysqlnd 5.0.8-dev ,而我安装的mysql版本是5.5.21,我在php连接数据库用@ $db = new mysqli("localhost","bookorama","bookorama123","books");
和用$db=mysql_connect("yh","root","753951","books");
直接提示:您指定的网页无法访问!
错误类型:500我的php环境:win2003下用iis6.0+PHP Version 5.3.10+mysqlnd 5.0.8-dev
在phpinfo()环境里显示:
Configuration File (php.ini) Path C:\WINDOWS
Loaded Configuration File D:\php\php.ini
display_errors On On 到底是哪里的问题,大仙们,请教了
和用$db=mysql_connect("yh","root","753951","books");
直接提示:您指定的网页无法访问!
错误类型:500我的php环境:win2003下用iis6.0+PHP Version 5.3.10+mysqlnd 5.0.8-dev
在phpinfo()环境里显示:
Configuration File (php.ini) Path C:\WINDOWS
Loaded Configuration File D:\php\php.ini
display_errors On On 到底是哪里的问题,大仙们,请教了
错误类型:500
明显是php代码有啥问题...error_log里是报啥内容呢?...
$db=mysql_connect("localhost:3306","root","753951");
或者
$db=mysql_connect("127.0.0.1:3306","root","753951");
The FastCGI Handler was unable to process the request.
--------------------------------------------------------------------------------Error Details:The FastCGI process exceeded configured activity timeout
Error Number: 258 (0x80070102).
Error Description: µÈ´ýµÄ²Ù×÷¹ýʱ¡£
HTTP Error 500 - Server Error.
Internet Information Services (IIS)
$searchtype=$_POST['searchtype'];
$searchterm=trim($_POST['searchterm']); if (!$searchtype || !$searchterm) {
echo 'You have not entered search details. Please go back and try again.';
exit;
} if (!get_magic_quotes_gpc()){
$searchtype = addslashes($searchtype);
$searchterm = addslashes($searchterm);
} @ $db = new mysqli('localhost:8080','bookorama','bookorama123','books'); $query = "select * from books where ".$searchtype." like '%".$searchterm."%'";
$result = $db->query($query); $num_results = $result->num_rows; echo "<p>Number of books found: ".$num_results."</p>"; for ($i=0; $i <$num_results; $i++) {
$row = $result->fetch_assoc();
echo "<p><strong>".($i+1).". Title: ";
echo htmlspecialchars(stripslashes($row['title']));
echo "</strong><br />Author: ";
echo stripslashes($row['author']);
echo "<br />ISBN: ";
echo stripslashes($row['isbn']);
echo "<br />Price: ";
echo stripslashes($row['price']);
echo "</p>";
} $result->free();
$db->close();
@ $db = new mysqli('localhost:8080','bookorama','bookorama123','books');
if (!$db) {
echo 'Error: Could not connect to database. Please try again later.';
exit;
} $query = "select * from books where isbn like '%31509%'";
$result = $db->query($query); $num_results = $result->num_rows; echo "<p>Number of books found: ".$num_results."</p>"; for ($i=0; $i <$num_results; $i++) {
$row = $result->fetch_assoc();
echo "<p><strong>".($i+1).". Title: ";
echo htmlspecialchars(stripslashes($row['title']));
echo "</strong><br />Author: ";
echo stripslashes($row['author']);
echo "<br />ISBN: ";
echo stripslashes($row['isbn']);
echo "<br />Price: ";
echo stripslashes($row['price']);
echo "</p>";
} $result->free();
$db->close();?>
什么也没有显示,为什么
echo $num_results //值是多少
CGI引擎没配置好导致模块载入error