PHP扩展不会在Apache启动时加载 [英] PHP extensions won't load on Apache startup

查看:117
本文介绍了PHP扩展不会在Apache启动时加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我添加PHP作为Apache 2.2.11模块:

I've added php as a module for Apache 2.2.11:

LoadModule php5_module "c:/php/php5apache2_2.dll"

和还补充

AddType application/x-httpd-php .php

和在php.ini中,我的扩展目录设置为:的extension_dir =C:\\ PHP \\分机

And in PHP.ini, my extension dir is set to: extension_dir = "C:\php\ext"

,目录是正确的,所有文件确实存在。

And yes, the directories are correct and all files do exist.

但是,当我启动Apache,我得到这些错误:

But when I start apache, I get these errors:

PHP的警告:PHP启动:无法加载动态库'C:\\ PHP \\分机\\激活php_mysql.dll' - 指定的模块找不到\\ r \\ n的未知在线0

  PHP的警告:PHP启动:无法加载动态库'C:\\ PHP \\分机\\ php_pdo_pgsql.dll' - 指定的模块找不到\\ r \\ n的未知在线0

  PHP的警告:PHP启动:无法加载动态库'C:\\ PHP \\分机\\ php_pgsql.dll' - 指定的模块找不到\\ r \\ n的未知在线0


  [太阳5月17日3时46分01秒2009] [声明]的Apache / 2.2.11(的Win32)PHP / 5.2.9-2配置 - 恢复正常操作

  [太阳5月17日3时46分01秒2009] [声明] Server内置:2008年0时10分06秒

  [太阳5月17日3时46分01秒2009] [声明]家长:创建子进程4652


  PHP的警告:PHP启动:无法加载动态库'C:\\ PHP \\分机\\激活php_mysql.dll' - 指定的模块找不到\\ r \\ n的未知在线0

  PHP的警告:PHP启动:无法加载动态库'C:\\ PHP \\分机\\ php_pdo_pgsql.dll' - 指定的模块找不到\\ r \\ n的未知在线0

  PHP的警告:PHP启动:无法加载动态库'C:\\ PHP \\分机\\ php_pgsql.dll' - 指定的模块找不到\\ r \\ n的未知在线0


  [太阳5月17日3时46分01秒2009] [声明]儿童4652:儿童进程正在运行

  [太阳5月17日3时46分01秒2009] [声明]儿童4652:后天开始互斥

  [太阳5月17日3时46分01秒2009] [声明]儿童4652:启动64工作线程

  [太阳5月17日3时46分01秒2009] [声明]儿童4652:启动线程侦听端口80。

PHP Warning: PHP Startup: Unable to load dynamic library 'C:\php\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:\php\ext\php_pdo_pgsql.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:\php\ext\php_pgsql.dll' - The specified module could not be found.\r\n in Unknown on line 0

[Sun May 17 03:46:01 2009] [notice] Apache/2.2.11 (Win32) PHP/5.2.9-2 configured -- resuming normal operations
[Sun May 17 03:46:01 2009] [notice] Server built: Dec 10 2008 00:10:06
[Sun May 17 03:46:01 2009] [notice] Parent: Created child process 4652

PHP Warning: PHP Startup: Unable to load dynamic library 'C:\php\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:\php\ext\php_pdo_pgsql.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:\php\ext\php_pgsql.dll' - The specified module could not be found.\r\n in Unknown on line 0

[Sun May 17 03:46:01 2009] [notice] Child 4652: Child process is running
[Sun May 17 03:46:01 2009] [notice] Child 4652: Acquired the start mutex.
[Sun May 17 03:46:01 2009] [notice] Child 4652: Starting 64 worker threads.
[Sun May 17 03:46:01 2009] [notice] Child 4652: Starting thread to listen on port 80.

所以我可能忘记简单的东西在这里,谁能告诉我什么我忘了?

So I'm probably forgetting something simple here, can someone tell me what I'm forgetting?

推荐答案

您不仅需要PHP扩展的DLL文件,以便添加MySQL和PostgreSQL的支持PHP。您还需要MySQL和PostgreSQL本机库。 PHP扩展的DLL文件可能不会发现了一些它们所依赖的DLL,所以他们不能启动。

Not only you need PHP extension's DLLs in order to add MySQL and PostgreSQL support to PHP. You also need MySQL and PostgreSQL native libraries. PHP extension's DLLs are probably not finding some DLL they depend on, so they can't start.

请确保您有MySQL和PostgreSQL客户端安装,和他们的DLL到一些定位的地方。

Make sure you have MySQL and PostgreSQL client installed, and their DLLs into some locatable place.

即。例如:


  • 激活php_mysql.dll依赖的libmysql.dll

所以,确保PHP能够找到的libmysql.dll(我相信这一个Windows自带的PHP的二进制发行版。不知道虽然)。

So, make sure PHP is able to find libmysql.dll (I believe this one comes with the binary distribution of Windows PHP. Not sure though).

这篇关于PHP扩展不会在Apache启动时加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆