Shipping Templates Zend PDF Generator Permissions Denied
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
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.
add a comment |
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
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.
add a comment |
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
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
magento-1.9 ce-1.9.0.1 permissions
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.
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
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.
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
add a comment |
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
edited Oct 14 '14 at 0:48
answered Oct 13 '14 at 20:40
CSampCSamp
21114
21114
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e) {
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom)) {
StackExchange.using('gps', function() { StackExchange.gps.track('embedded_signup_form.view', { location: 'question_page' }); });
$window.unbind('scroll', onScroll);
}
};
$window.on('scroll', onScroll);
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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