2011-04-10 260 views
0

我正在使用Apserve包开发包含PHP5和Codeigniter的开发环境。我想升级到PHP 5.3,所以我下载了ZIP文件并将其解压到c:\apserve\php5目录中。在这之后,事情变得非常疯狂和混乱。PHP不能正常工作

尽管apache正在工作,但PHP根本没有工作。唯一的页面工作是http://localhost/,而phpmyadmin http://localhost/phpmyadminhttp://localhost/ci文件夹根本不加载。当我尝试在本地访问phpmyadmin时,该链接显示在浏览器的链接栏中。

所以我如何重新配置​​PHP来让它工作?

笔记:

  • php.ini文件位于Windows文件夹和文件夹c:\apserve\php6
  • php文件夹有两个位置; c:\programfiles\php6c:\apserve\php6

我只想使用c:\​​ apserve内容。

这是删除以前的错误和清理启动后的错误日志。

[Sun Apr 10 17:48:06 2011] [warn] Init: Session Cache is not configured [hint: SSLSessionCache] 
PHP Warning: Directive 'register_globals' is no longer supported in PHP 6 and greater in Unknown on line 0 
PHP Warning: Directive 'register_long_arrays' is no longer supported in PHP 6 and greater in Unknown on line 0 
PHP Warning: Directive 'magic_quotes_gpc' is no longer supported in PHP 6 and greater in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_curl.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_exif.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_gd2.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_mbstring.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_mysql.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_mysqli.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_openssl.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_pdo.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_pdo_sqlite.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_sockets.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_sqlite.dll' - The specified module could not be found.\r\n in Unknown on line 0 
[Sun Apr 10 17:48:07 2011] [notice] Apache/2.2.8 (Win32) mod_ssl/2.2.8 OpenSSL/0.9.8g PHP/6.0.0-dev configured -- resuming normal operations 
[Sun Apr 10 17:48:07 2011] [notice] Server built: Jan 18 2008 00:37:19 
[Sun Apr 10 17:48:07 2011] [notice] Parent: Created child process 4872 
[Sun Apr 10 17:48:07 2011] [warn] Init: Session Cache is not configured [hint: SSLSessionCache] 
PHP Warning: Directive 'register_globals' is no longer supported in PHP 6 and greater in Unknown on line 0 
PHP Warning: Directive 'register_long_arrays' is no longer supported in PHP 6 and greater in Unknown on line 0 
PHP Warning: Directive 'magic_quotes_gpc' is no longer supported in PHP 6 and greater in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_curl.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_exif.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_gd2.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_mbstring.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_mysql.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_mysqli.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_openssl.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_pdo.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_pdo_sqlite.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_sockets.dll' - The specified module could not be found.\r\n in Unknown on line 0 
PHP Warning: PHP Startup: Unable to load dynamic library 'C:/AppServ\\php5\\ext\\php_sqlite.dll' - The specified module could not be found.\r\n in Unknown on line 0 
[Sun Apr 10 17:48:07 2011] [notice] Child 4872: Child process is running 
[Sun Apr 10 17:48:07 2011] [notice] Child 4872: Acquired the start mutex. 
[Sun Apr 10 17:48:07 2011] [notice] Child 4872: Starting 64 worker threads. 
[Sun Apr 10 17:48:07 2011] [notice] Child 4872: Starting thread to listen on port 80. 

回答

1

在那个日志输出中有矛盾的信息,在我看来你是在php6中加载php5扩展。

你有没有尝试删除所有安装的PHP和安装只有你需要的。

如果你真的必须有多个版本的PHP运行,你有没有考虑虚拟化你的开发环境?

+0

是的,你是正确的,我安装5.3后尝试,并没有工作尝试php6。我认为现在问题解决使用删除programfiles文件夹中的其他PHP安装并将php.ini重定位到Windows文件夹 – Khaled 2011-04-12 13:25:27

+0

,并确保完全安装apserve! – Khaled 2011-04-12 13:26:29

1

确保您已启用php.ini中的所有扩展(特别是MySQL)。

如果你有以前的PHP安装(文件夹)的备份,我建议复制&覆盖php.ini文件。

还检查Apache error_log文件(在您的apache文件夹中),并在那里看到错误,因为apache会在启动过程中记录任何PHP错误。

+0

之前,php.ini被安装在windows文件夹中,但不是现在。也许问题是在php.ini文件的位置?我如何更改默认链接到该文件? – Khaled 2011-04-10 14:30:11