Mike
(@michael-copestake)
Hi @steve Cracknell
Thank you for reporting this, since I don’t have a windows server I can’t reproduce but I’ve passed this to the lead developer to see if he can spot anything obvious.
Thanks!
Mike
(@michael-copestake)
Hi @steve Cracknell
I’ve just spoken to the lead developer and he said the following:
“I don’t think this is our plugin issue. We don’t call time or utime. We simple take the attachment path and call the Yahoo! API with the URL of the image.”
Could you disable Smush.it on upload and then try to manually smush an image and see if you get the same error?
Please try this and report back 🙂
Hi Mike
Thanks for looking into this. I used Smush.it on a prevously uploaded file and had the following errors
Warning: touch() [function.touch]: Utime failed: Result too large in D:\hshome\coopergl\rentals-lisbon.com\wordpress\wp-admin\includes\file.php on line 179 [this error 3x]
Warning: Cannot modify header information – headers already sent by (output started at D:\hshome\coopergl\rentals-lisbon.com\wordpress\wp-admin\includes\file.php:179) in D:\hshome\coopergl\rentals-lisbon.com\wordpress\wp-includes\pluggable.php on line 876
Mike
(@michael-copestake)
Hi @steve Cracknell
Thanks for trying that, I’ve passed this on to the developer, hopefully that will help him pinpoint the problem.
@steve Cracknell,
Best I can tell there might be something up with your WordPress setup.
I did some tracing in the code and here is what is happening.
1. The Smush.it plugin calls the Yahoo! API with the URL for the image to smash. As part of the API call it returns the URL of the new image.
2. The plugin uses this new URL and calls the WordPress function wp_download_url($url) which is to download the remote file on Yahoo! to a local temp filename. When this finishes the function returns the temp filename.
3. Within the wp_download_url() WordPress function it calls another WordPress function wp_tempnam() to obtain a unique filename in the temp directory. It is within this call to wp_tempnam() that you are seeing the error.
My guess is your system is setup such that the temp folder is not writable. You would need to print out the phpinfo(); information to determine your current temp folder.
One solution is to add a line to your wp-config.php to set the temp folder. Something like:
define(‘WP_TEMP_DIR’, ‘C:/some/path/here’);
I’m looking for an alternate solution.
Thanks for that. Once I’d reset the WP_TEMP_DIR smush.it works. Great
reactivity.
However, what I really want to do is get rid of the EXIF metadata. You make no claim that smush.it does this but I mis-read your description, taking all four of the bullet points to be covered. It is entirely my fault, but you might like to consider rephrasing…
Mike
(@michael-copestake)
@steve Cracknell
That’s great I’m glad it’s working, could you mark as resolved now in case anyone else has a similar error?
As for the EXIF metadata, I’m afraid that this isn’t a feature supported by Smush.it so I’d be very surprised if there is anything that we could do in this plugin to change that.