0
votes

I'm trying to send mail using PEAR framework (and WAMP).

I installed PEAR and package MAIL and it is in correct folder. Problem is with include_path in php.ini.

When I checked where is my php.ini (php --ini), I have result:

Configuration File (php.ini) Path: C:\Windows

Loaded Configuration File: C:\wamp\bin\php\php5.3.13\php.ini

Scan for additional .ini files in:

Additional .ini files parsed:

In C:\wamp\bin\php\php5.3.13\php.ini I set:

include_path = ".;C:\wamp\bin\php\php5.3.13\pear"

And I restarded WAMP.

After click button to send mail, I have following error:

Warning: include(Mail.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\send_mail.php on line 2

Warning: include() [function.include]: Failed opening 'Mail.php' for inclusion (include_path='.;C:\php\pear') in C:\wamp\www\send_mail.php on line 2

Fatal error: Class 'Mail' not found in C:\wamp\www\send_mail.php on line 45

No idea, why include_path is here '.;C:\php\pear'.

1
did u restart yr wamp server?? - Rajat Singhal
Look at your phpinfo() to know exactly what ini file(s) are being used. The file may differ between cli and apache calls (php --ini is misleading) - Mike B
You maybe also need some sort of PEAR autoloader, which searches in subdirectories to …/pear/. - feeela
Mike B, thank you a lot for your help. As you say, phpinfo() show another path than php --ini. - cadi2108

1 Answers

1
votes

Mike B told me to look at your phpinfo() to know exactly what ini file(s) are being used. The file was differ between cli and apache calls (php --ini is misleading).