WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: WP Smush.it] Fatal Error (11 posts)

  1. roadchild
    Member
    Posted 5 years 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/

  2. Alex Dunae
    Member
    Posted 5 years 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

  3. roadchild
    Member
    Posted 5 years ago #

    Okay thanks!

  4. roadchild
    Member
    Posted 5 years 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?

  5. Alex Dunae
    Member
    Posted 5 years 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

  6. Alex Dunae
    Member
    Posted 5 years 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.

  7. roadchild
    Member
    Posted 5 years 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?

  8. Alex Dunae
    Member
    Posted 5 years 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

  9. roadchild
    Member
    Posted 5 years ago #

    Okay you rock, we are smushing now! What was wrong?

  10. Alex Dunae
    Member
    Posted 5 years 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

  11. roadchild
    Member
    Posted 5 years ago #

    Thanks so much Alex this is really going to help control disk space consumption!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags