WordPress.org

Support

Support » Plugins and Hacks » [Plugin: WP Minify] Bad Request on minified file

[Plugin: WP Minify] Bad Request on minified file

  • The only relevant error message in the log file were several lines like this (one for each css or js file):

    [Wed Oct 03 13:36:26.035241 2012] [:error] [pid XXXX] [client 127.0.0.1:51948] PHP Warning: filemtime(): stat failed for /opt/lampp/htdocs/wordpress/wordpress/wp-content/plugins/sitepress-multilingual-cms/res/js/sitepress.js in /opt/lampp/htdocs/wordpress/wp-content/plugins/wp-minify/wp-minify.php on line 668, referer: http://localhost/wordpress/MYSITENAME/

    Making sure each file had the same owner as the lampp process (running on localhost, since I didn’t want to test an untested plugin on our server) did not help.

    http://wordpress.org/extend/plugins/wp-minify/

Viewing 3 replies - 1 through 3 (of 3 total)
  • i once got a similar error and noticed this plugin was merging the base path with the file path in a way that resulted in two forward-slashes in the file path being sent to filemtime() creating the “stat failed” response. I now check and strip out the extraneous slash before the call.

    In your case i notice you have “wordpress” repeated twice in the path which probably indicates you have a base path pointing inside “wordpress” but your file path is also using “/wordpress”, hence: “/wordpress/wordpress”

    Lately I get the error:

    PHP Warning: filemtime() [<a href='function.filemtime'>function.filemtime</a>]: stat failed for .../public_html/beachcarolina.com///platform.twitter.com/widgets.js in .../public_html/beachcarolina.com/wp-content/plugins/wp-minify/wp-minify.php on line 668

    which seems to point to the line 668-> $mtime = filemtime($path);

    Replace line 667 which currently shows:

    $path = $base_path.$location;

    with this:

    $path = preg_replace("!/{2,}!","/",$base_path.$location);

    That will fix your problem.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: WP Minify] Bad Request on minified file’ is closed to new replies.