LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-04-2008, 05:34 PM   #1
philwynk
Member
 
Registered: Sep 2007
Posts: 84

Rep: Reputation: 15
Why is Apache looking for images in all the wrong places?


Hi, folks,

My tiny web server was running my dinky little blog just fine until the power went out yesterday morning for about 3 seconds. Since the power came back, I can't get images to display, because the Apache server keeps looking for them in the wrong directory.

The blog is running Wordpress 2.5.1, which is basically all php, and I think I'm running Apache 1.3, but maybe my yum updates have upgraded it, I don't know. Images in the posts are coded with a relative path: "images/myimagename.jpg". The root directory for the blog is /var/www/html, and it's coded that way in /etc/httpd/conf/httpd.conf. Nothing would be running if that weren't right, correct? So Apache must be reading the .conf file.

However, whenever somebody attempts to read a blog page (including me), the text appears, the sidebars show up, the masthead logo shows up, but the images in the posts don't appear, and the error_log in /var/log/httpd reflects another error, usually this:

"Permission denied: cannot access /images/myimagename.jpg."

So, for some reason Wordpress has decided to try to read the images as though "/" was its root directory.

I can't get anybody at Wordpress to reply to my queries (the sons of bitches) so I'm asking here, 'cause I've been banging my head against this all freakin' day, and I cannot for the life of me find out why wordpress wants to read the images from "/".

Please. I'm begging. I'll freaking PAY MONEY. I need to get this fixed. Please.

Thanks.
 
Old 07-04-2008, 06:10 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,476

Rep: Reputation: 156Reputation: 156
The file system may have been corrupted when the power failed. I suggest that you boot a liveCD and run fsck against the partition.

-----------------------
Steve Stites
 
Old 07-04-2008, 06:18 PM   #3
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,684

Rep: Reputation: 54
...and should this tip from jailbait help you: I'd like to know what filesystem where you using for your server?
 
Old 07-04-2008, 06:33 PM   #4
philwynk
Member
 
Registered: Sep 2007
Posts: 84

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jomen View Post
...and should this tip from jailbait help you: I'd like to know what filesystem where you using for your server?
Fedora Core 8 on an i386 server. It's an AMD 64-bit motherboard, but I'm running it in 32 bits.
 
Old 07-04-2008, 07:03 PM   #5
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,684

Rep: Reputation: 54
Thanks - but that does say nothing about the filesystem(s) in use there

A few possibilities in order of likelihood:
ext2, ext3, reiserfs, xfs, jfs ...

You would also need to know this if you wanted to follow the advice: to run a filesystem-check to see if that helps your problem go away.

The mount command shows you the partitions, where they are mounted and what filesystem they are using.

Last edited by jomen; 07-04-2008 at 07:15 PM.
 
Old 07-04-2008, 07:21 PM   #6
philwynk
Member
 
Registered: Sep 2007
Posts: 84

Original Poster
Rep: Reputation: 15
Um... where do I get a liveCD?

Pardon my ignorance, but is there some easy way to get a liveCD? I tried booting off my Fedora Core 8 install disk, but was unable to run fsck from the prompt it gave me. When I try running fsck from the mounted filesystem, I get dire warnings about doing SEVERE damage to the filesystem.

I'll go google "liveCD Fedora" but in the meantime, any suggestions? THanks.
 
Old 07-04-2008, 07:23 PM   #7
philwynk
Member
 
Registered: Sep 2007
Posts: 84

Original Poster
Rep: Reputation: 15
[root@localhost ~]# mount
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda1 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)


I very stupidly didn't partition my hard drive like a normal UNIX system when I set this up, so now I'm stuck with one huge-o partition running gust about everything. Dumb, I know. I'll do better next time.
 
  


Reply

Tags
apache, path, wordpress


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
suse 10 OSS: invalid sums and wrong/missing images AnimaSola Suse/Novell 1 01-14-2006 11:21 AM
suse10 OSS invalid sums and wrong disc images AnimaSola Linux - Software 3 01-14-2006 05:17 AM
Looking for kernel-image-2.6.11-1-686 in all the wrong places conn-fused Debian 1 01-13-2006 09:23 AM
Printer prints images wrong The Devil Linux - General 0 11-27-2003 08:32 PM


All times are GMT -5. The time now is 02:41 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration