Weird Apache path failure
I'm running Wordpress 2.5.1 under Apache, I think version 1.3 (it's what was available when I set up the server in December.)
Wednesday, I had a power failure and the machine went down. When it came back up, everything appeared to be working. However, images in any post created after the failure now fail to appear, and the Apache error log notes an error every time somebody attempts to view a page created after the power failure that contains a graphic image of any sort. The error in the httpd/error_log indicates that an improper path is being prepended to the name of the image.
Note that this error never occurs on pages created before the power failure, unless I edit the older post to point to an absolute path -- then, the same error occurs, the server prepends the wrong path to the name of the image, and fails to find it.
The root directory for the Apache server, as coded into /etc/httpd/conf/httpd.conf, is supposed to be /var/www/html. The images are in a directory immediately beneath that, /var/www/html/images, and are coded in the Wordpress posts with a relative path: images/myimagename.jpg.
The errors I'm seeing are of two different kinds, which confuses the hell out of me: I would have expected a single, consistent error, wouldn't you? The errors are:
1) "File does not exist" pointing to "/var/www/html/wp-content/images/myimagename.jpg" (notice that "wp-content" has somehow gotten added to the prepend path);
2) "Permission denied" pointing to "/images/myimagename.jpg" (notice that the prepend path has now become "/" instead of "/var/www/html."
Also, when I go into an older post and change the image location to an absolute location, "/var/www/html/images/myimagename.jpg," the image vanishes from the post, and I get an error in the httpd.log thus:
"File does not exist: /var/www/html/var".
I've checked through /etc/httpd/conf/httpd.conf and don't see anything immediately wrong. I've also checked permissions on the various directories, and don't see anything immediately wrong.
Thanks in advance.
Last edited by philwynk; 07-04-2008 at 09:37 AM.
Reason: Improve problem description