views:

385

answers:

2

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 :'(

+1  A: 

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

Check that file exists. Make sure the paths are right

TIMEX
The file its there though - I'm requiring the files using a single require file with all my require statements. Its beyond my beliefe why he can't locate that one file whilst he can require all others :(
Ali
+2  A: 

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.

ufk