Re: Re: Problem using Config.php

From: Date: Wed, 25 Oct 2006 02:41:48 +0000
Subject: Re: Re: Problem using Config.php
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-25621@lists.php.net to get a copy of this message
On Tue, 24 Oct 2006 18:59:12 -0500, Gregory Beaver <greg@chiaraquartet.net> wrote:
Matthias Otto wrote:
Hallo! I have got two problems. 1) There is some problem with pear installation: I have installed the Ubuntu-package. Pear was installed into "/usr/share/php/PEAR/". Now I want to use Config.php. But I get the message "No such file or directory". I checked php.ini and included "/usr/share/php/PEAR/" to include_path. But still the error message remains the same. 2) Then I included the full path into the require_once string. Now file Config.php is recognized. I want to use class Config() as in the documentation examples given. But now I get the message "Class 'Config' not found". And I realy can't find the class definition nowhere.
sudo pear install Config Then you will have the Config file in /usr/share/php/PEAR/Config.php
At a guess Matthias I would say you got the two meanings of PEAR confused. /usr/share/php/PEAR/Config.php contains PEAR_Config which is part of the PEAR Installer package. In your setup (which looks like the default one) /usr/share/php contains the installed PEAR Repositiory. To make use of the Config package available through PEAR use the command Greg mentioned: sudo pear install Config Once done update your php.ini so the include path contains /usr/share/php not /usr/share/php/PEAR. Then you will have the Config package available at /usr/share/php/Config.php and includable via require_once 'Config.php'; Adam Ashley

« previous php.pear.general (#25621) next »