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
Friday, January 15 2016, 07:20 PM
Share this post:

Accepted Answer

Monday, April 25 2016, 10:51 PM - #Permalink
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?
The reply is currently minimized Show
Responses (25)
  • Accepted Answer

    Tuesday, June 07 2016, 10:00 AM - #Permalink
    Joomla templates doesn't write PDF files Hermann. I would advice to let your engineers to check the error logs and see what happens there. Again, it's definitely related with server settings.

    Regards
    The reply is currently minimized Show
  • Accepted Answer

    Thursday, June 02 2016, 12:35 AM - #Permalink
    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
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, April 26 2016, 02:17 AM - #Permalink
    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
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, April 26 2016, 12:01 AM - #Permalink
    Dennis, it is not possible do even print an invoice from the client area. PLANK page.

    Kind regards

    Hermann
    The reply is currently minimized Show
  • Accepted Answer

    Monday, April 25 2016, 11:57 PM - #Permalink
    Hi Denis, the Server Interface (SAPI) is "cgi-fcgi"

    Kind regards

    Hermann
    The reply is currently minimized Show
  • Accepted Answer

    Monday, April 25 2016, 11:24 PM - #Permalink
    Also, since Arastta 1.3 version, a proper error message will be displayed: https://github.com/arastta/arastta/pull/430
    The reply is currently minimized Show
  • Accepted Answer

    Monday, April 25 2016, 10:33 PM - #Permalink
    Rune, we're part of an hosting company. If I talk about the log file I meant the server log. There is no error related to the mentioned issue.

    Kind regards

    Hermann
    The reply is currently minimized Show
  • Accepted Answer

    Monday, April 25 2016, 10:10 PM - #Permalink
    Server log Hermann, server log, not Arastta log ... Talk to your host, or consider going cloud ...
    The reply is currently minimized Show
  • Accepted Answer

    Monday, April 25 2016, 10:01 PM - #Permalink
    Rune, the folder is writable. There is no error related to this issue in the log file. The file is just not been written!

    Kind regards

    Hermann
    The reply is currently minimized Show
  • Accepted Answer

    Monday, April 25 2016, 09:31 PM - #Permalink
    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).
    The reply is currently minimized Show
  • Accepted Answer

    Monday, April 25 2016, 08:40 PM - #Permalink
    Rune in addition to my mail before, the error is from an old invoice, but if I try to send a new invoice to a guest I get a blank page.

    There is something not right, must come up with a related message what is wrong and not an error.

    Kind regards

    Hermann
    The reply is currently minimized Show
  • Accepted Answer

    Monday, April 25 2016, 08:34 PM - #Permalink
    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
    The reply is currently minimized Show
  • Accepted Answer

    Monday, April 25 2016, 06:58 PM - #Permalink
    And you are sure the issue is the same, that the error message still is identical - missing file name?
    It doesn't make sense ...

    Oh, and are you testing sending old invoices, or newly created (after system update)?
    The reply is currently minimized Show
  • Accepted Answer

    Monday, April 25 2016, 06:36 PM - #Permalink
    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
    The reply is currently minimized Show
  • Accepted Answer

    Monday, April 25 2016, 11:30 AM - #Permalink
    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 ...
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, April 24 2016, 09:15 PM - #Permalink
    No Rune, my issue is not solved yet.

    Regards

    Hermann
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, April 24 2016, 01:08 PM - #Permalink
    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.
    The reply is currently minimized Show
  • Accepted Answer

    ABED OUIS
    ABED OUIS
    Offline
    Sunday, April 24 2016, 12:59 PM - #Permalink
    Rune
    Can you tell me how you did exactly ??
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, April 24 2016, 12:17 PM - #Permalink
    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
    The reply is currently minimized Show
  • Accepted Answer

    ABED OUIS
    ABED OUIS
    Offline
    Sunday, April 24 2016, 03:27 AM - #Permalink
    Hi Rune

    Thank you for your reply, I use version 1.2.7 too
    My problem no change
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, April 23 2016, 08:36 PM - #Permalink
    Didn't ask you Herman, but Abed. Anyhow, since you haven't followed up before, and doesn’t mention anything else now, I guess your issue is solved after updating?
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, April 23 2016, 08:33 PM - #Permalink
    Hi, I use version 1.2.7
    The reply is currently minimized Show
  • Accepted Answer

    Saturday, April 23 2016, 08:22 PM - #Permalink
    Abed, which version of Arastta do you use? It should have been fixed in 1.2.5 according to the posting by Cüneyt above ...
    The reply is currently minimized Show
  • Accepted Answer

    ABED OUIS
    ABED OUIS
    Offline
    Friday, April 22 2016, 11:01 AM - #Permalink
    Hi Hermann,

    I have the same problem,do you have found the solution???????
    The reply is currently minimized Show
  • Accepted Answer

    Friday, January 29 2016, 02:25 PM - #Permalink
    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
    The reply is currently minimized Show
Your Reply