To post a new support question, click the Post New Topic button below.
Current Version: 4.9.1 | Sytist Manual | Common  Issues | Feature Requests

Please log in or Create an account to post or reply to topics.
You will still receive notifications of replies to topics you are part of even if you do not subscribe to new topic emails.

Download Single Image Adding Logo Error

W
57 posts
Sun Jun 02, 19 12:56 PM CST
Hi Tim, I'm sure I've seen this error reported in the forums, but can't find it despite dozens of searches. I'm having a problem with downloads that have the logo applied at time of download. Here's the error thrown in Chrome's console:
Resource interpreted as Document but transferred with MIME type image/jpeg: "https://clients.focusphotography.com/sy-inc/store/freedownload.php?p=23b5f02a06e9135e15974c7e9b44b503&fp=66f041e16a60928b05a7e228a89c3799&did=d757719ed7c2b66dd17dcee2a3cb29f4&dem=1400&gsbgphoto=".

Downloads without logos work fine. Uploads adding logos work fine. Error happens whether images are stored locally or on Amazon S3. I've re-uploaded the logo file, and tried several.

Here's a gallery with the error: https://clients.focusphotography.com/galleries/weddings/cherline-and-napo/index.php?sub=5dbbc5ab33ec1cce60832fa7e1e0314c

Thanks for your help!
16,207 posts (admin)
Mon Jun 03, 19 5:10 AM CST
My guess is your logo file is too large (either file size or file dimensions) and it is running out of memory creating the file. Try uploading a smaller version of your logo file. Around 800 pixels or less should work.
Tim Grissett, DIA - PicturesPro.com
My Email Address: info@picturespro.com
W
57 posts
Mon Jun 03, 19 8:47 AM CST
Thanks for the guess. the logo is 400, and i've tried 250px, so I don't think its that. Here's my php settings from the cloudways platform:
;php_admin_flag[log_errors] = on
;php_admin_value[memory_limit] = 32M
;php_admin_value[max_execution_time] = 120
;php_admin_value[date.timezone] = Europe/Berlin
;php_admin_value[max_input_time] = 300
;php_admin_value[post_max_size] = 25M
;php_admin_value[upload_max_filesize] = 20M
;php_admin_value[max_input_vars] = 3000
;php_admin_value[max_file_uploads] = 20
;php_admin_value[display_errors] = off

and here's the htaccess file from the settings page in case anything looks way out of place:
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

ErrorDocument 404 /404.php



AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript



Header set Cache-Control "max-age=604800, public"


Options +Indexes
16,207 posts (admin)
Mon Jun 03, 19 11:07 AM CST
I think it is an issue with the content-length line in the free download file and the PHP or server. Seen it once before.

You would have to edit the /sy-inc/store/freedownload.php file.

Toward the bottom of the file there are 2 or 3 lines that start with this:

header("Content-Length:

Delete those lines. You can edit that file through the file manager in your hosting control panel.
Tim Grissett, DIA - PicturesPro.com
My Email Address: info@picturespro.com
W
57 posts
Mon Jun 03, 19 11:33 AM CST
WOW! I'd like to point out that there is no way in hell I could have ever figured that out!

SUCCESS! Thanks Tim - your level of support is amazing.
J
2 posts
Tue Apr 06, 21 2:30 PM CST
Hi Tim,

I'm having this problem too (with my logo set at 400px) - please can you tell me exactly how much of this text in the /sy-inc/store/freedownload.php file I need to delete? Many thanks!


// header("Content-Length: ".@urldecode(@filesize($new)));

// Changes start here ---------------------------------------------------------
// if GD library has been used ...
if($new != null) {
// ... write image to temp file (MUST use a file to preserve the DPI!)
$tmp = @tempnam("/tmp", "FREE-");
if(empty($tmp)) {
imageJPEG($new, NULL, 95);
} else {
imageJPEG($new, $tmp, 95);
}
imageDestroy($new);

// set the original DPI into the copy
imageSetDPI($tmp, imageGetDPI($theImagePath));
if($setup['do_not_use_content_length_header_download'] !== true) {
header("Content-Length: ".@urldecode(@filesize($tmp)));
}
// return the copy
@readfile($tmp);

// discard the temp file
@unlink($tmp);
}

// ... otherwise, just return the original (uses NO GD so faster, no memory use)
else
if($setup['do_not_use_content_length_header_download'] !== true) {
header("Content-Length: ".@urldecode(@filesize($theImagePath)));
}
@readfile($theImagePath);

// Changes end here -----------------------------------------------------------

exit();
?>
16,207 posts (admin)
Wed Apr 07, 21 3:28 AM CST
Don't edit the code.

Sounds like a weird bug between some servers and some apple products.

In your Sytist admin click Settings in the main menu then UNDERNEATH the left menu click edit config file.

Before the closing PHP tag at the end of the file (which is ?>), copy the following line and paste it there and should fix it:

$setup['do_not_use_content_length_header_download'] = true;
Tim Grissett, DIA - PicturesPro.com
My Email Address: info@picturespro.com
J
2 posts
Wed Apr 07, 21 12:02 PM CST
Unfortunately that hasn't fixed it. Is there something else I can try?
Thank you
16,207 posts (admin)
Thu Apr 08, 21 6:03 AM CST
Then probably your logo file is too large.

You can email me the following for me to look into it:

1) Link to your Sytist admin.

2) The admin username and password (or create me an admin account by clicking Admins in the upper right corner of the admin pages).
Tim Grissett, DIA - PicturesPro.com
My Email Address: info@picturespro.com
9 total messages
Please log in or Create an account to post or reply to topics.
This post has been viewed 886 times
Category: Error
 
Loading more pages
Loading more pages

Sign up for email promotions.

Your information is safe with us and won't be shared.

Thank you for signing up!

 
©2003 - 2021 Grissett, LLC. All Rights Reserved.

By continuing to browse or by clicking Accept Cookies, you agree to the storing of cookies on your device necessary to provide you with the services available through our website.

    Accept   Privacy & Cookie Policy
Loading More Photos
Scroll To Top
Close Window
Loading
Close