roadchild
Member
Posted 4 months ago #
Installed it and tried so smush an image and got a fatal error
Fatal error: Call to undefined function: file_put_contents() in /home/rmcrorg/public_html/wp-content/plugins/wp-smushit/wp-smushit.php on line 282
Line 282 is WP_SMUSHIT_PLUGIN_DIR,
So I have no idea, did I need to set something?
http://wordpress.org/extend/plugins/wp-smushit/
alexdunae
Member
Posted 4 months ago #
Hi roadchild,
Looks like you're running PHP 4 -- WP Smush.it is designed for PHP 5. A PHP 4-compatible version is forthcoming; hang tight.
Alex
roadchild
Member
Posted 4 months ago #
roadchild
Member
Posted 4 months ago #
I contacted my webhost about which version we're using and while also supporting PHP 4 this was their response.
root@ares [~]# php -v
PHP 5.2.6 (cli) (built: Sep 23 2008 23:29:40)
So could the issue be something else?
alexdunae
Member
Posted 4 months ago #
I'm working on an update that should fix these problems.
Try downloading the development version from http://wordpress.org/extend/plugins/wp-smushit/download/ -- let me know if it works for you.
Alex
alexdunae
Member
Posted 4 months ago #
BTW, I'm a little stumped as to why you're having errors.
The PHP docs say that file_put_contents has been available since PHP 5.0.
roadchild
Member
Posted 4 months ago #
Sorry for the delay in responding, computer meltdown took me out of the game! :(
Downloaded and installed and a same line error
Fatal error: Call to undefined function: file_put_contents() in /home/rmcrorg/public_html/wp-content/plugins/wp-smushit/wp-smushit.php on line 282
Could it be a conflict?
alexdunae
Member
Posted 4 months ago #
Try replacing your /wp-content/plugins/wp-smushit/wp-smushit.php file with this one:
http://svn.wp-plugins.org/wp-smushit/trunk/wp-smushit.php
roadchild
Member
Posted 4 months ago #
Okay you rock, we are smushing now! What was wrong?
alexdunae
Member
Posted 4 months ago #
I think that first download link I sent you must not have been up-to-date.
Re: the original problem, my only guess is that Apache is for some reason running PHP 4, even though php -v says 5 from the shell. You could try running phpinfo(); to check.
I'll push this update out now, so you should get the official plugin update sometime soon.
Alex
roadchild
Member
Posted 4 months ago #
Thanks so much Alex this is really going to help control disk space consumption!