PEAR Not Working

PEAR Not Working On WAMP

Page 1 of 1

2 Replies - 2249 Views - Last Post: 05 October 2009 - 01:04 PM Rate Topic: -----

#1 danielair  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 22
  • View blog
  • Posts: 118
  • Joined: 12-July 09

PEAR Not Working

Posted 04 October 2009 - 05:12 PM

Okay I'm using WAMP which is installed at "C:\wamp\". But I changed the directory root to "D:\www\" and its been working for awhile but I'm I'm trying to use PEAR and it's not working. I ran go-pear.exe and put everything in but when I try in include Mail.php (which I did install) I get the folowing error.
Fatal error: require_once() [function.require]: Failed opening required 'Mail.php' (include_path='.;C:\php5\pear') in D:\www\languages\php\mail\send.php on line 2


I can't seem to fix it. Any help would be awesome.
Thanks,
Daniel

Is This A Good Question/Topic? 0
  • +

Replies To: PEAR Not Working

#2 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4332
  • View blog
  • Posts: 12,127
  • Joined: 18-April 07

Re: PEAR Not Working

Posted 04 October 2009 - 05:55 PM

Ok, if you have PEAR installed then you need to install the Mail package for it. If you have installed that, you should see a file called Mail.php in a directory similar to c:\wamp\bin\php\php5.2.5\PEAR\Mail.php or reflecting the version of PHP you have installed. If you didn't install the Mail package yet, you will need to do that by going to a dos prompt and typing pear install --alldeps mail which will install the mail package with all dependencies. Then again go back and verify that Mail.php exists.

Then after that, you have to tell PHP.ini how to find this file. So you should see lines like this in your php.ini file...

;Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"



Uncomment the second line and change it to... include_path = ".;c:\wamp\bin\php\php5.2.5\PEAR" or reflecting your version of PHP. Then you just restart Apache.

After this everything should start working. The main problem is that you are having trouble finding the Mail.php file because either 1) You didn't install the mail package yet or 2) You don't have wamp's php.ini file looking in the right spot to find it.

Hope that clarifies everything. :)
Was This Post Helpful? 0
  • +
  • -

#3 danielair  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 22
  • View blog
  • Posts: 118
  • Joined: 12-July 09

Re: PEAR Not Working

Posted 05 October 2009 - 01:04 PM

The problem was the include_path in php.ini. I got it fixed now. Thanks for your help.

Thanks,
Daniel
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1