Koozali.org: home of the SME Server

PEAR.php not found

Offline reloded

  • 2
  • +0/-0
PEAR.php not found
« on: August 25, 2007, 07:00:33 AM »
Hi guys. I've just installed SME 7.2. I need to run timetrex time manager. Now, the last hurdle I have while installing timetrex is PEAR. I need to have PHP recognize the pear directory -or so I understand. However, so far no luck. Take a look at this conversation.

If you won't understand the paraphrasing here, please take a look at the following link (http://forums.timetrex.com/viewtopic.php?p=2188#2188)

While installing timetrex I get,
Quote
PHP's PEAR package is not installed. TimeTrex requires PEAR to be installed.
On most Linux distributions installing the php-pear package is enough.

The numbered lines (1,2,3,4) are what the technical guys at timetrex said were possilbe causes of the error above. What follows is my answer.

1. /etc/php.ini isn't the correct php.ini file
phpinfo() gives the following output
Quote
Configuration File (php.ini) Path /etc/php.in


2. the include_path in php.ini is incorrect or not properly set.
my phpinfo() shows:
Quote
Directive....................Local Value............................................Master Value
include_path .:/usr/share/pear-addons:/usr/share/pear    .:/usr/share/pear-addons:/usr/share/pear

3. /usr/share/pear/PEAR.php doesn't actually exist.
Quote
[root@vassrv ~]# ls -l /usr/share/pear/PEAR.php
-rw-r--r-- 1 root root 34266 Feb 17 2007 /usr/share/pear/PEAR.php

4. The user that your web server runs as doesn't have permissions to read /usr/share/pear/PEAR.php.
I changed permissions for PEAR.php
Quote
[root@vassrv ~]# ls -l /usr/share/pear/PEAR.php
-rwxrwxrwx 1 apache apache 34266 Feb 17 2007 /usr/share/pear/PEAR.php


Finally, the technical lad there had this to say:

Quote
Create a file like: test.php that contains the following:
Code:
<?php
require('PEAR.php');
exit;
?>

the run: php test.php

Does it fail and give you an error?
As well are you using ACLs or any other "high" security settings in CentOS? Those can often cause odd problems like this.

Well, I ran the php script and it does not give an error. It goes through without any message

As for the ACL question, I really don't know!

So, what could be the problem?

« Last Edit: August 25, 2007, 07:07:14 AM by reloded »

Offline pfloor

  • *****
  • 889
  • +1/-0
Re: PEAR.php not found
« Reply #1 on: August 25, 2007, 07:41:21 AM »
You left out one VERY important detail:

Quote
My system is SME Server (CentOS). I have upgraded PHP and MYSQL to meet TimeTrex requirements...

This may be your problem.  What version did you upgrade to?  How did you do it?

On a stock server pear works fine.  The test.php script produces this:

[root@bones ~]# php test.php
Content-type: text/html
X-Powered-By: PHP/4.3.9

[root@bones ~]#

In life, you must either "Push, Pull or Get out of the way!"

Offline reloded

  • 2
  • +0/-0
Re: PEAR.php not found
« Reply #2 on: August 25, 2007, 09:35:30 AM »
Hi.

1. What version did you upgrade to (From test.php())
Quote
PHP Version 5.1.6

2. How
I removed php-domxml first and then
Quote
$ yum --enablerepo=centosplus upgrade php*
-In the process it downloaded the required mysql