每当我尝试在命令行上运行 PHP 脚本时,它都会立即崩溃。我得到这个错误:
Xdebug requires Zend Engine API version 220090626.
The Zend Engine API version 220100525 which is installed, is newer.
Contact Derick Rethans at http://xdebug.org/docs/faq#api for a later version of Xdebug.
Warning: PHP Startup: imap: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0
Warning: PHP Startup: gettext: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0
Warning: PHP Startup: mcrypt: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0
Warning: PHP Startup: yaz: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0
Warning: PHP Startup: pgsql: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0
Warning: PHP Startup: pdo_pgsql: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0
Warning: PHP Startup: pdo_mysql: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0
Warning: PHP Startup: uploadprogress: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0
Fatal error: Directive 'allow_call_time_pass_reference' is no longer available in PHP in Unknown on line 0
这是我的 .profile 的 PHP 部分。
# make sure we use MAMP version of php and other binaries
export PATH=/Applications/MAMP/bin/php/php5.3.14/bin/:$PATH
# make sure we use MAMP version of mysql and other binaries
export PATH=/Applications/MAMP/Library/bin:$PATH
# make sure we are using the same php.ini as MAMP PRO
export PHPRC='/Library/Application Support/appsolute/MAMP PRO/conf/php.ini'
# make brew doctor happy
export PATH=/usr/local/bin:$PATH
export PATH=/usr/local/sbin:$PATH
这已经工作了几个月没有问题。但至少我更新到 Maverik 并且不得不更新 XCode 和许多自制软件。毕竟我认为我所有的 PHP 东西都来自 MAMP,不应该与此相关。
有任何想法吗?