Viewing 15 replies - 16 through 30 (of 58 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    Well, that sounds familiar. What theme are you using?

    Thread Starter adrelanos

    (@adrelanos)

    Plugin Author nosilver4u

    (@nosilver4u)

    Strange that I’ve not noticed the same issue with that theme myself (we use it at work), but I believe it is probably an issue I just fixed a couple days ago in the dev version. The mimetype functions in php apparently have issues with certain files contained in themes. In the previous case, it was the .po (translation) files that caused a sudden spike in memory.

    I don’t know quite what the bug is in those functions, so I just pre-empted the issue by skipping mimetype checking for the .po files.

    Looking to release 2.3.0 next week. If I don’t (or you don’t want to wait), feel free to grab the development release from the Developers tab.

    Thread Starter adrelanos

    (@adrelanos)

    I don’t really know how to fetch a release tarball, install from the developers tab. So I am waiting for next release.

    Plugin Author nosilver4u

    (@nosilver4u)

    2.3.1 is already out the door, and for future reference, the dev versions are just in zip files which WordPress will accept ‘as is’

    Thread Starter adrelanos

    (@adrelanos)

    Okay. Just got that update. Same issues as earlier.

    Plugin Author nosilver4u

    (@nosilver4u)

    It still throws the memory errors?

    Thread Starter adrelanos

    (@adrelanos)

    Yes.

    [Wed Apr 08 15:32:08.252679 2015] [:error] [pid 16752] [client 127.0.0.1:58864] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 4294961842 bytes) in /var/www/blog/wp-content/plugins/ewww-image-optimizer/ewww-image-optimizer.php on line 954, referer: https://www.whonix.org/blog/wp-admin/upload.php?page=ewww-image-optimizer-bul

    Plugin Author nosilver4u

    (@nosilver4u)

    Does anything change if you switch to a different theme?

    Thread Starter adrelanos

    (@adrelanos)

    Unfortunately, not.

    Plugin Author nosilver4u

    (@nosilver4u)

    Ok, so it must be some of the file in that extra folder you configured (not terribly surprising). Let’s try this…

    In the file aux-optimize.php, find this line (should be 491):

    if ( preg_match( '/\.(po|mo|php|txt|js|css|html)$/', $path ) ) {

    and change it to this:

    if ( preg_match( '/\.(po|mo|pot|php|txt|js|css|html|woff|webp|json|svg|xml|ttf|otf|eot|md)$/', $path ) ) {

    If that doesn’t work, we’ll have to add in an extra call to the debug_log function right before it checks the mimetype of the files.

    Thread Starter adrelanos

    (@adrelanos)

    That didn’t help unfortunately.

    Plugin Author nosilver4u

    (@nosilver4u)

    Ok, we’ll go the debugging route then.

    In the file ewww-image-optimizer.php, you should see this function at around line 943: ewww_image_optimizer_mimetype().

    A couple lines into the function, you’ll see a debugging line that says something like “testing mimetype: $path”.
    Directly below that line, add this:

    ewww_image_optimizer_debug_log();

    Then, turn on debugging and run the optimize command. Then, please post the last 25-50 lines of output from ewww-image-optimizer/debug.log (via pastebin if necessary).

    Plugin Author nosilver4u

    (@nosilver4u)

    Were you able to try this out?

    Thread Starter adrelanos

    (@adrelanos)

    root@whonix:/var/www/blog# sudo -u www-data wp ewwwio optimize --debug all
    PHP Notice:  Undefined index: HTTP_X_FORWARDED_PROTO in phar:///usr/local/bin/wp/php/wp-cli.php(23) : eval()'d code on line 7
    PHP Notice:  Undefined index: SERVER_NAME in /var/www/blog/wp-content/plugins/post2email/post2email.php on line 47
    Notice: Undefined index: SERVER_NAME in /var/www/blog/wp-content/plugins/post2email/post2email.php on line 47
    Optimizing all with a 0 second pause between images.
    Scanning, this could take a while
    47 images in the Media Library have been selected (0 unoptimized), with 288 resizes (0 unoptimized).
    PHP Fatal error:  Uncaught exception 'UnexpectedValueException' with message 'RecursiveDirectoryIterator::__construct(/var/www/blog/wiki_images/skins/strapping/.git): failed to open dir: Permission denied' in /var/www/blog/wp-content/plugins/ewww-image-optimizer/aux-optimize.php:444
    Stack trace:
    #0 [internal function]: RecursiveDirectoryIterator->__construct('/var/www/blog/w...', 0)
    #1 /var/www/blog/wp-content/plugins/ewww-image-optimizer/aux-optimize.php(444): RecursiveDirectoryIterator->getChildren()
    #2 /var/www/blog/wp-content/plugins/ewww-image-optimizer/iocli.php(341): ewww_image_optimizer_image_scan('/var/www/blog/w...')
    #3 /var/www/blog/wp-content/plugins/ewww-image-optimizer/iocli.php(83): ewww_image_optimizer_scan_other()
    #4 [internal function]: EWWWIO_CLI->optimize(Array, Array)
    #5 phar:///usr/local/bin/wp/php/WP_CLI/Dispatcher/CommandFactory.php(52): call_user_func(Array, Array, Array)
    #6 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}(Array, Array)
    #7 phar:///usr/local/bin/wp/php/ in /var/www/blog/wp-content/plugins/ewww-image-optimizer/aux-optimize.php on line 444
    Fatal error: Uncaught exception 'UnexpectedValueException' with message 'RecursiveDirectoryIterator::__construct(/var/www/blog/wiki_images/skins/strapping/.git): failed to open dir: Permission denied' in /var/www/blog/wp-content/plugins/ewww-image-optimizer/aux-optimize.php:444
    Stack trace:
    #0 [internal function]: RecursiveDirectoryIterator->__construct('/var/www/blog/w...', 0)
    #1 /var/www/blog/wp-content/plugins/ewww-image-optimizer/aux-optimize.php(444): RecursiveDirectoryIterator->getChildren()
    #2 /var/www/blog/wp-content/plugins/ewww-image-optimizer/iocli.php(341): ewww_image_optimizer_image_scan('/var/www/blog/w...')
    #3 /var/www/blog/wp-content/plugins/ewww-image-optimizer/iocli.php(83): ewww_image_optimizer_scan_other()
    #4 [internal function]: EWWWIO_CLI->optimize(Array, Array)
    #5 phar:///usr/local/bin/wp/php/WP_CLI/Dispatcher/CommandFactory.php(52): call_user_func(Array, Array, Array)
    #6 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}(Array, Array)
    #7 phar:///usr/local/bin/wp/php/ in /var/www/blog/wp-content/plugins/ewww-image-optimizer/aux-optimize.php on line 444
    root@whonix:/var/www/blog#

    https://tny.cz/e484d6cc

Viewing 15 replies - 16 through 30 (of 58 total)
  • The topic ‘PHP Notice: Undefined index: HTTP_X_FORWARDED_PROTO’ is closed to new replies.