| 1:48 pm on Jul 12, 2011 (gmt 0)|
Yep, ":" delimits multiple paths on Linux (";" on Windows) - the value of the PATH_SEPARATOR constant.
Do you have permission to access "/usr/share/psa-pear/" from "/var/www/vhosts/site.com/httpdocs/"? Try specifying the full absolute path to check.
| 2:42 pm on Jul 12, 2011 (gmt 0)|
I tried changing with "chown", I tried changing the php file that calls this and then the complete path, none of them helped, then I am thinking it should have said something about permission, but it simply says it can't find it. I found many users online with same problem, very frustrating.
Trying full path (like include("/usr/share/pear/System.php";) shows an additional "operation not permitted".
| 2:58 pm on Jul 12, 2011 (gmt 0)|
Pff... I had to add the pear path to open_basedir by editing vhost.conf file (I use plesk).
Maybe someone else needs this, so I edited/created file:
And inside it I placed this:
|<Directory /var/www/vhosts/site.com/httpdocs/> |
php_admin_value open_basedir "/var/www/vhosts/site.com/httpdocs/:/tmp/:/usr/share/pear"
php_admin_value include_path ".:/usr/share/pear"
Restarted with "/etc/init.d/httpd restart" and it found the pear include files.
Edit: to avoid confusion for others, I seem to have pear in both these locations:
I think "psa" one came with plesk, the other was installed today.
| 3:07 pm on Jul 12, 2011 (gmt 0)|
Glad you got it sorted and thanks for the follow up.
|...then I am thinking it should have said something about permission, but it simply says it can't find it. |
I don't think PHP (at least at the user level) has any concept of permissions in this respect. If PHP can't see the file (for whatever underlying reason) it simply baulks with "...No such file or directory...".
| 3:19 pm on Jul 12, 2011 (gmt 0)|
Well, I remember sometimes PHP does mention "open_basedir in effect" next to errors, it would have helped now :)
| 4:04 pm on Jul 12, 2011 (gmt 0)|
Hhhmmm yes, indeed! :)