Hey all, my EZ mail parser has be running GREAT for weeks since I  
launched it. Last night I had a VERY weird error occur. I had an email  
come in from a user with an image attachement. The file name was that  
appeared in the email was:

"cam_data_photo067.jpg"

but for some reason It hung the script when it was trying to parse.  
The error I receive is something along the lines of:

<br />
<b>Warning</b>:  fopen(/tmp/12174-1/cam_data/photo067.jpg) [<a  
href='function.fopen'>function.fopen</a>]: failed to open stream: No  
such file or directory in <b>/usr/include/php/ezcomponents-2007.1.1/ 
Mail/src/parser/parts/file_parser.php</b> on line <b>131</b><br />
<br />
<b>Warning</b>:  stream_filter_append() expects parameter 1 to be  
resource, boolean given in <b>/usr/include/php/ezcomponents-2007.1.1/ 
Mail/src/parser/parts/file_parser.php</b> on line <b>173</b><br />
<br />
b>Fatal error</b>:  Uncaught exception 'ezcBaseFileNotFoundException'  
with message 'The file '/tmp/12174-1/cam_data/photo067.jpg' could not  
be found.' in /usr/include/php/ezcomponents-2007.1.1/Mail/src/parts/ 
fileparts/disk_file.php:86
Stack trace:
#0 /usr/include/php/ezcomponents-2007.1.1/Mail/src/parts/file.php(93):  
ezcMailFile-&gt;__set('fileName', '/tmp/12174-1/ca...')
#1 /usr/include/php/ezcomponents-2007.1.1/Mail/src/parts/fileparts/ 
disk_file.php(32): ezcMailFilePart-&gt;__construct('/tmp/12174-1/ca...')
#2 /usr/include/php/ezcomponents-2007.1.1/Mail/src/parser/parts/ 
file_parser.php(246): ezcMailFile-&gt;__construct('/tmp/12174-1/ca...')
#3 /usr/include/php/ezcomponents-2007.1.1/Mail/src/parser/parts/ 
multipart_parser.php(146): ezcMailFileParser-&gt;finish()
#4 /usr/include/php/ezcomponents-2007.1.1/Mail/src/parser/parts/ 
multipart_parser.php(180): ezcMailMultipartParser-&gt;parseBody('------ 
=_Part_28...')
#5 /usr/include/php/ezcomponents-2007.1.1/Mail/src/parser/parts/ 
rfc822_parser.php(111): ezcMailMultipartParser-&gt;parseBody('------ 
=_Part_ in <b>/usr/include/php/ezcomponents-2007.1.1/Mail/src/parts/ 
fileparts/disk_file.php</b> on line <b>86</b><br />


As you can see, it for some reason put a "/" in place of "_" so it  
things that "cam_data" is a folder. Or so it appears. When I went and  
looked in /tmp the folder "12174-1" was not there.

I couldnt figure out a way to stop this error so I simply created the  
"12174-1" and "cam_data" folders and put an image called  
'photo067.jpg' in there. That allowed it to get past that error and  
parse the rest of the emails.

if ANYONE has any idea why this happened, I'd really appreciate some  
help. I'm kinda lost and would like to prevent it from happening again.

Thanks to all!

Fish
 ><>
-- 
Components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/components

Reply via email to