开发者

PHP in Eclipse/PDT on Mac - posix_getpwuid not found

Anyone has an idea why the following can happen: PHP installed with mac ports (php5, v. 5.3.6) as /opt/local/bin/php can run posix functions fine, and phpinfo() shows posix installed. But when I run a script with posi开发者_如何转开发x_getpwuid in Eclipse/PDT, it complains:

Fatal error: Call to undefined function posix_getpwuid() in <filename>

Do I need to add something to the "PHP Libraries" setting in Eclipse?


You are using php 5.3+.

posix_getpwuid() is a part of POSIX.

"As of PHP 5.3.0 [POSIX] extension is deprecated, calling any function provided by this extension will issue an E_DEPRECATED notice."

more here: http://www.php.net/manual/en/intro.regex.php

Solutions:

  1. use php 5.2

  2. install POSIX extension

  3. if posix_getpwuid() is only problem problem you have with POSIX, try function offered by "martin at arp242 dot net" - look for it here: http://php.net/manual/en/function.posix-getpwuid.php

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜