2009
03.14

默认情况下,BSD的ports安装的PECL命令,会出现错误:
# pecl
Fatal error: Call to undefined function preg_match() in …

问题的原因是出在 /usr/local/bin/pecl 的最后一行:

exec $PHP -C -n -q $INCARG -d output_buffering=1 -d safe_mode=0 …

这行代码里面的 -n 参数表示不加载PHP的配置文件 php.ini ,因此 pcre.so 就不会被加载而导致错误,
,你只要改一下这行代码,去掉 -n 参数即可搞定。

3 comments so far

Add Your Comment
  1. ben on April 15, 2009 at 9:26 pm  

    (Quote)
    said:

    非常喜欢你的blog。我叫ben。也是做linux系统运维工作的。

    谢谢支持,欢迎多交流,相互学习提高。

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word