標籤:top received ges ace 檔案 apach hand handle ...
其實已經做PHP超過2年了,但是今天特別有感觸,所以把過程寫在這裡
環境是win7+apache2.2+php5.3,因為某種原因,必須使用這個版本.
然後就死活配置不出來.apache日誌如下:
[Fri Dec 23 00:23:12 2016] [notice] Parent: Received restart signal -- Restarting the server.
Failed loading php_xdebug-2.2.7-5.3-vc9.dll
8: Exit event signaled. Child process is ending.
httpd.exe: Could not reliably determine the server‘s fully qualified domain name, using 192.168.1.100 for ServerName
[Fri Dec 23 00:23:12 2016] [notice] Digest: generating secret for digest authentication ...
[Fri Dec 23 00:23:12 2016] [notice] Digest: done
[Fri Dec 23 00:23:13 2016] [notice] Child 8608: Released the start mutex
[Fri Dec 23 00:23:14 2016] [notice] Apache/2.2.22 (Win32) DAV/2 mod_ssl/2.2.22 OpenSSL/0.9.8t PHP/5.3.29 configured -- resuming normal operations
[Fri Dec 23 00:23:14 2016] [notice] Server built: Jan 28 2012 11:16:39
[Fri Dec 23 00:23:14 2016] [notice] Parent: Created child process 14436
httpd.exe: Could not reliably determine the server‘s fully qualified domain name, using 192.168.1.100 for ServerName
[Fri Dec 23 00:23:14 2016] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri Dec 23 00:23:14 2016] [notice] Child 8608: All worker threads have exited.
[Fri Dec 23 00:23:14 2016] [notice] Child 8608: Child process is exiting
Failed loading php_xdebug-2.2.7-5.3-vc9.dll
httpd.exe: Could not reliably determine the server‘s fully qualified domain name, using 192.168.1.100 for ServerName
[Fri Dec 23 00:23:15 2016] [notice] Digest: generating secret for digest authentication ...
[Fri Dec 23 00:23:15 2016] [notice] Digest: done
[Fri Dec 23 00:23:16 2016] [notice] Child 14436: Child process is running
[Fri Dec 23 00:23:16 2016] [notice] Child 14436: Acquired the start mutex.
[Fri Dec 23 00:23:16 2016] [notice] Child 14436: Starting 64 worker threads.
[Fri Dec 23 00:23:16 2016] [notice] Child 14436: Starting thread to listen on port 80.
然後經過網上好一頓查,大概花了三個小時,終於找到一個工具
https://xdebug.org/wizard.php
這工具只要把phpinfo()列印出來的東西,複製進去,就能告訴你為什麼xdebug載入不了。
得到的回複我沒有儲存下來,但我通過這個知道,我的apache是vc9編譯的,我選的是thread(也就是安全執行緒),然後雖然我是64位系統,但我的apache是32位的。
然後我就去xdebug官網下載了適合的版本。終於xdebug出現了。
最後。這地方我不知道網上為什麼大部分教程這個地方都是檔案名稱而不是路徑,我的沒有路徑是行不通的。
zend_extension=C:\Develop\php53\ext\php_xdebug-2.2.7-5.3-vc9.dll
xdebug.profiler_enable=on
xdebug.auto_trace=on
xdebug.collect_params=on
xdebug.collect_return=on
xdebug.show_exception_trace = On
xdebug.remote_autostart = On
xdebug.remote_enable = On
xdebug.collect_vars = On
xdebug.remote_handler = dbgp
xdebug.remote_host= localhost
xdebug.remote_port = 9000
xdebug.idekey = PHPSTORM
感觸
1:重點是開源項目一定要讀文檔,無論多大年紀,只要想做編程,就要好好學英語!
2:使用軟體,如果出問題,一定要查日誌,切記切記!
3:成熟軟體沒有解決不了的問題,一定要耐心,切記切記!
PHP配置xdebug