Page 1 of 1

PEAR Library erroring

Posted: Wed Apr 07, 2010 4:26 pm
by meh_
trying to run down an issue reported which i suspect an update clipped a pear library, library reference or permission as no code changes were dropped.

PHP Fatal error: Call to undefined function

posix_getpwuid() in /usr/share/pear/Crypt/GPG/Engine.php

is there a listing of the unsafe php functions for asl - is posix_getpwuid function considered a function that needs to be whitelisted?

php, 5.2.13
pear 1.7.2
include_path .:/usr/share/pear:/usr/share/php
safe_mode_include_dir /usr/share/pear

Re: PEAR Library erroring

Posted: Wed Apr 07, 2010 4:30 pm
by scott
Nothing in ASL about that one

Re: PEAR Library erroring

Posted: Wed Apr 07, 2010 5:16 pm
by mikeshinn
meh_,

A couple of ideas, do you have a "php-posix" package installed? If so, check check the permissions and ownership on the PHP code itself. I believe in your case it should be apache.apache.

Also, in case anyone using php 5.3, or 5.2.13 reads this, you need to install php-process.

Re: PEAR Library erroring

Posted: Wed Apr 07, 2010 11:00 pm
by aus-city
Hi Mike,

Thanks for the info about php-process.

Is it generally required / recommended for 5.2.13 and 5.3.x or only if your using php-pear?

Re: PEAR Library erroring

Posted: Thu Apr 08, 2010 12:14 pm
by meh_
Thanks much for the info Guys.

Package php-common-5.2.13-1.el5.art.i386 is installed

Tried also installing the php-posix package as it was not listed. Yum indicates already installed as part of
Package php-common-5.2.13-1.el5.art.i386

I'll dig into permissions to see if something got modified there. At /usr/share/pear everything is recursively owned by root.root.

Re: PEAR Library erroring

Posted: Thu Apr 08, 2010 12:20 pm
by meh_
actually, meant php-process is already installed as well on the second line of my post, to correct.

Re: PEAR Library erroring

Posted: Thu Apr 08, 2010 11:19 pm
by mikeshinn
Is the function still missing?

Your other option would be to roll back to the version of PHP that had the function. You can do that with this command:

rpm -Uvh --oldpackage /var/cache/yum/atomic/php-(whatever_version).rpm