Pear Path Problem ?

byfobi

Verified User
Joined
Oct 9, 2007
Messages
18
Hallo!

I have problem with PEAR on my serwer ..

ssh:
sh tan
79:~# which pear
/usr/local/bin/pear

PHP test code :?

PHP:
<?php
error_reporting(E_ALL);
#ini_set('include_path', '~/pear/lib'.PATH_SEPARATOR.ini_get('include_path'));
set_include_path('/usr/local/lib/php/'); //first test /usr/local/bin/pear
require_once 'PEAR.php';
if(!class_exists('PEAR')) die('PEAR NOT FOUND');
require_once 'DB.php';
require_once 'Cache.php';
require_once 'HTML/Template/Sigma.php';
?>
____


Problem.. pear path ?

Warning: require_once(PEAR.php) [function.require-once]: failed to open stream: No such file or directory in /home/esbav17/domains/esbav.org/public_html/a.php on line 5

Fatal error: require_once() [function.require]: Failed opening required 'PEAR.php' (include_path='/usr/local/lib/php/') in /home/esbav17/domains/esbav.org/public_html/a.php on line 5


How do I resolve the problem

Thank you
 
It tells you what the issue is with the error. Check your include_path in your php.ini file. Right now it only has "/usr/local/lib/php/". You can also do this via a htaccess file.
 
my php.ini file

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; UNIX: "/path1:/path2"
;include_path = "/usr/local/lib/php/"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"


htaccess ? code sample


I could not solve the problem

thank you..
 
You have a ; for include_path, which means you are commenting it out.

Uncomment it, add the correct path to PEAR, restart httpd, try again.
 
; UNIX: "/path1:/path2"
include_path = "/usr/local/lib/php/" save and apache restart

I could not solve the problem

sory
 
Back
Top