开发者

Problem with sending emails using Zend Mail

Something is wrong here - whenever I try to send two different emails using the Zend Mail function i.e. creating a Zend mail object then populating it with needed details and sending - it works the first time but immediately if I repeat开发者_运维技巧 the process for another email with other details... IT DIES OUT giving me this silly error!!!

[22-Oct-2009 12:57:45] PHP Warning:  require_once(Zend/Mail/Protocol/Exception.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in C:\wamp\www\somesite\library\Zend\Mail\Protocol\Abstract.php on line 275

[22-Oct-2009 12:57:45] PHP Fatal error:  require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'Zend/Mail/Protocol/Exception.php' (include_path='C:\wamp\www\fltdata;../library;.;C:\php5\pear;../application/models') in C:\wamp\www\somesite\library\Zend\Mail\Protocol\Abstract.php on line 275

I've been at it for two hours now and have no idea why is this happening! Help please :'(


include_path='C:\wamp\www\fltdata;../library;.;C:\php5\pear;../application/models'

Your include path shows that you pointed the location of Zend Framework as '../library' which is a dynamic located that is associated with the current running directory.

if the file Zend/Mail/Protocol/Exception.php at the first time can be found ad on the 2nd time can't, it just means that on the second time the working directory was changed and because of that ../library does no longer points to Zend Framework.

I would recommend using a full path to Zend Framework library instead of dynamic path.


You're trying to require a file. However, that file doesn't exist.

Check that file exists. Make sure the paths are right


In my index.php i have:

set_include_path('.' . PATH_SEPARATOR . '../library'
   . PATH_SEPARATOR . get_include_path());

I chagned to:

set_include_path( $_SERVER['DOCUMENT_ROOT'].'/library'
   . PATH_SEPARATOR . get_include_path());

And this works me.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜