Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Parser.php on line 357 #94

Closed
icolombi opened this issue Jun 1, 2016 · 3 comments
Closed

Error in Parser.php on line 357 #94

icolombi opened this issue Jun 1, 2016 · 3 comments

Comments

@icolombi
Copy link

icolombi commented Jun 1, 2016

Hi,

sometimes I get this error, I think caused by attachment that contains "strange" characters:

Warning: fopen(/opt/attachments/Convegno ABI “Unione Bancaria e Basilea 3” - 21/22 giugno 2016 - 3 SETTIMANE AL VIA!): failed to open stream: No such file or directory in /opt/vendor/php-mime-mail-parser/php-mime-mail-parser/src/Parser.php on line 350

Fatal error: Uncaught Exception: Could not write attachments. Your directory may be unwritable by PHP. in /opt/vendor/php-mime-mail-parser/php-mime-mail-parser/src/Parser.php:357
Stack trace:
#0 /opt/bounce.php(151): PhpMimeMailParser\Parser->saveAttachments('/opt/...')
#1 {main}
  thrown in /opt/vendor/php-mime-mail-parser/php-mime-mail-parser/src/Parser.php on line 357

the directory permission is ok, I can parse other messages with attachments without problems.

@eXorus
Copy link
Member

eXorus commented Jun 2, 2016

Hello,

Which version do you used (fopen is not in line 350 anymore) ?

Are you on Windows or Linux server ?

Are you sure that this file doesn't exist before ? 2 mails with the same attachments.

It's not a good practice I think to use {Convegno ABI “Unione Bancaria e Basilea 3” - 21/22 giugno 2016 - 3 SETTIMANE AL VIA!} as a name of a file. If I create a file name like that on my ubuntu desktop it is refused because / is forbidden characters.

@icolombi
Copy link
Author

icolombi commented Jun 2, 2016

Hello,

thanks for the feedback. It's version 2.30 and it runs on CentOS 6.7 with php 7.0.6.

No the file was not present before.

I'm aware that the file name may be the prolem, but since I use the parser to process bounces I have no control about the email content.

@eXorus
Copy link
Member

eXorus commented Jun 2, 2016

It's related to #63 but nobody want to finish the PR :)
It will be great to do that

@eXorus eXorus closed this as completed Oct 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants