Hi,
From "Sales=>Invoices" clicking the email icon produce following error:
Fatal error: Uncaught exception 'Swift_IoException' with message 'Unable to open file for reading [/home/netmardo/public_html/upload/.pdf]' in /home/netmardo/public_html/system/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php:143 Stack trace: #0 /home/netmardo/public_html/system/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php(84): Swift_ByteStream_FileByteStream->_getReadHandle() #1 /home/netmardo/public_html/system/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php(701): Swift_ByteStream_FileByteStream->read(8192) #2 /home/netmardo/public_html/system/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php(353): Swift_Mime_SimpleMimeEntity->_readStream(Object(Swift_ByteStream_FileByteStream)) #3 /home/netmardo/public_html/system/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php(489): Swift_Mime_SimpleMimeEntity->getBody() #4 /home/netmardo/public_html/system/vendor/swiftmailer/swiftmailer/lib/cl in /home/netmardo/public_html/system/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php on line 143
From "Sales=>Invoices" clicking the email icon produce following error:
Fatal error: Uncaught exception 'Swift_IoException' with message 'Unable to open file for reading [/home/netmardo/public_html/upload/.pdf]' in /home/netmardo/public_html/system/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php:143 Stack trace: #0 /home/netmardo/public_html/system/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php(84): Swift_ByteStream_FileByteStream->_getReadHandle() #1 /home/netmardo/public_html/system/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php(701): Swift_ByteStream_FileByteStream->read(8192) #2 /home/netmardo/public_html/system/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php(353): Swift_Mime_SimpleMimeEntity->_readStream(Object(Swift_ByteStream_FileByteStream)) #3 /home/netmardo/public_html/system/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/SimpleMimeEntity.php(489): Swift_Mime_SimpleMimeEntity->getBody() #4 /home/netmardo/public_html/system/vendor/swiftmailer/swiftmailer/lib/cl in /home/netmardo/public_html/system/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php on line 143
Share this post:
Accepted Answer
Herman, having the file just not being written means exactly what we're saying here, file/folder permissions issue. Your hosting company must be using Apache as Server Interface (SAPI) which causes file/folder ownership issues:
https://docs.joomla.org/security_checklist/hosting_and_server_setup#php_being_run_as_an_apache_module.
Can you please check it from the System Information page of Arastta and confirm?
https://docs.joomla.org/security_checklist/hosting_and_server_setup#php_being_run_as_an_apache_module.
Can you please check it from the System Information page of Arastta and confirm?
Responses (25)
-
Accepted Answer
Dear Herman,
I have opened an issue for this https://github.com/arastta/arastta/issues/346
You can follow this issue.
BestRegards,
Cüneyt ŞENTÜRK -
Accepted Answer
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
Tested it in my 1.2.7 demo, and it does actually work fine.
So I'm guessing on shitty hosting, or your stores isn't fully updated with the change - please check the file manually: https://github.com/arastta/arastta/commit/ef83572967c8970687b38c5557c061d12215a908
Also post your system info, PHP version etc. Check the rights, that all folders are writable. Etc etc.: https://arastta.org/docs/user-manual/tools/system-information -
Accepted Answer
Abed, your issue is not same with this one in fact as with Herman's one there is no file name [/home/netmardo/public_html/upload/.pdf] while in yours there is [/home/xxxxpublic_html/upload/INV-2015-0032.pdf]
Your issue seems to be related with file/folder permissions of your hosting company, the "upload" folder must be unwritable. -
Accepted Answer
And you still don't provide any info making it possible for anyone to help you.
Tested it in my 1.2.7 demo, and it does actually work fine.
So I'm guessing on shitty hosting, or your stores isn't fully updated with the change - please check the file manually: https://github.com/arastta/arastta/commit/ef83572967c8970687b38c5557c061d12215a908
Also post your system info, PHP version etc. Check the rights, that all folders are writable. Etc etc.: https://arastta.org/docs/user-manual/tools/system-information
Maybe considering using the cloud service would help ... -
Accepted Answer
Hi Rune,
my PHP version is 5.5.34. All folders are writable. the script "admin/controller/sale/invoice.php" do has the changes. Here is a copy of PHP settings:
Safe Mode Disabled
Register Globals Disabled
Magic Quotes Disabled
File Uploads Enabled
Session Auto Start Disabled
Session Save Path /tmp
Display Errors Enabled
Output Buffering Disabled
GD Enabled
cURL Enabled
mCrypt Enabled
ZIP Disabled
Zlib Enabled
Mbstring Disabled
Iconv Enabled
Open basedir
Disabled Functions show_source, system, passthru, exec, phpinfo, popen
I hope we get this problem solved.
Kind regards
Hermann -
Accepted Answer
-
Accepted Answer
No Rune, not missing file name. The pdf file was not written.
Fatal error: Uncaught exception 'Swift_IoException' with message 'Unable to open file for reading [/upload/INV-2015-987652.pdf]' in /system/vendor/swiftmailer/swiftmailer/lib/classes/Swift/ByteStream/FileByteStream.php:143 Stack trace: #0
Kind regards
Hermann -
Accepted Answer
-
Accepted Answer
Then it's not the same problem as this tread started with Hermann, and it's a important thing to point out.
When the file isn't generated it's most likely related to your hosting, if you are 100% sure the folder permission is right, simply displayed as writeable in system information.
Anyhow I suggest you talk to your host, ask them to look at server logs etc. to try to locate the issue (t.ex. in Suhosin). -
Accepted Answer
-
Accepted Answer
-
Accepted Answer
-
Accepted Answer
Also, since Arastta 1.3 version, a proper error message will be displayed: https://github.com/arastta/arastta/pull/430 -
Accepted Answer
-
Accepted Answer
-
Accepted Answer
Hi Dennis, I've updated apache and forgot to install mbstring that is way the error ocures, but there still some issues.
I've updated the "invoice.php" file too.
I could also send PDF emails and print them too at "Sales=>Invoices", but only some, and some gives a blank page.
If I open an order from "Dashbord" I can print every invoice.
Sorry for my mistake, but we should fix the rest.
Kind regards
Hermann -
Accepted Answer
Hi Denis,
After some Arastta updates up to Version 1.3.2 this issue is not solved yet.
The Server Interface (SAPI) is cgi-fcgi
We running on our server a bunch of Joomla templates which writing files and send him out as mail annex without any problem.
I don't know what to do with it. Still cannot send invoices by email.
Kind regards
Hermann -
Accepted Answer
Your Reply
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »