WordPress.org

Ready to get started?Download WordPress

Forums

WP Minify
Bad Request on minified file (4 posts)

  1. qvasi
    Member
    Posted 1 year ago #

    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/

  2. Kimberly
    Member
    Posted 1 year ago #

    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"

  3. Beach Carolina Magazine
    Member
    Posted 1 year ago #

    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);

  4. Kimberly
    Member
    Posted 1 year ago #

    Replace line 667 which currently shows:

    $path = $base_path.$location;

    with this:

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

    That will fix your problem.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic