LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-16-2007, 06:06 AM   #1
tanveer
Member
 
Registered: Feb 2004
Location: e@rth
Distribution: RHEL-3/4/5,Gloria,opensolaris
Posts: 525

Rep: Reputation: 39
Find a link in web folder location


Hi all,

Recently I am getting a lot of error messages in my apache log file as some files are missing specially image files like
Code:
[Wed Oct  3 10:29:19 2007] [error] [client x.x.x.x] File does not exist: $DOCUMENT_ROOT/images/home-contact_bangla.jpg
[Wed Oct  3 10:29:25 2007] [error] [client x.x.x.x] File does not exist: $DOCUMENT_ROOT/img/tab_right.gif
[Wed Oct  3 10:29:25 2007] [error] [client x.x.x.x] File does not exist: $DOCUMENT_ROOT/img/tab_left.gif
[Wed Oct  3 10:29:28 2007] [error] PHP Notice:  Undefined index:  sub in $DOCUMENT_ROOT/index_content.php on line 198

[Wed Oct  3 12:38:52 2007] [error] PHP Notice:  Undefined index:  page in $DOCUMENT_ROOT/index_content.php on line 199
[Wed Oct  3 12:38:52 2007] [error] PHP Notice:  Undefined index:  page_id in $DOCUMENT_ROOT/index_content.php on line 200
[Wed Oct  3 12:38:52 2007] [error] PHP Notice:  Undefined index:  location in $DOCUMENT_ROOT/index_content.php on line 201
[Wed Oct  3 12:38:52 2007] [error] PHP Notice:  Undefined index:  location in $DOCUMENT_ROOT/index_content.php on line 361

[Wed Oct  3 10:29:36 2007] [error] PHP Notice:  Undefined offset:  9 in $DOCUMENT_ROOT/page.php on line 194
[Wed Oct  3 10:29:41 2007] [error] PHP Notice:  Undefined variable: main in $DOCUMENT_ROOT/index_home.php on line 164
[Wed Oct  3 10:29:41 2007] [error] PHP Notice:  Undefined variable: sub in $DOCUMENT_ROOT/index_home.php on line 164
[Wed Oct  3 10:29:57 2007] [error] [client x.x.x.x] File does not exist: $DOCUMENT_ROOT/img/newcats_bkgd.gif
[Wed Oct  3 10:29:57 2007] [error] [client x.x.x.x] File does not exist: $DOCUMENT_ROOT/img/ptr.gif
This is happening after we restructured the whole website recently.
Now they developer is saying this should not be the case as in the php files there are no link to image files as specified above.
What would be the quickest way to find whether or not there are really some links still persists in the code or there are some other reasons for appearing in the log?

Waiting for your responses.
Thanks in advance.
 
Old 10-16-2007, 09:44 PM   #2
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
it looks like something changed in the code, or the code is expecting something it's not getting. Especially suspicious is that many of the line numbers are right next to each other. I would bet that there's a function around line 199 in index_content.php that expects files to be in a directory that no longer exists.

All those undefined variable/offset/index errors mean that something either changed in the code or something the code is expecting to see isn't there.
 
Old 10-16-2007, 09:56 PM   #3
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
It depends on what the PHP code is doing. Maybe the names of these files are in the PHP code itself... in which case grepping all the .php files will find them. Maybe they are coming from a database table - doing a full text search on your database may find them. Lastly, the names may be being constructed by some php code... in this case, you need to search the code and database for likely components of the filenames which are stored as literal strings... This is not so easy.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mount Network Location to Folder Cottsay General 1 01-31-2007 11:52 AM
Location of mozilla plugin folder? Maverick1182 Linux - Newbie 4 10-31-2006 05:24 AM
Location of Thunderbird Application folder Maverick1182 Linux - Software 1 09-18-2006 06:36 AM
Gnome Desktop Folder Location Cottsay Fedora 4 03-02-2006 03:52 PM
Folder location of new files timsch75 Linux - Newbie 2 03-22-2004 10:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration