PEAR Package not found by PHP Script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • snowdonkey
    New Member
    • Aug 2006
    • 37

    PEAR Package not found by PHP Script

    I'm trying to use the Mail package from PEAR in a script that sends an e-mail over SMTP. The problem is that the Mail class in Mail.php provided by the package isn't found by the script. I'm using:

    [PHP]require_once "Mail.php";[/PHP]

    and I get the messages:

    Warning: require_once(Ma il.php) [function.requir e-once]: failed to open stream: No such file or directory in D:\Program Files\Apache 2.2.3\htdocs\tp t\send_mail.php on line 12

    Fatal error: require_once() [function.requir e]: Failed opening required 'Mail.php' (include_path=' .;C:\php5\pear' ) in D:\Program Files\Apache 2.2.3\htdocs\tp t\send_mail.php on line 12
    I've made sure that include_path in my php.ini file is directed to my PEAR folder containing pear.bat. It looks like this (I've tried different capitalizations ):

    ; Windows: "\path1;\pa th2"
    include_path = ".;c:\php5\pear "

    I tried setting the include path in the script instead using ini_set() and that didn't work either. Neither did explicitly saying [PHP]require_once "c:\php5\pear\p ear.Mail.php".[/PHP]

    The PEAR package is in the system PATH and I verified its installation with "pear list" in the command console. I'm running Windows XP SP2, PHP 5.2.0, and Apache 2.2.3. Thanks!
Working...