1. 访问出现形如 “The requested URL /site/login was not found on this server.”的错误 或Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator,webmaster@localhostand inform. them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
3.0.2/.htaccess: Invalid command 'RewriteEngine',
perhaps misspelled or defined by a module not included in the server configuration,
referer:http://localhost:5000/
出现此问题的原因应是你安装环境apache的mod_rewrite模块没被打开。
两种解决办法:
1). 开启apache的mod_rewrite模块
2). 将protected/main.php里''showScriptName'' => false改为true
2.Windows 下的安装PDO MySQL扩展模块
编辑使用的 php.ini, 找到下面扩展并去掉注释打开扩展即可
extension=php_pdo.dll
extension=php_pdo_mysql.dll
extension=php_pdo_pgsql.dll
extension=php_pdo_sqlite.dll
extension=php_pdo_mssql.dll
重新启动你的 Web Server
用 phpinfo() 出来的信息查看所有 pdo 模块是否正常安装
3.XAMPP下,Apache启动时报Can't load Perl file问题的解决
通过xampp面板启动apache时,面板总提示:
“Busy。。。
Apache service started
”
但始终未能真正起来。
找到apache错误日志:D:xamppapachelogserror.log,里面的错误信息如下:
[Mon Apr 09 15:00:26 2012] [error] Attempt to reload DynaLoader.pm aborted.
Compilation failed in require at D:/xampp/perl/site/lib/ModPerl/Const.pm line 18.
BEGIN failed--compilation aborted at D:/xampp/perl/site/lib/ModPerl/Const.pm line 18.
Compilation failed in require at D:/xampp/perl/site/lib/Apache2/Const.pm line 18.
BEGIN failed--compilation aborted at D:/xampp/perl/site/lib/Apache2/Const.pm line 18.
Compilation failed in require at D:/xampp/apache/conf/extra/startup.pl line 9.
BEGIN failed--compilation aborted at D:/xampp/apache/conf/extra/startup.pl line 9.
Compilation failed in require at (eval 2) line 1.
[Mon Apr 09 15:00:26 2012] [error] Can't load Perl file: D:/xampp/apache/conf/extra/startup.pl for server localhost:80, exiting...
网上查阅资料说是因为和oracle的某个环境变量冲突所致(我的机器上安装有Oracle10g)。
解决办法:
找到文件:C:xamppapacheconfextrahttpd-perl.conf,添加“PerlSwitches -T”,红色字体部分:
LoadFile "C:/xampp/perl/bin/perl510.dll"
LoadModule perl_module modules/mod_perl.so
PerlSwitches -T
PerlPostConfigRequire "D:/xampp/apache/conf/extra/startup.pl"
再次启动Apache服务,成功启动。
4. Error 500 mysql_real_escape_string(): Access denied for user””@”localhost” (using password: NO)
解决方法:
注释掉Sqlservice.php中的$fieldValue = mysql_real_escape_string($fieldValue);这行ok了,可以正常进入系统了。
问题: Error 500 mysql_real_escape_string(): Access denied for user””@”localhost” (using password: NO) 解决方法: 注释掉Sqlservice.php中的$fieldValue = mysql_real_escape_string($fieldValue);这行ok了,可以正常进入系统了。