2012-04-12 121 views
1

所以我安裝了xdebug,但我猜測它的版本不對,因爲我下載了一個預編譯版本,但它不起作用,所以我決定自己做。我也跟着上了XDebug站點上的說明,當它涉及到運行phpize我得到以下錯誤:在OS X Lion上安裝xdebug 10.7.6

Cannot find config.m4. 
Make sure that you run './phpize' in the top level source directory of the module 

當我在目錄/ usr/bin中運行phpize我得到同樣的錯誤。

當我嘗試看看我運行的是什麼版本的phpize的,我得到以下錯誤:

grep: /usr/include/php/main/php.h: No such file or directory 
grep: /usr/include/php/Zend/zend_modules.h: No such file or directory 
grep: /usr/include/php/Zend/zend_extensions.h: No such file or directory 
Configuring for: 
PHP Api Version:   
Zend Module Api No:  
Zend Extension Api No: 

而且它阻止我在我的軌道的另一件事是,我沒有gcc編譯我已經unisntalled和現在重新安裝xcode兩次,但沒有任何優勢...

+1

Lion尚未達到10.7.6版本,只有10.7.3。 – Kyle 2012-04-15 21:22:18

回答

0

XDebug一直在工作我沒有在我的php.ini文件中轉換html_errors,並且我沒有將application_env更改爲我的index.php文件中的開發,因爲我正在使用zend Framework!對困惑感到抱歉。

1

您應該使用xdebug源代碼在目錄中運行phpize。它與xcode無關。然後使用make腳本編譯它並將結果模塊複製到php擴展文件夾中。你確定你從git獲得了正確的源代碼嗎?

+0

如果我這樣做,我得到這個錯誤: 的grep:/usr/include/php/main/php.h:沒有這樣的文件或目錄 的grep:/usr/include/php/Zend/zend_modules.h:沒有這樣的文件或目錄 的grep:/usr/include/php/Zend/zend_extensions.h:沒有這樣的文件或目錄 配置: PHP API版本: Zend的模塊API編號: Zend的擴展API編號: 無法找到autoconf的。請檢查您的autoconf安裝和$ PHP_AUTOCONF環境變量。然後,重新運行此腳本。 – Rik89 2012-04-12 14:07:20

+0

確實有幫助嗎?你可能有兩個php版本的衝突,因爲mac有一個預安裝,請參閱http://stackoverflow.com/questions/5789504/two-versions-of-php-on-mac-os-snow-leopard-installing- xdebug-using-pecl – 2012-04-12 14:19:00

+0

如果我使用php -i我得到5.3.8這也是我通過我的info.php文件得到的。我想這意味着我可以安裝兩次相同的版本?我不知道如何解決這個問題......哦,sudo根本沒有幫助.. – Rik89 2012-04-12 14:28:11