Page 1 of 1

PEAR and php.ini problem

Posted: Fri May 04, 2007 9:28 pm
by sentback
Hi

I've installed a fresh copy of WAMP and installed PEAR. During the installation, it warned me that include_path needs to be set in php.ini in order for PEAR packages to work. I've first tried to run a test script to see if it will work. I got Fatal error: require_once() [function.require]: Failed opening required 'HTML/QuickForm.php' (include_path='.;C:\php5\pear'). I've changed the include_path in the php.ini file to include_path = ".:/wamp/php/PEAR". It didn't work. I've changed both php.ini files, the one in c:\wamp\php and c:\wamp\Apache2\bin and I still get the same error message. It's like I can't change the include_path. Oh and yes, I've restarted the server every time. I ran out of ideas, please help me. Thanks

Posted: Fri May 04, 2007 10:05 pm
by Christopher
You should have only one php.ini file. I would recommend searching your disk and deleting all of them except the one in the PHP directory. Where are you PEAR files and other common libraries installed? I recall that one windows the default is something like

include_path = ".;c:\php\includes"

Posted: Fri May 04, 2007 10:34 pm
by sentback
Yes, the default is include_path = ".;c:\php\includes" but since I've installed WAMP it is in the wamp folder (c:\wamp\php). My PEAR files are installed in c:\wamp\php\PEAR. Maybe I should also say that I've tried to modify include_path with ini_set("include_path", "c:\wamp\php\PEAR"); and it worked (the error message was gone) but it didn't change it permanently.

Posted: Fri May 04, 2007 10:36 pm
by John Cartwright
ini_set() is for runtime configurations, hense why the change isn't permanent. Change your php.ini like arborint suggested, and restart your server.

Posted: Fri May 04, 2007 10:44 pm
by sentback
I've done that, it didn't work. The problem is that no matter how I change the php.ini file, the ini_get('include_path') keeps returning me path: '.;C:\php5\pear'. Like I'm not changing the right file. And I have restarted the server. Close to 50 times now :)