PEAR and php.ini problem

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
sentback
Forum Newbie
Posts: 24
Joined: Fri May 04, 2007 9:46 am

PEAR and php.ini problem

Post 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
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post 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"
(#10850)
sentback
Forum Newbie
Posts: 24
Joined: Fri May 04, 2007 9:46 am

Post 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.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post 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.
sentback
Forum Newbie
Posts: 24
Joined: Fri May 04, 2007 9:46 am

Post 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 :)
Post Reply