Jump to content

Orders not printing - 500 - Internal Server Error - Files p


J Green

Recommended Posts

500 - Internal Server Error

This is a temporary server error.

Please try to reload the webpage later.

If you are the webmaster of this site please log in to Cpanel and check the Error Logs. You will find the exact reason for this error there.

Common reasons for this error are:

  • Incorrect file/directory permissions: Above 755. In order files to be processed by the webserver, their permissions have to be equal or below 755. You can update file permissions with a FTP client or through cPanel's File Manager.
  • Incorrect Apache directives inside .htaccess file. Make sure you have not specified unsupported directives inside the local .htaccess file. Such include PHP settings and Apache module settings.

My files folder permissions are set to 666, I change them to 755 and as soon as I print it changes to 666.

My htaccess file is 644.

Link to comment
Share on other sites

Thanks Sig - I have done this and set the permissions ofr the files folder to 755, the .htaccess files to 644 and it still when printing order creates printxxxx.php files witha permission of 666. When I change the individual order printxxx.php files it will print that order, but when I select another order it gets a 666 file permission. I did the cpanel file manager and filezailla permission change - the folder holds the print files don't.

When I change the individual order printxxx.php files to 755 it will print that order, but when I select another order it gets a 666 file permission. I did the cpanel file manager and filezailla permission change - the folder holds the print files don't.

Link to comment
Share on other sites

Please try this:

In the file /admin/sources/orders.index.inc.php at around line 486, find:


if (file_put_contents(CC_FILES_DIR.$filename, $template.$cleanup)) {

    httpredir($GLOBALS['storeURL'].'/files/'.$filename);

} else {

    $GLOBALS['main']->setACPWarning($lang['orders']['error_print_generate']);

    httpredir(currentPage(array('print')));

}





Add the new chmod() statement after the first line:



if (file_put_contents(CC_FILES_DIR.$filename, $template.$cleanup)) {

    @chmod(CC_FILES_DIR.$filename, 0755); // Immediately change the permissions so that the world can run the script

    httpredir($GLOBALS['storeURL'].'/files/'.$filename);

} else {

    $GLOBALS['main']->setACPWarning($lang['orders']['error_print_generate']);

    httpredir(currentPage(array('print')));

}

Link to comment
Share on other sites

  • 2 months later...
Guest creativeparrot

I'm having the same issue. Internal 500 server error. All of my permissions are set correctly, Adding the line fix from the post above has not worked. I'm using cc 5 clean install Apache php ver 5.3 any thoughts would be helpful.

Link to comment
Share on other sites

  • 5 months later...

Your hosting provider should be able to find the error in the error log.

 

But sometimes getting a 500 ISE and sometimmes not -- well, that's just weird.

 

We ask that you determine if your hosting account has a PHP error log and/or a web server error log feature.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...