Support » Plugin: EWWW Image Optimizer » how do I know if plugin is working ?

  • Resolved greku69

    (@greku69)


    Hi
    I run bulk optimize and when finish I end with this lines for every photo:

    Processing 1/371: img_71171…

    Warning: finfo_open() expects parameter 1 to be long, string given in /home/greku69/domains/foresthillphotography.co.uk/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 827

    Warning: finfo_file(): supplied argument is not a valid file_info resource in /home/greku69/domains/foresthillphotography.co.uk/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 829

    Warning: finfo_open() expects parameter 1 to be long, string given in /home/greku69/domains/foresthillphotography.co.uk/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 827

    Warning: finfo_file(): supplied argument is not a valid file_info resource in /home/greku69/domains/foresthillphotography.co.uk/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 829

    Warning: finfo_open() expects parameter 1 to be long, string given in /home/greku69/domains/foresthillphotography.co.uk/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 827

    Warning: finfo_file(): supplied argument is not a valid file_info resource in /home/greku69/domains/foresthillphotography.co.uk/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 829

    Warning: finfo_open() expects parameter 1 to be long, string given in /home/greku69/domains/foresthillphotography.co.uk/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 827

    Warning: finfo_file(): supplied argument is not a valid file_info resource in /home/greku69/domains/foresthillphotography.co.uk/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 829

    Warning: finfo_open() expects parameter 1 to be long, string given in /home/greku69/domains/foresthillphotography.co.uk/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 827

    Warning: finfo_file(): supplied argument is not a valid file_info resource in /home/greku69/domains/foresthillphotography.co.uk/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 829

    Warning: finfo_open() expects parameter 1 to be long, string given in /home/greku69/domains/foresthillphotography.co.uk/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 827

    Warning: finfo_file(): supplied argument is not a valid file_info resource in /home/greku69/domains/foresthillphotography.co.uk/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 829

    Warning: finfo_open() expects parameter 1 to be long, string given in /home/greku69/domains/foresthillphotography.co.uk/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 827

    Warning: finfo_file(): supplied argument is not a valid file_info resource in /home/greku69/domains/foresthillphotography.co.uk/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 829

    Warning: finfo_open() expects parameter 1 to be long, string given in /home/greku69/domains/foresthillphotography.co.uk/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 827

    Warning: finfo_file(): supplied argument is not a valid file_info resource in /home/greku69/domains/foresthillphotography.co.uk/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 829

    Warning: finfo_open() expects parameter 1 to be long, string given in /home/greku69/domains/foresthillphotography.co.uk/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 827

    Warning: finfo_file(): supplied argument is not a valid file_info resource in /home/greku69/domains/foresthillphotography.co.uk/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 829

    Warning: finfo_open() expects parameter 1 to be long, string given in /home/greku69/domains/foresthillphotography.co.uk/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 827

    Warning: finfo_file(): supplied argument is not a valid file_info resource in /home/greku69/domains/foresthillphotography.co.uk/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 829
    Full size – Unknown type:
    IMG_71171-150×150.jpg – Unknown type:
    IMG_71171-300×199.jpg – Unknown type:
    IMG_71171-1024×682.jpg – Unknown type:
    IMG_71171-388×300.jpg – Unknown type:
    IMG_71171-249×249.jpg – Unknown type:
    IMG_71171-93×57.jpg – Unknown type:
    IMG_71171-298×170.jpg – Unknown type:
    IMG_71171-555×220.jpg – Unknown type:
    IMG_71171-840×1560.jpg – Unknown type:
    Elapsed: 1 seconds

    is this correct ?
    yet after plugin done photos on site load as always … not any faster .
    what I doing wrong ?
    thanks

    http://wordpress.org/extend/plugins/ewww-image-optimizer/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    No, it isn’t correct. I added support for the fileinfo functions just recently, and was under the mistaken impression that PHP versions before 5.3 would not have this functionality. The PHP constant I’m using in the code doesn’t exist before 5.3, so it can’t determine the filetype of your images to optimize them.

    The fix should be to change lines 825 and 1719 to this:
    if (function_exists('finfo_file') && defined('FILEINFO_MIME_TYPE')) {

    hi
    when I replace this two line with what you suggest I got this error and can’t load website:
    Parse error: syntax error, unexpected $end in /home/greku69/domains/foresthillphotography.co.uk/public_html/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 2157

    Plugin Author nosilver4u

    (@nosilver4u)

    make sure you are replacing the lines that are already there exactly as shown. The syntax error makes it sound like you didn’t remove the lines that were there, so there is an incomplete ‘if’ statement.

    hi
    so this 2 lines should looks like this ? :

    825 if (function_exists(‘finfo_file’) &&
    1719 defined(‘FILEINFO_MIME_TYPE’)) {

    please correct me if I’m wrong …
    thanks

    Plugin Author nosilver4u

    (@nosilver4u)

    sorry, told you the wrong lines. I was looking at the dev version. Both lines should be identical, make sure to copy everything from the ‘if’ to the last curly bracket ‘{‘

    The proper lines for 1.3.7 are 825 and 1707. They are replacing this:

    if (function_exists('finfo_file')) {

    with this:

    if (function_exists('finfo_file') && defined('FILEINFO_MIME_TYPE')) {

    The first line only checks to see if the finfo_file() function exists, the new one checks for that AND it makes sure that the constant FILEINFO_MIME_TYPE exists, which is in PHP 5.3.0+. For older versions, it will fall back to other mime-type detection functions.

    thanks
    this explain why was’t working …

    Plugin Author nosilver4u

    (@nosilver4u)

    I reworked the code for 1.3.8 so that the finfo functions can be used prior to php 5.3.0, instead of just disabling them for anyone not using php 5.3.0+. It seems to work on my test box, but please let me know right away if you have any trouble with the new version and finfo errors again.

    work like a charm …
    thanks
    BTW there is worldpress 3.5.1 hope it will still work with this ver.

    Hi there, I followed your instructions, as I was using the latest version of this plugin and it seems that there was still a missed if statement on line 463, as I was getting this error message on line 465, which is:
    $finfo = finfo_open(FILEINFO_MIME);
    So I added this to the if statement on line to 463:
    && defined(‘FILEINFO_MIME’)

    However, this has not fixed my problem :/

    Thanks in advance for any help you can give!

    Plugin Author nosilver4u

    (@nosilver4u)

    metagrapher, please read this:
    http://wordpress.org/support/topic/important-read-before-posting?replies=6

    …and start a new thread.

    Also worth noting that I’m on PHP version 5.3.27

    Ah. Sorry nosilver4u. Will do.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘how do I know if plugin is working ?’ is closed to new replies.