【问题标题】:PHP is not working on apservePHP 无法在 apserve 上运行
【发布时间】:2011-04-10 13:08:15
【问题描述】:

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

PHP 根本没有工作,即使 apache 正在工作。唯一工作的页面是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.

【问题讨论】:

    标签: php apache phpmyadmin


    【解决方案1】:

    该日志输出中有相互矛盾的信息,在我看来您是在 php6 中加载 php5 扩展。

    您是否尝试过删除所有 php 安装并只安装您需要的。

    如果您确实必须运行多个版本的 php,您是否考虑过虚拟化您的开发环境?

    【讨论】:

    • 是的,你说得对,我在安装5.3后尝试过,没有尝试过php6。我认为现在可以通过删除 programfiles 文件夹中的其他 PHP 安装并将 php.ini 重新定位到 windows 文件夹来解决问题
    【解决方案2】:

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

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

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

    【讨论】:

    • 以前,php.ini 安装在 windows 文件夹中,但现在没有。也许问题出在 php.ini 文件的位置?如何更改该文件的默认链接?
    猜你喜欢
    • 1970-01-01
    • 2013-02-11
    • 2012-11-12
    • 1970-01-01
    • 1970-01-01
    • 2014-05-04
    • 2021-07-26
    • 2011-06-06
    • 1970-01-01
    相关资源
    最近更新 更多