环境 windows 7 professional   apache 2.2.19   php 5.2.17-Win32-VC6-x86  mysql 5.5.14-win32apache  单独 it works!
apache + php   可以查看,  就没有MYSQL模块修改了  extension_dir="D:/php/ext"
下面的安装好后都没有分号 
[PHP_BZ2]
extension=php_bz2.dll
[PHP_CURL]
extension=php_curl.dll
[PHP_DBA]
extension=php_dba.dll
[PHP_DBASE]
extension=php_dbase.dll
[PHP_FDF]
extension=php_fdf.dll
[PHP_GD2]
extension=php_gd2.dll
[PHP_GETTEXT]
extension=php_gettext.dll
[PHP_GMP]
extension=php_gmp.dll
[PHP_IMAP]
extension=php_imap.dll
[PHP_INTERBASE]
extension=php_interbase.dll
[PHP_LDAP]
extension=php_ldap.dll
[PHP_MBSTRING]
extension=php_mbstring.dll
[PHP_MCRYPT]
extension=php_mcrypt.dll
[PHP_MHASH]
extension=php_mhash.dll
[PHP_MIME_MAGIC]
extension=php_mime_magic.dll
[PHP_MING]
extension=php_ming.dll
[PHP_MSQL]
extension=php_msql.dll
[PHP_MSSQL]
extension=php_mssql.dll
[PHP_MYSQL]
extension=php_mysql.dll
[PHP_MYSQLI]
extension=php_mysqli.dll
[PHP_OCI8]
extension=php_oci8.dll
[PHP_OPENSSL]
extension=php_openssl.dll
[PHP_PDO]
extension=php_pdo.dll
[PHP_PDO_FIREBIRD]
extension=php_pdo_firebird.dll
[PHP_PDO_MSSQL]
extension=php_pdo_mssql.dll
[PHP_PDO_MYSQL]
extension=php_pdo_mysql.dll
[PHP_PDO_OCI]
extension=php_pdo_oci.dll
[PHP_PDO_OCI8]
extension=php_pdo_oci8.dll
[PHP_PDO_ODBC]
extension=php_pdo_odbc.dll
[PHP_PDO_PGSQL]
extension=php_pdo_pgsql.dll
[PHP_PDO_SQLITE]
extension=php_pdo_sqlite.dll
[PHP_PDO_SQLITE_EXTERNAL]
extension=php_pdo_sqlite_external.dll
[PHP_PGSQL]
extension=php_pgsql.dll
[PHP_PSPELL]
extension=php_pspell.dll
[PHP_SHMOP]
extension=php_shmop.dll
[PHP_SNMP]
extension=php_snmp.dll
[PHP_SOAP]
extension=php_soap.dll
[PHP_SOCKETS]
extension=php_sockets.dll
[PHP_SQLITE]
extension=php_sqlite.dll
[PHP_SYBASE_CT]
extension=php_sybase_ct.dll
[PHP_TIDY]
extension=php_tidy.dll
[PHP_XMLRPC]
extension=php_xmlrpc.dll
[PHP_XSL]
extension=php_xsl.dll
[PHP_ZIP]
extension=php_zip.dll
[PHP_EXIF]
extension=php_exif.dll也把php5ts.dll ,libmysql,复制到了system32下。 
php.ini复制到了windows文件夹下,以及windows/system32下,我也复制了一个PHP.INI打开一个链接数据库的PHP,就出现
Fatal error: Call to undefined function mysql_connect() in D:\web\connect.php on line 2请解?

解决方案 »

  1.   

    apache 后面也加了 LoadModule php5_module "D:/php/php5apache2_2.dll"  
    PHPIniDir "D:/php/php.ini"  
    AddType application/x-httpd-php .php .phtml我的文件 安装的apache php mysql 路径分别是D:\apache    D:\php  D:\mysqlmysql 可以单独打开  可以创建数据库    帐户:root  密码:000123
      

  2.   

    查看 apache 日志,应该能看出端倪
      

  3.   

    用phpinfo() 看下 Loaded Configuration File  这一项是不是你的 "D:/php/php.ini" 
    还有 你的ini文件还真奇怪  没见过这样子的
      

  4.   

    [Mon Aug 01 13:44:35 2011] [notice] Parent: Received restart signal -- Restarting the server.
    [Mon Aug 01 13:44:35 2011] [notice] Child 6112: Exit event signaled. Child process is ending.
    [Mon Aug 01 13:44:35 2011] [notice] Apache/2.2.19 (Win32) PHP/5.2.17 configured -- resuming normal operations
    [Mon Aug 01 13:44:35 2011] [notice] Server built: May 20 2011 17:39:35
    [Mon Aug 01 13:44:35 2011] [notice] Parent: Created child process 3636
    [Mon Aug 01 13:44:35 2011] [notice] Child 3636: Child process is running
    [Mon Aug 01 13:44:36 2011] [notice] Child 3636: Acquired the start mutex.
    [Mon Aug 01 13:44:36 2011] [notice] Child 3636: Starting 64 worker threads.
    [Mon Aug 01 13:44:36 2011] [notice] Child 6112: Released the start mutex
    [Mon Aug 01 13:44:37 2011] [notice] Child 6112: All worker threads have exited.
    [Mon Aug 01 13:44:37 2011] [notice] Child 6112: Child process is exiting
    [Mon Aug 01 13:44:37 2011] [notice] Child 3636: Starting thread to listen on port 80.
    [Mon Aug 01 14:00:52 2011] [notice] Parent: Received restart signal -- Restarting the server.
    [Mon Aug 01 14:00:52 2011] [notice] Child 3636: Exit event signaled. Child process is ending.
    [Mon Aug 01 14:00:53 2011] [notice] Apache/2.2.19 (Win32) PHP/5.2.17 configured -- resuming normal operations
    [Mon Aug 01 14:00:53 2011] [notice] Server built: May 20 2011 17:39:35
    [Mon Aug 01 14:00:53 2011] [notice] Parent: Created child process 1500
    [Mon Aug 01 14:00:53 2011] [notice] Child 1500: Child process is running
    [Mon Aug 01 14:00:53 2011] [notice] Child 1500: Acquired the start mutex.
    [Mon Aug 01 14:00:53 2011] [notice] Child 1500: Starting 64 worker threads.
    [Mon Aug 01 14:00:53 2011] [notice] Child 3636: Released the start mutex
    [Mon Aug 01 14:00:54 2011] [notice] Child 3636: All worker threads have exited.
    [Mon Aug 01 14:00:54 2011] [notice] Child 3636: Child process is exiting
    [Mon Aug 01 14:00:54 2011] [notice] Child 1500: Starting thread to listen on port 80.
    [Mon Aug 01 14:04:22 2011] [warn] pid file D:/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
    [Mon Aug 01 14:04:22 2011] [notice] Apache/2.2.19 (Win32) PHP/5.2.17 configured -- resuming normal operations
    [Mon Aug 01 14:04:22 2011] [notice] Server built: May 20 2011 17:39:35
    [Mon Aug 01 14:04:22 2011] [notice] Parent: Created child process 1756
    [Mon Aug 01 14:04:22 2011] [notice] Child 1756: Child process is running
    [Mon Aug 01 14:04:22 2011] [notice] Child 1756: Acquired the start mutex.
    [Mon Aug 01 14:04:22 2011] [notice] Child 1756: Starting 64 worker threads.
    [Mon Aug 01 14:04:22 2011] [notice] Child 1756: Starting thread to listen on port 80.
    [Mon Aug 01 14:20:19 2011] [notice] Parent: Received restart signal -- Restarting the server.
    [Mon Aug 01 14:20:19 2011] [notice] Child 1756: Exit event signaled. Child process is ending.
    [Mon Aug 01 14:20:20 2011] [notice] Child 1756: Released the start mutex
    [Mon Aug 01 14:20:21 2011] [notice] Apache/2.2.19 (Win32) PHP/5.2.17 configured -- resuming normal operations
    [Mon Aug 01 14:20:21 2011] [notice] Server built: May 20 2011 17:39:35
    [Mon Aug 01 14:20:21 2011] [notice] Parent: Created child process 2932
    [Mon Aug 01 14:20:21 2011] [notice] Child 1756: All worker threads have exited.
    [Mon Aug 01 14:20:21 2011] [notice] Child 2932: Child process is running
    [Mon Aug 01 14:20:21 2011] [notice] Child 2932: Acquired the start mutex.
    [Mon Aug 01 14:20:21 2011] [notice] Child 2932: Starting 64 worker threads.
    [Mon Aug 01 14:20:21 2011] [notice] Child 2932: Starting thread to listen on port 80.
    [Mon Aug 01 14:20:22 2011] [notice] Child 1756: Child process is exiting
    [Mon Aug 01 14:25:53 2011] [notice] Parent: Received restart signal -- Restarting the server.
    [Mon Aug 01 14:25:53 2011] [notice] Child 2932: Exit event signaled. Child process is ending.
    [Mon Aug 01 14:25:53 2011] [notice] Apache/2.2.19 (Win32) PHP/5.2.17 configured -- resuming normal operations
    [Mon Aug 01 14:25:53 2011] [notice] Server built: May 20 2011 17:39:35
    [Mon Aug 01 14:25:53 2011] [notice] Parent: Created child process 1952
    [Mon Aug 01 14:25:53 2011] [notice] Child 1952: Child process is running
    [Mon Aug 01 14:25:54 2011] [notice] Child 2932: Released the start mutex
    [Mon Aug 01 14:25:54 2011] [notice] Child 1952: Acquired the start mutex.
    [Mon Aug 01 14:25:54 2011] [notice] Child 1952: Starting 64 worker threads.
    [Mon Aug 01 14:25:54 2011] [notice] Child 1952: Starting thread to listen on port 80.
    [Mon Aug 01 14:25:55 2011] [notice] Child 2932: All worker threads have exited.
    [Mon Aug 01 14:25:55 2011] [notice] Child 2932: Child process is exiting
    [Mon Aug 01 14:26:03 2011] [notice] Parent: Received restart signal -- Restarting the server.
    [Mon Aug 01 14:26:03 2011] [notice] Child 1952: Exit event signaled. Child process is ending.
    [Mon Aug 01 14:26:03 2011] [notice] Apache/2.2.19 (Win32) PHP/5.2.17 configured -- resuming normal operations
    [Mon Aug 01 14:26:03 2011] [notice] Server built: May 20 2011 17:39:35
    [Mon Aug 01 14:26:03 2011] [notice] Parent: Created child process 1796
    [Mon Aug 01 14:26:03 2011] [notice] Child 1796: Child process is running
    [Mon Aug 01 14:26:04 2011] [notice] Child 1796: Acquired the start mutex.
    [Mon Aug 01 14:26:04 2011] [notice] Child 1796: Starting 64 worker threads.
    [Mon Aug 01 14:26:04 2011] [notice] Child 1952: Released the start mutex
    [Mon Aug 01 14:26:05 2011] [notice] Child 1952: All worker threads have exited.
    [Mon Aug 01 14:26:05 2011] [notice] Child 1952: Child process is exiting
    [Mon Aug 01 14:26:05 2011] [notice] Child 1796: Starting thread to listen on port 80.
    [Mon Aug 01 14:36:52 2011] [notice] Parent: Received restart signal -- Restarting the server.
    [Mon Aug 01 14:36:52 2011] [notice] Child 1796: Exit event signaled. Child process is ending.
    [Mon Aug 01 14:36:52 2011] [notice] Apache/2.2.19 (Win32) PHP/5.2.17 configured -- resuming normal operations
    [Mon Aug 01 14:36:52 2011] [notice] Server built: May 20 2011 17:39:35
    [Mon Aug 01 14:36:52 2011] [notice] Parent: Created child process 1016
    [Mon Aug 01 14:36:52 2011] [notice] Child 1016: Child process is running
    [Mon Aug 01 14:36:53 2011] [notice] Child 1016: Acquired the start mutex.
    [Mon Aug 01 14:36:53 2011] [notice] Child 1016: Starting 64 worker threads.
    [Mon Aug 01 14:36:53 2011] [notice] Child 1796: Released the start mutex
    [Mon Aug 01 14:36:54 2011] [notice] Child 1796: All worker threads have exited.
    [Mon Aug 01 14:36:54 2011] [notice] Child 1796: Child process is exiting
    [Mon Aug 01 14:36:54 2011] [notice] Child 1016: Starting thread to listen on port 80.
    [Mon Aug 01 14:52:09 2011] [notice] Parent: Received restart signal -- Restarting the server.
    [Mon Aug 01 14:52:09 2011] [notice] Child 1016: Exit event signaled. Child process is ending.
    [Mon Aug 01 14:52:09 2011] [notice] Apache/2.2.19 (Win32) PHP/5.2.17 configured -- resuming normal operations
    [Mon Aug 01 14:52:09 2011] [notice] Server built: May 20 2011 17:39:35
    [Mon Aug 01 14:52:09 2011] [notice] Parent: Created child process 2688
    [Mon Aug 01 14:52:10 2011] [notice] Child 2688: Child process is running
    [Mon Aug 01 14:52:10 2011] [notice] Child 2688: Acquired the start mutex.
    [Mon Aug 01 14:52:10 2011] [notice] Child 2688: Starting 64 worker threads.
    [Mon Aug 01 14:52:10 2011] [notice] Child 1016: Released the start mutex
    [Mon Aug 01 14:52:11 2011] [notice] Child 1016: All worker threads have exited.
    [Mon Aug 01 14:52:11 2011] [notice] Child 2688: Starting thread to listen on port 80.
    [Mon Aug 01 14:52:11 2011] [notice] Child 1016: Child process is exiting
      

  5.   

    以上是我的日志
    [Mon Aug 01 12:51:20 2011] [notice] Child 4656: Exit event signaled. Child process is ending.
    [Mon Aug 01 12:51:20 2011] [notice] Apache/2.2.19 (Win32) PHP/5.2.17 configured -- resuming normal operations
    [Mon Aug 01 12:51:20 2011] [notice] Server built: May 20 2011 17:39:35
    [Mon Aug 01 12:51:20 2011] [notice] Parent: Created child process 1816
    [Mon Aug 01 12:51:20 2011] [notice] Child 1816: Child process is running
    [Mon Aug 01 12:51:21 2011] [notice] Child 1816: Acquired the start mutex.
    [Mon Aug 01 12:51:21 2011] [notice] Child 1816: Starting 64 worker threads.
    [Mon Aug 01 12:51:21 2011] [notice] Child 4656: Released the start mutex
    [Mon Aug 01 12:51:22 2011] [notice] Child 4656: All worker threads have exited.
    [Mon Aug 01 12:51:22 2011] [notice] Child 4656: Child process is exiting
    [Mon Aug 01 12:51:22 2011] [notice] Child 1816: Starting thread to listen on port 80.
    [Mon Aug 01 13:07:50 2011] [notice] Parent: Received restart signal -- Restarting the server.
    [Mon Aug 01 13:07:50 2011] [notice] Child 1816: Exit event signaled. Child process is ending.
    [Mon Aug 01 13:07:51 2011] [notice] Apache/2.2.19 (Win32) PHP/5.2.17 configured -- resuming normal operations
    [Mon Aug 01 13:07:51 2011] [notice] Server built: May 20 2011 17:39:35
    [Mon Aug 01 13:07:51 2011] [notice] Parent: Created child process 1176
    [Mon Aug 01 13:07:51 2011] [notice] Child 1176: Child process is running
    [Mon Aug 01 13:07:51 2011] [notice] Child 1176: Acquired the start mutex.
    [Mon Aug 01 13:07:51 2011] [notice] Child 1816: Released the start mutex
    [Mon Aug 01 13:07:51 2011] [notice] Child 1176: Starting 64 worker threads.
    [Mon Aug 01 13:07:52 2011] [notice] Child 1176: Starting thread to listen on port 80.
    [Mon Aug 01 13:07:55 2011] [notice] Child 1816: All worker threads have exited.
    [Mon Aug 01 13:07:55 2011] [notice] Child 1816: Child process is exiting
    [Mon Aug 01 13:21:04 2011] [notice] Parent: Received restart signal -- Restarting the server.
    [Mon Aug 01 13:21:04 2011] [notice] Child 1176: Exit event signaled. Child process is ending.
    [Mon Aug 01 13:21:04 2011] [notice] Apache/2.2.19 (Win32) PHP/5.2.17 configured -- resuming normal operations
    [Mon Aug 01 13:21:04 2011] [notice] Server built: May 20 2011 17:39:35
    [Mon Aug 01 13:21:04 2011] [notice] Parent: Created child process 3224
    [Mon Aug 01 13:21:04 2011] [notice] Child 3224: Child process is running
    [Mon Aug 01 13:21:05 2011] [notice] Child 3224: Acquired the start mutex.
    [Mon Aug 01 13:21:05 2011] [notice] Child 3224: Starting 64 worker threads.
    [Mon Aug 01 13:21:05 2011] [notice] Child 1176: Released the start mutex
    [Mon Aug 01 13:21:06 2011] [notice] Child 1176: All worker threads have exited.
    [Mon Aug 01 13:21:06 2011] [notice] Child 1176: Child process is exiting
    [Mon Aug 01 13:21:06 2011] [notice] Child 3224: Starting thread to listen on port 80.
    [Mon Aug 01 13:33:42 2011] [notice] Parent: Received restart signal -- Restarting the server.
    [Mon Aug 01 13:33:42 2011] [notice] Child 3224: Exit event signaled. Child process is ending.
    [Mon Aug 01 13:33:42 2011] [notice] Apache/2.2.19 (Win32) PHP/5.2.17 configured -- resuming normal operations
    [Mon Aug 01 13:33:42 2011] [notice] Server built: May 20 2011 17:39:35
    [Mon Aug 01 13:33:42 2011] [notice] Parent: Created child process 2636
    [Mon Aug 01 13:33:42 2011] [notice] Child 2636: Child process is running
    [Mon Aug 01 13:33:43 2011] [notice] Child 2636: Acquired the start mutex.
    [Mon Aug 01 13:33:43 2011] [notice] Child 2636: Starting 64 worker threads.
    [Mon Aug 01 13:33:43 2011] [notice] Child 3224: Released the start mutex
    [Mon Aug 01 13:33:44 2011] [notice] Child 3224: All worker threads have exited.
    [Mon Aug 01 13:33:44 2011] [notice] Child 3224: Child process is exiting
    [Mon Aug 01 13:33:44 2011] [notice] Child 2636: Starting thread to listen on port 80.
    [Mon Aug 01 13:33:52 2011] [notice] Parent: Received restart signal -- Restarting the server.
    [Mon Aug 01 13:33:52 2011] [notice] Child 2636: Exit event signaled. Child process is ending.
    [Mon Aug 01 13:33:53 2011] [notice] Apache/2.2.19 (Win32) PHP/5.2.17 configured -- resuming normal operations
    [Mon Aug 01 13:33:53 2011] [notice] Server built: May 20 2011 17:39:35
    [Mon Aug 01 13:33:53 2011] [notice] Parent: Created child process 4380
    [Mon Aug 01 13:33:53 2011] [notice] Child 4380: Child process is running
    [Mon Aug 01 13:33:53 2011] [notice] Child 4380: Acquired the start mutex.
    [Mon Aug 01 13:33:53 2011] [notice] Child 4380: Starting 64 worker threads.
    [Mon Aug 01 13:33:53 2011] [notice] Child 2636: Released the start mutex
    [Mon Aug 01 13:33:54 2011] [notice] Child 2636: All worker threads have exited.
    [Mon Aug 01 13:33:54 2011] [notice] Child 2636: Child process is exiting
    [Mon Aug 01 13:33:54 2011] [notice] Child 4380: Starting thread to listen on port 80.
    [Mon Aug 01 13:35:44 2011] [notice] Parent: Received restart signal -- Restarting the server.
    [Mon Aug 01 13:35:44 2011] [notice] Child 4380: Exit event signaled. Child process is ending.
    [Mon Aug 01 13:35:44 2011] [notice] Apache/2.2.19 (Win32) PHP/5.2.17 configured -- resuming normal operations
    [Mon Aug 01 13:35:44 2011] [notice] Server built: May 20 2011 17:39:35
    [Mon Aug 01 13:35:44 2011] [notice] Parent: Created child process 5092
    [Mon Aug 01 13:35:44 2011] [notice] Child 5092: Child process is running
    [Mon Aug 01 13:35:45 2011] [notice] Child 4380: Released the start mutex
    [Mon Aug 01 13:35:45 2011] [notice] Child 5092: Acquired the start mutex.
    [Mon Aug 01 13:35:45 2011] [notice] Child 5092: Starting 64 worker threads.
    [Mon Aug 01 13:35:46 2011] [notice] Child 4380: All worker threads have exited.
    [Mon Aug 01 13:35:46 2011] [notice] Child 4380: Child process is exiting
    [Mon Aug 01 13:35:46 2011] [notice] Child 5092: Starting thread to listen on port 80.
    [Mon Aug 01 13:35:59 2011] [notice] Parent: Received restart signal -- Restarting the server.
    [Mon Aug 01 13:35:59 2011] [notice] Child 5092: Exit event signaled. Child process is ending.
    [Mon Aug 01 13:35:59 2011] [notice] Apache/2.2.19 (Win32) PHP/5.2.17 configured -- resuming normal operations
    [Mon Aug 01 13:35:59 2011] [notice] Server built: May 20 2011 17:39:35
    [Mon Aug 01 13:35:59 2011] [notice] Parent: Created child process 216
    [Mon Aug 01 13:35:59 2011] [notice] Child 216: Child process is running
    [Mon Aug 01 13:36:00 2011] [notice] Child 216: Acquired the start mutex.
    [Mon Aug 01 13:36:00 2011] [notice] Child 5092: Released the start mutex
    [Mon Aug 01 13:36:00 2011] [notice] Child 216: Starting 64 worker threads.
    [Mon Aug 01 13:36:01 2011] [notice] Child 5092: All worker threads have exited.
    [Mon Aug 01 13:36:01 2011] [notice] Child 5092: Child process is exiting
    [Mon Aug 01 13:36:01 2011] [notice] Child 216: Starting thread to listen on port 80.
    [Mon Aug 01 13:44:21 2011] [notice] Parent: Received restart signal -- Restarting the server.
    [Mon Aug 01 13:44:21 2011] [notice] Child 216: Exit event signaled. Child process is ending.
    [Mon Aug 01 13:44:21 2011] [notice] Apache/2.2.19 (Win32) PHP/5.2.17 configured -- resuming normal operations
    [Mon Aug 01 13:44:21 2011] [notice] Server built: May 20 2011 17:39:35
    [Mon Aug 01 13:44:21 2011] [notice] Parent: Created child process 6112
    [Mon Aug 01 13:44:21 2011] [notice] Child 6112: Child process is running
    [Mon Aug 01 13:44:22 2011] [notice] Child 6112: Acquired the start mutex.
    [Mon Aug 01 13:44:22 2011] [notice] Child 216: Released the start mutex
    [Mon Aug 01 13:44:22 2011] [notice] Child 6112: Starting 64 worker threads.
    [Mon Aug 01 13:44:22 2011] [notice] Child 6112: Starting thread to listen on port 80.
    [Mon Aug 01 13:44:23 2011] [notice] Child 216: All worker threads have exited.
    [Mon Aug 01 13:44:23 2011] [notice] Child 216: Child process is exiting
      

  6.   

    解决:建立系统变量 PHPRC,值为php.ini所在路径。 
      

  7.   

    你先把不大可能用到的先屏蔽掉
    ;extension=php_bz2.dll
    ;extension=php_curl.dll
    ;extension=php_dba.dll
    ;extension=php_dbase.dll
    ;extension=php_fdf.dll
    ;extension=php_gettext.dll
    ;extension=php_gmp.dll
    ;extension=php_imap.dll
    ;extension=php_interbase.dll
    ;extension=php_ldap.dll
    ;extension=php_ming.dll
    ;extension=php_msql.dll
    ;extension=php_mssql.dll
    ;extension=php_oci8.dll
    ;extension=php_openssl.dll
    ;extension=php_pdo_firebird.dll
    ;extension=php_pdo_mssql.dll
    ;extension=php_pdo_oci.dll
    ;extension=php_pdo_oci8.dll
    ;extension=php_pdo_pgsql.dll
    ;extension=php_pgsql.dll
    ;extension=php_pspell.dll
    ;extension=php_shmop.dll
    ;extension=php_snmp.dll
    ;extension=php_sybase_ct.dll