Shipping Templates Zend PDF Generator Permissions Denied












3















When I try to create a shipping label in Magento Commmunity Edition 1.9, I'm facing a permissions error in system.log:




Warning: imagepng(/var/folders/f3/pd3xtxvd0y390_qjv7pryv6m0000gn/T/shipping_labels_11721274915437009a686f81412890778.png): failed to open stream: Permission denied in /Applications/MAMP/htdocs/my_site/app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php on line 732




I am also faced with the following error in exceptions.log:




exception 'Zend_Pdf_Exception' with message 'Cannot create image resource. File not found.' in /Applications/MAMP/htdocs/my_site/lib/Zend/Pdf/Resource/ImageFactory.php:38



Stack trace: #0 /Applications/MAMP/htdocs/fswings/lib/Zend/Pdf/Image.php(124): Zend_Pdf_Resource_ImageFactory::factory('/var/folders/f3...')




As well as the less informative error on the front-end:




An error occurred while creating shipping label.




I've set my permissions site-wide (while developing) to 755 for folders and 644 for files. I tried several things to see if this is indeed a permissions issue:




  • I've temporarily set permissions on ShipmentController.php to 777

  • I've temporarily set permissions recursively on the var folder to 777

  • When that didn't work, I tried setting permissions recursively on the whole project file to 777

  • I've tried to disable and enable the cache, as well as flushing it


My theory is the pdf generator Zend uses is unable to write to var, as I do not see a var/folders directory.



Anyone else have this issue?










share|improve this question
















bumped to the homepage by Community 4 hours ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    3















    When I try to create a shipping label in Magento Commmunity Edition 1.9, I'm facing a permissions error in system.log:




    Warning: imagepng(/var/folders/f3/pd3xtxvd0y390_qjv7pryv6m0000gn/T/shipping_labels_11721274915437009a686f81412890778.png): failed to open stream: Permission denied in /Applications/MAMP/htdocs/my_site/app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php on line 732




    I am also faced with the following error in exceptions.log:




    exception 'Zend_Pdf_Exception' with message 'Cannot create image resource. File not found.' in /Applications/MAMP/htdocs/my_site/lib/Zend/Pdf/Resource/ImageFactory.php:38



    Stack trace: #0 /Applications/MAMP/htdocs/fswings/lib/Zend/Pdf/Image.php(124): Zend_Pdf_Resource_ImageFactory::factory('/var/folders/f3...')




    As well as the less informative error on the front-end:




    An error occurred while creating shipping label.




    I've set my permissions site-wide (while developing) to 755 for folders and 644 for files. I tried several things to see if this is indeed a permissions issue:




    • I've temporarily set permissions on ShipmentController.php to 777

    • I've temporarily set permissions recursively on the var folder to 777

    • When that didn't work, I tried setting permissions recursively on the whole project file to 777

    • I've tried to disable and enable the cache, as well as flushing it


    My theory is the pdf generator Zend uses is unable to write to var, as I do not see a var/folders directory.



    Anyone else have this issue?










    share|improve this question
















    bumped to the homepage by Community 4 hours ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      3












      3








      3








      When I try to create a shipping label in Magento Commmunity Edition 1.9, I'm facing a permissions error in system.log:




      Warning: imagepng(/var/folders/f3/pd3xtxvd0y390_qjv7pryv6m0000gn/T/shipping_labels_11721274915437009a686f81412890778.png): failed to open stream: Permission denied in /Applications/MAMP/htdocs/my_site/app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php on line 732




      I am also faced with the following error in exceptions.log:




      exception 'Zend_Pdf_Exception' with message 'Cannot create image resource. File not found.' in /Applications/MAMP/htdocs/my_site/lib/Zend/Pdf/Resource/ImageFactory.php:38



      Stack trace: #0 /Applications/MAMP/htdocs/fswings/lib/Zend/Pdf/Image.php(124): Zend_Pdf_Resource_ImageFactory::factory('/var/folders/f3...')




      As well as the less informative error on the front-end:




      An error occurred while creating shipping label.




      I've set my permissions site-wide (while developing) to 755 for folders and 644 for files. I tried several things to see if this is indeed a permissions issue:




      • I've temporarily set permissions on ShipmentController.php to 777

      • I've temporarily set permissions recursively on the var folder to 777

      • When that didn't work, I tried setting permissions recursively on the whole project file to 777

      • I've tried to disable and enable the cache, as well as flushing it


      My theory is the pdf generator Zend uses is unable to write to var, as I do not see a var/folders directory.



      Anyone else have this issue?










      share|improve this question
















      When I try to create a shipping label in Magento Commmunity Edition 1.9, I'm facing a permissions error in system.log:




      Warning: imagepng(/var/folders/f3/pd3xtxvd0y390_qjv7pryv6m0000gn/T/shipping_labels_11721274915437009a686f81412890778.png): failed to open stream: Permission denied in /Applications/MAMP/htdocs/my_site/app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php on line 732




      I am also faced with the following error in exceptions.log:




      exception 'Zend_Pdf_Exception' with message 'Cannot create image resource. File not found.' in /Applications/MAMP/htdocs/my_site/lib/Zend/Pdf/Resource/ImageFactory.php:38



      Stack trace: #0 /Applications/MAMP/htdocs/fswings/lib/Zend/Pdf/Image.php(124): Zend_Pdf_Resource_ImageFactory::factory('/var/folders/f3...')




      As well as the less informative error on the front-end:




      An error occurred while creating shipping label.




      I've set my permissions site-wide (while developing) to 755 for folders and 644 for files. I tried several things to see if this is indeed a permissions issue:




      • I've temporarily set permissions on ShipmentController.php to 777

      • I've temporarily set permissions recursively on the var folder to 777

      • When that didn't work, I tried setting permissions recursively on the whole project file to 777

      • I've tried to disable and enable the cache, as well as flushing it


      My theory is the pdf generator Zend uses is unable to write to var, as I do not see a var/folders directory.



      Anyone else have this issue?







      magento-1.9 ce-1.9.0.1 permissions






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jun 3 '16 at 9:26









      7ochem

      5,74293668




      5,74293668










      asked Oct 9 '14 at 21:55









      CSampCSamp

      21114




      21114





      bumped to the homepage by Community 4 hours ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 4 hours ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          2 Answers
          2






          active

          oldest

          votes


















          0














          If my memory serves correct Zend pdf has issues when working with magento 1.9 on php 5.4 or 5.5.



          Go to




          /lib/Zend/Pdf/FileParserDataSource.php




          and remove



          abstract public function __construct(); 


          this should resolve your issue.






          share|improve this answer
























          • My installation of Magento (1.9.0.1) did not have that line of code in that file. Perhaps they removed it? I downgraded my server to PHP 5.3 and face the same error. This looks like it's a permissions issue?

            – CSamp
            Oct 10 '14 at 21:38













          • Go to System > Tools > Compilation page and click on Run Compilation Process button or Disable button. sometimes recompiling your magento installation will fix missing file issues

            – TTech IT Solutions
            Oct 10 '14 at 22:02











          • I've tried running the compilation process and disabling it and still get the same error. This must be an issue with my localized server (I'm running MAMP) as it works when I host it live. I'm trying to see if there's any other info I can find.

            – CSamp
            Oct 13 '14 at 19:29



















          0














          The problem was with my "TMPDIR" not being writeable on my local installation (I'm using MAMP). To solve this problem, I've created a info.php file with the phpinfo function:



          <?php phpinfo();?>


          I found the TMPDIR directory it was trying to access under the "Environment" section of the PHP Info. From there, I went into my filesystem and changed the permissions of "/var/folders" (on my local computer) to allow writing recursively and it worked.






          share|improve this answer

























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "479"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f38571%2fshipping-templates-zend-pdf-generator-permissions-denied%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            If my memory serves correct Zend pdf has issues when working with magento 1.9 on php 5.4 or 5.5.



            Go to




            /lib/Zend/Pdf/FileParserDataSource.php




            and remove



            abstract public function __construct(); 


            this should resolve your issue.






            share|improve this answer
























            • My installation of Magento (1.9.0.1) did not have that line of code in that file. Perhaps they removed it? I downgraded my server to PHP 5.3 and face the same error. This looks like it's a permissions issue?

              – CSamp
              Oct 10 '14 at 21:38













            • Go to System > Tools > Compilation page and click on Run Compilation Process button or Disable button. sometimes recompiling your magento installation will fix missing file issues

              – TTech IT Solutions
              Oct 10 '14 at 22:02











            • I've tried running the compilation process and disabling it and still get the same error. This must be an issue with my localized server (I'm running MAMP) as it works when I host it live. I'm trying to see if there's any other info I can find.

              – CSamp
              Oct 13 '14 at 19:29
















            0














            If my memory serves correct Zend pdf has issues when working with magento 1.9 on php 5.4 or 5.5.



            Go to




            /lib/Zend/Pdf/FileParserDataSource.php




            and remove



            abstract public function __construct(); 


            this should resolve your issue.






            share|improve this answer
























            • My installation of Magento (1.9.0.1) did not have that line of code in that file. Perhaps they removed it? I downgraded my server to PHP 5.3 and face the same error. This looks like it's a permissions issue?

              – CSamp
              Oct 10 '14 at 21:38













            • Go to System > Tools > Compilation page and click on Run Compilation Process button or Disable button. sometimes recompiling your magento installation will fix missing file issues

              – TTech IT Solutions
              Oct 10 '14 at 22:02











            • I've tried running the compilation process and disabling it and still get the same error. This must be an issue with my localized server (I'm running MAMP) as it works when I host it live. I'm trying to see if there's any other info I can find.

              – CSamp
              Oct 13 '14 at 19:29














            0












            0








            0







            If my memory serves correct Zend pdf has issues when working with magento 1.9 on php 5.4 or 5.5.



            Go to




            /lib/Zend/Pdf/FileParserDataSource.php




            and remove



            abstract public function __construct(); 


            this should resolve your issue.






            share|improve this answer













            If my memory serves correct Zend pdf has issues when working with magento 1.9 on php 5.4 or 5.5.



            Go to




            /lib/Zend/Pdf/FileParserDataSource.php




            and remove



            abstract public function __construct(); 


            this should resolve your issue.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Oct 10 '14 at 14:21









            TTech IT SolutionsTTech IT Solutions

            10613




            10613













            • My installation of Magento (1.9.0.1) did not have that line of code in that file. Perhaps they removed it? I downgraded my server to PHP 5.3 and face the same error. This looks like it's a permissions issue?

              – CSamp
              Oct 10 '14 at 21:38













            • Go to System > Tools > Compilation page and click on Run Compilation Process button or Disable button. sometimes recompiling your magento installation will fix missing file issues

              – TTech IT Solutions
              Oct 10 '14 at 22:02











            • I've tried running the compilation process and disabling it and still get the same error. This must be an issue with my localized server (I'm running MAMP) as it works when I host it live. I'm trying to see if there's any other info I can find.

              – CSamp
              Oct 13 '14 at 19:29



















            • My installation of Magento (1.9.0.1) did not have that line of code in that file. Perhaps they removed it? I downgraded my server to PHP 5.3 and face the same error. This looks like it's a permissions issue?

              – CSamp
              Oct 10 '14 at 21:38













            • Go to System > Tools > Compilation page and click on Run Compilation Process button or Disable button. sometimes recompiling your magento installation will fix missing file issues

              – TTech IT Solutions
              Oct 10 '14 at 22:02











            • I've tried running the compilation process and disabling it and still get the same error. This must be an issue with my localized server (I'm running MAMP) as it works when I host it live. I'm trying to see if there's any other info I can find.

              – CSamp
              Oct 13 '14 at 19:29

















            My installation of Magento (1.9.0.1) did not have that line of code in that file. Perhaps they removed it? I downgraded my server to PHP 5.3 and face the same error. This looks like it's a permissions issue?

            – CSamp
            Oct 10 '14 at 21:38







            My installation of Magento (1.9.0.1) did not have that line of code in that file. Perhaps they removed it? I downgraded my server to PHP 5.3 and face the same error. This looks like it's a permissions issue?

            – CSamp
            Oct 10 '14 at 21:38















            Go to System > Tools > Compilation page and click on Run Compilation Process button or Disable button. sometimes recompiling your magento installation will fix missing file issues

            – TTech IT Solutions
            Oct 10 '14 at 22:02





            Go to System > Tools > Compilation page and click on Run Compilation Process button or Disable button. sometimes recompiling your magento installation will fix missing file issues

            – TTech IT Solutions
            Oct 10 '14 at 22:02













            I've tried running the compilation process and disabling it and still get the same error. This must be an issue with my localized server (I'm running MAMP) as it works when I host it live. I'm trying to see if there's any other info I can find.

            – CSamp
            Oct 13 '14 at 19:29





            I've tried running the compilation process and disabling it and still get the same error. This must be an issue with my localized server (I'm running MAMP) as it works when I host it live. I'm trying to see if there's any other info I can find.

            – CSamp
            Oct 13 '14 at 19:29













            0














            The problem was with my "TMPDIR" not being writeable on my local installation (I'm using MAMP). To solve this problem, I've created a info.php file with the phpinfo function:



            <?php phpinfo();?>


            I found the TMPDIR directory it was trying to access under the "Environment" section of the PHP Info. From there, I went into my filesystem and changed the permissions of "/var/folders" (on my local computer) to allow writing recursively and it worked.






            share|improve this answer






























              0














              The problem was with my "TMPDIR" not being writeable on my local installation (I'm using MAMP). To solve this problem, I've created a info.php file with the phpinfo function:



              <?php phpinfo();?>


              I found the TMPDIR directory it was trying to access under the "Environment" section of the PHP Info. From there, I went into my filesystem and changed the permissions of "/var/folders" (on my local computer) to allow writing recursively and it worked.






              share|improve this answer




























                0












                0








                0







                The problem was with my "TMPDIR" not being writeable on my local installation (I'm using MAMP). To solve this problem, I've created a info.php file with the phpinfo function:



                <?php phpinfo();?>


                I found the TMPDIR directory it was trying to access under the "Environment" section of the PHP Info. From there, I went into my filesystem and changed the permissions of "/var/folders" (on my local computer) to allow writing recursively and it worked.






                share|improve this answer















                The problem was with my "TMPDIR" not being writeable on my local installation (I'm using MAMP). To solve this problem, I've created a info.php file with the phpinfo function:



                <?php phpinfo();?>


                I found the TMPDIR directory it was trying to access under the "Environment" section of the PHP Info. From there, I went into my filesystem and changed the permissions of "/var/folders" (on my local computer) to allow writing recursively and it worked.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Oct 14 '14 at 0:48

























                answered Oct 13 '14 at 20:40









                CSampCSamp

                21114




                21114






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Magento Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f38571%2fshipping-templates-zend-pdf-generator-permissions-denied%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Polycentropodidae

                    Magento 2 Error message: Invalid state change requested

                    Paulmy