如何在Mavericks升级后摆脱终端中的PHP错误

时间:2013-11-12 16:43:05

标签: php mcrypt

我最近将Mac升级为Mavericks,即新操作系统。作为升级的一部分,Apple将PHP更新为5.4。我为PHP安装了mcrypt扩展,在mcrypt工作和没有安装错误方面都很好。

但它有不必要的副作用。现在,当我在终端的命令行运行PHP命令(如php -v)时,我收到以下错误:

PHP Warning:  PHP Startup: Unable to load dynamic library '/php_pdo_firebird.dll' - dlopen(/php_pdo_firebird.dll, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/php_pdo_mysql.dll' - dlopen(/php_pdo_mysql.dll, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/php_pdo_oci.dll' - dlopen(/php_pdo_oci.dll, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/php_pdo_odbc.dll' - dlopen(/php_pdo_odbc.dll, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/php_pdo_pgsql.dll' - dlopen(/php_pdo_pgsql.dll, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/php_pdo_sqlite.dll' - dlopen(/php_pdo_sqlite.dll, 9): image not found in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/php_sqlite3.dll' - dlopen(/php_sqlite3.dll, 9): image not found in Unknown on line 0
PHP 5.4.17 (cli) (built: Aug 25 2013 02:03:38)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

作为mcrypt安装的一部分,我将extension_dir更改为mcrypt库的路径。我想这就是我收到这个错误的原因。如果我将extension_dir更改为其他内容,则会更改错误消息中这些库的路径。如果我注释掉extension_dir,我会获得mcrypt扩展名的目录,即/usr/lib/php/extensions/no-debug-non-zts-20100525/mcrypt.so

所以我的问题是,我应该使用哪条路径来加载这些库? PHP安装中设置的默认值是什么?我用Google搜索,无法找到它。我以为是./,但这不起作用。实际上,我认为该行在默认安装中已注释掉,但就像我说的那样,注释extension_dir不起作用。

0 个答案:

没有答案