• Resolved pweingart

    (@pweingart)


    Yesterday while editing a new post, my server lost power for a few seconds. After it came back up, Apache started having problems finding the directory containing images.

    Posts created before the power hiccup seem like they’re ok, so long as I leave the code alone. The images are embedded with a relative path from the Apache root directory (which, according to httpd.conf, is /var/www/html). So, the code in the posts points to src=”images/imagename.jpg”, and the images are stored in /var/www/html/images, and show up just fine.

    Posts created after the power hiccup, I can’t get images to show up. They seemed to be showing up just fine yesterday after the power failure, but the log file is full of error messages. Today, the images are simply missing from the pages, and in any new posts I create, I cannot successfully embed images of any type — they just, plain don’t show up.

    These latest posts produce errors in the httpd log. The errors are all about the locations of images, and they’re of two types:

    1) “File not found”, pointing to /var/www/html/wp-content/images/imagename.jpg (notice that the root of the image directory is now assumed to have “wp-content” in the path);

    and

    2) “Permission denied”, pointing to /images/imagename.jpg (notice that the relative directory “images” now has no implied path, and attempts to find itself under the root directory.)

    An additional error in the log notes that /var/www/html/robots.txt does not exist. I don’t think this is a serious issue; it shows up throughout the log file.

    I’ve tried restarting Apache, and checked my httpd.conf file for glitches, but didn’t see anything obvious. Any ideas?

    Thanks in advance.

Viewing 1 replies (of 1 total)
  • Thread Starter pweingart

    (@pweingart)

    Seriously, folks: does anybody know where Apache gets its path instructions when assembling a page, and why it might use different paths for newer versus older posts? Do I need to restore mysql from before the power failure?

    I’m stuck here.

Viewing 1 replies (of 1 total)
  • The topic ‘Image directory failure’ is closed to new replies.