XAMPP:我编辑了 PHP.ini,现在 Apache 崩溃了
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1583033/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
XAMPP: I edited PHP.ini, and now Apache crashes
提问by Nick Heiner
I'm trying to set up XDebug for PHP. I edited some settings in my apache\bin\php.inifile, and now Apache crashes every couple page requests. (I wish I had saved a copy of php.ini before editing it. der.)
我正在尝试为 PHP 设置 XDebug。我在我的apache\bin\php.ini文件中编辑了一些设置,现在 Apache 每几个页面请求都会崩溃。(我希望我在编辑之前保存了一份 php.ini 的副本。der。)
I was following instructions here: http://robsnotebook.com/php_debugger_pdt_xdebug
我在这里遵循说明:http: //robsnotebook.com/php_debugger_pdt_xdebug
Here is the only section I changed. Does anything stand out as causing a problem?
这是我更改的唯一部分。有什么突出的问题会引起问题吗?
I removed the "local variables" stuff, but it's still having issues.
我删除了“局部变量”的东西,但它仍然有问题。
[Zend]
; zend_extension_ts = "C:\xampp\php\zendOptimizer\lib\ZendExtensionManager.dll"
;zend_extension_manager.optimizer_ts = "C:\xampp\php\zendOptimizer\lib\Optimizer"
;zend_optimizer.enable_loader = 0
;zend_optimizer.optimization_level=15
;zend_optimizer.license_path =
[XDebug]
;; Only Zend OR (!) XDebug
zend_extension_ts="C:\xampp\php\ext\php_xdebug-2.0.5-5.2.dll"
xdebug.remote_enable=true
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=0
xdebug.profiler_output_dir="C:\xampp\tmp"
Here is the Apache error log from my flailing around: (Not all of these errors were generated from the above configuration.)
这是我四处乱窜的 Apache 错误日志:(并非所有这些错误都是由上述配置生成的。)
[Sat Oct 17 15:12:28 2009] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Sat Oct 17 15:12:28 2009] [notice] Child 2692: Exit event signaled. Child process is ending.
[Sat Oct 17 15:12:29 2009] [notice] Child 2692: Released the start mutex
[Sat Oct 17 15:12:30 2009] [notice] Child 2692: All worker threads have exited.
[Sat Oct 17 15:12:31 2009] [notice] Child 2692: Child process is exiting
[Sat Oct 17 15:12:47 2009] [notice] Parent: Child process exited successfully.
[Sat Oct 17 15:12:56 2009] [notice] Digest: generating secret for digest authentication ...
[Sat Oct 17 15:12:56 2009] [notice] Digest: done
PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
PHP Warning: Module 'xdebug' already loaded in Unknown on line 0
[Sat Oct 17 15:12:57 2009] [notice] Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8 configured -- resuming normal operations
[Sat Oct 17 15:12:57 2009] [notice] Server built: Dec 10 2008 00:10:06
[Sat Oct 17 15:12:57 2009] [notice] Parent: Created child process 4648
[Sat Oct 17 15:12:58 2009] [notice] Digest: generating secret for digest authentication ...
[Sat Oct 17 15:12:58 2009] [notice] Digest: done
PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
PHP Warning: Module 'xdebug' already loaded in Unknown on line 0
[Sat Oct 17 15:12:58 2009] [notice] Child 4648: Child process is running
[Sat Oct 17 15:12:58 2009] [notice] Child 4648: Acquired the start mutex.
[Sat Oct 17 15:12:58 2009] [notice] Child 4648: Starting 250 worker threads.
[Sat Oct 17 15:12:58 2009] [notice] Child 4648: Starting thread to listen on port 443.
[Sat Oct 17 15:12:58 2009] [notice] Child 4648: Starting thread to listen on port 80.
[Sat Oct 17 15:13:24 2009] [notice] Parent: child process exited with status 255 -- Restarting.
[Sat Oct 17 15:13:46 2009] [warn] pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Oct 17 15:13:46 2009] [notice] Digest: generating secret for digest authentication ...
[Sat Oct 17 15:13:46 2009] [notice] Digest: done
PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
PHP Warning: Module 'xdebug' already loaded in Unknown on line 0
[Sat Oct 17 15:13:46 2009] [notice] Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8 configured -- resuming normal operations
[Sat Oct 17 15:13:46 2009] [notice] Server built: Dec 10 2008 00:10:06
[Sat Oct 17 15:13:46 2009] [notice] Parent: Created child process 6232
[Sat Oct 17 15:13:47 2009] [notice] Digest: generating secret for digest authentication ...
[Sat Oct 17 15:13:47 2009] [notice] Digest: done
PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
PHP Warning: Module 'xdebug' already loaded in Unknown on line 0
[Sat Oct 17 15:13:47 2009] [notice] Child 6232: Child process is running
[Sat Oct 17 15:13:47 2009] [notice] Child 6232: Acquired the start mutex.
[Sat Oct 17 15:13:47 2009] [notice] Child 6232: Starting 250 worker threads.
[Sat Oct 17 15:13:47 2009] [notice] Child 6232: Starting thread to listen on port 80.
[Sat Oct 17 15:13:48 2009] [notice] Child 6232: Starting thread to listen on port 443.
[Sat Oct 17 15:13:57 2009] [notice] Parent: child process exited with status 255 -- Restarting.
[Sat Oct 17 15:16:31 2009] [warn] pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Oct 17 15:16:31 2009] [notice] Digest: generating secret for digest authentication ...
[Sat Oct 17 15:16:31 2009] [notice] Digest: done
PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
PHP Warning: Module 'xdebug' already loaded in Unknown on line 0
[Sat Oct 17 15:16:32 2009] [notice] Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8 configured -- resuming normal operations
[Sat Oct 17 15:16:32 2009] [notice] Server built: Dec 10 2008 00:10:06
[Sat Oct 17 15:16:32 2009] [notice] Parent: Created child process 480
[Sat Oct 17 15:16:32 2009] [notice] Digest: generating secret for digest authentication ...
[Sat Oct 17 15:16:32 2009] [notice] Digest: done
PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
PHP Warning: Module 'xdebug' already loaded in Unknown on line 0
[Sat Oct 17 15:16:33 2009] [notice] Child 480: Child process is running
[Sat Oct 17 15:16:33 2009] [notice] Child 480: Acquired the start mutex.
[Sat Oct 17 15:16:33 2009] [notice] Child 480: Starting 250 worker threads.
[Sat Oct 17 15:16:33 2009] [notice] Child 480: Starting thread to listen on port 80.
[Sat Oct 17 15:16:33 2009] [notice] Child 480: Starting thread to listen on port 443.
[Sat Oct 17 15:17:20 2009] [notice] Parent: child process exited with status 255 -- Restarting.
[Sat Oct 17 15:18:30 2009] [warn] pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Oct 17 15:18:30 2009] [notice] Digest: generating secret for digest authentication ...
[Sat Oct 17 15:18:30 2009] [notice] Digest: done
PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
[Sat Oct 17 15:18:30 2009] [notice] Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8 configured -- resuming normal operations
[Sat Oct 17 15:18:30 2009] [notice] Server built: Dec 10 2008 00:10:06
[Sat Oct 17 15:18:30 2009] [notice] Parent: Created child process 3148
[Sat Oct 17 15:18:31 2009] [notice] Digest: generating secret for digest authentication ...
[Sat Oct 17 15:18:31 2009] [notice] Digest: done
PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
[Sat Oct 17 15:18:31 2009] [notice] Child 3148: Child process is running
[Sat Oct 17 15:18:31 2009] [notice] Child 3148: Acquired the start mutex.
[Sat Oct 17 15:18:31 2009] [notice] Child 3148: Starting 250 worker threads.
[Sat Oct 17 15:18:31 2009] [notice] Child 3148: Starting thread to listen on port 443.
[Sat Oct 17 15:18:31 2009] [notice] Child 3148: Starting thread to listen on port 80.
[Sat Oct 17 15:18:41 2009] [notice] Parent: child process exited with status 255 -- Restarting.
[Sat Oct 17 15:32:52 2009] [warn] pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Oct 17 15:32:52 2009] [notice] Digest: generating secret for digest authentication ...
[Sat Oct 17 15:32:52 2009] [notice] Digest: done
PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
PHP Fatal error: [Zend Optimizer] Zend Optimizer 3.3.3 is incompatible with Xdebug 2.0.5 in Unknown on line 0
[Sat Oct 17 15:33:03 2009] [warn] pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Oct 17 15:33:03 2009] [notice] Digest: generating secret for digest authentication ...
[Sat Oct 17 15:33:03 2009] [notice] Digest: done
PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
PHP Fatal error: [Zend Optimizer] Zend Optimizer 3.3.3 is incompatible with Xdebug 2.0.5 in Unknown on line 0
[Sat Oct 17 15:33:15 2009] [warn] pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Oct 17 15:33:15 2009] [notice] Digest: generating secret for digest authentication ...
[Sat Oct 17 15:33:15 2009] [notice] Digest: done
PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
[Sat Oct 17 15:33:16 2009] [notice] Apache/2.2.11 (Win32) DAV/2 mod_ssl/2.2.11 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.8 configured -- resuming normal operations
[Sat Oct 17 15:33:16 2009] [notice] Server built: Dec 10 2008 00:10:06
[Sat Oct 17 15:33:16 2009] [notice] Parent: Created child process 3336
[Sat Oct 17 15:33:17 2009] [notice] Digest: generating secret for digest authentication ...
[Sat Oct 17 15:33:17 2009] [notice] Digest: done
PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown on line 0
[Sat Oct 17 15:33:17 2009] [notice] Child 3336: Child process is running
[Sat Oct 17 15:33:17 2009] [notice] Child 3336: Acquired the start mutex.
[Sat Oct 17 15:33:17 2009] [notice] Child 3336: Starting 250 worker threads.
[Sat Oct 17 15:33:17 2009] [notice] Child 3336: Starting thread to listen on port 443.
[Sat Oct 17 15:33:17 2009] [notice] Child 3336: Starting thread to listen on port 80.
[Sat Oct 17 15:33:34 2009] [error] [client 127.0.0.1] client denied by server configuration: C:/xampp/security/htdocs/lang.php, referer: http://localhost/xampp/navi.php
[Sat Oct 17 15:33:50 2009] [notice] Parent: child process exited with status 3221225477 -- Restarting.
回答by troelskn
This:
这个:
zend_optimizer.license_path =
Local Variables:
tab-width: 4
End:
Is definitely not valid part of php.ini. Looks like some leftover from your text editor.
绝对不是php.ini. 看起来像是你的文本编辑器的一些剩余物。
If Apache crashes, see in the apache logfile. On your setup, it's probably in something like C:\xampp\log\error.logor some such thing.
如果 Apache 崩溃,请参阅 apache 日志文件。在您的设置中,它可能是类似C:\xampp\log\error.log或类似的东西。
回答by Box
Please note that don't uncomment the following line:
请注意,不要取消注释以下行:
;extension=php_xdebug.dll

