FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > General Coding/Development
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 08-24-2005, 01:28 PM   Postid: 137747
dank
Registered User

Forum Notability:
410 pts: Community Guru
[Post Feedback]
 
Join Date: Mar 2000
Location: MWV
Posts: 3,986
how to update a symlink?

I haven't found any answers to updating a symlink here or on Google or searching apache.org...

Say I've got a symlink in the SSL folder, mapping to the non-secure 'nav folder, set up like:

cd /big/dom/xdomain/www/Secure_Server/
ln -s /big/dom/xdomain/www/nav/ nav

Now, when I update a file in /www/nav/ and look at the corresponding file in /www/Secure_Server/nav/, it shows the updated file's contents but the include on the server is still pulling from the old contents.

Does the symlink have to be removed and recreated each time? I would hope not, or that eliminiates half of the reason for using it in the first place -- not having to update two identical files in two places (the other being to avoid secure/non-secure content warnings if using a shared file).

I read that not using the '-s' switch would make it a hard link and point to the data not the file. Is that perhaps part of the answer?

Dan
__________________
The artist formerly known as [b]D[/b]luded
dank is offline   Reply With Quote
Old 08-24-2005, 01:35 PM   Postid: 137748
 Kevin
Systems Administrator
 
Kevin's Avatar
 
Join Date: Aug 2001
Location: Orlando, FL
Posts: 2,481
Re: how to update a symlink?

The symlink does not need to be recreated each time. You are probably just getting a cached copy of the data.

A hard link would work the same as a symlink except that they are a bit harder to manage.
__________________
Kevin
Kevin is online now   Reply With Quote
Old 08-24-2005, 02:02 PM   Postid: 137751
dank
Registered User

Forum Notability:
410 pts: Community Guru
[Post Feedback]
 
Join Date: Mar 2000
Location: MWV
Posts: 3,986
Re: how to update a symlink?

Quote:
You are probably just getting a cached copy of the data.
Is there any way of working around that? The file date doesn't get updated on the symlink copy, which presumably is the source of the problem. I guess other people might be seeing the proper content, but it's tough to troubleshoot when I can't...

Dan
dank is offline   Reply With Quote
Old 08-24-2005, 02:03 PM   Postid: 137752
 Kevin
Systems Administrator
 
Kevin's Avatar
 
Join Date: Aug 2001
Location: Orlando, FL
Posts: 2,481
Re: how to update a symlink?

Do you get the updated content if you hold shift and hit reload?

How about if you restart the browser?
__________________
Kevin
Kevin is online now   Reply With Quote
Old 08-24-2005, 11:41 PM   Postid: 137802
dank
Registered User

Forum Notability:
410 pts: Community Guru
[Post Feedback]
 
Join Date: Mar 2000
Location: MWV
Posts: 3,986
Re: how to update a symlink?

No and no. Even loading a different browser still shows the old content.

(I never got the notification of your reply and didn't check back in until just now.)

Dan
dank is offline   Reply With Quote
Old 08-25-2005, 07:22 AM   Postid: 137808
Rich
Merchant Rep
 
Rich's Avatar

Forum Notability:
153 pts: Ambassador of Goodwill
[Post Feedback]
 
Join Date: Nov 1998
Location: Indiana, USA
Posts: 1,658
Re: how to update a symlink?

Quote:
Now, when I update a file in /www/nav/ and look at the corresponding file in /www/Secure_Server/nav/, it shows the updated file's contents but the include on the server is still pulling from the old contents.
Dan, if you use your browser to view
https://secure.domain.com/whatever
-and then-
http://www.domain.com/Secure_Server/whatever
Do you see the 'old' or 'new' content?
__________________
Rich
E-Commerce Solutions:
www.rsmarketing.com
Domain Name Registrations:
www.domain-registration-zone.com
Time Zone Converter:
www.timezoneconverter.com
Rich is offline   Reply With Quote
Old 08-25-2005, 01:03 PM   Postid: 137817
dank
Registered User

Forum Notability:
410 pts: Community Guru
[Post Feedback]
 
Join Date: Mar 2000
Location: MWV
Posts: 3,986
Re: how to update a symlink?

I hadn't thought to try that, but it still shows the old content.

Oddly, when I look at the symlink'd copies of the files (via FTP and the CNC File Manager), their date now shows 8/23, whereas previously when I looked at it in FTP after updating the original file, the symlink file dates didn't change. It doesn't seem to be affecting the displayed content, though... Is there some sort of trickle down waiting period? First the server updates the dates, then it updates the delivered content? I can't imagine how that process would actually operate, since it's somehow delivering content that no longer exists according to the files on the server...

Dan
dank is offline   Reply With Quote
Old 08-25-2005, 01:14 PM   Postid: 137818
 Kevin
Systems Administrator
 
Kevin's Avatar
 
Join Date: Aug 2001
Location: Orlando, FL
Posts: 2,481
Re: how to update a symlink?

When you get this old data in your browser does the log file on the server register the hit? If you are pulling data from a cache somewhere (like your ISP) then it will either not show the hit or it will be a HEAD instead of a GET.
__________________
Kevin
Kevin is online now   Reply With Quote
Old 08-25-2005, 01:26 PM   Postid: 137819
dank
Registered User

Forum Notability:
410 pts: Community Guru
[Post Feedback]
 
Join Date: Mar 2000
Location: MWV
Posts: 3,986
Re: how to update a symlink?

Oddly, none of the pertinent include files are being logged, original or copy. That's a new one... I could've sworn I've always seen *.php include files show up in the logs.

Dan
dank is offline   Reply With Quote
Old 08-25-2005, 03:54 PM   Postid: 137829
kitchin
Site Owner

Forum Notability:
1163 pts: A True Crowd-pleaser!
[Post Feedback]
 
Join Date: Jan 2001
Location: Virginia
Posts: 2,992
Re: how to update a symlink?

An include()'d or require()'d file would not show up in the Apache logs.
Could PHP be doing some sort of evil caching? Just asking.
kitchin is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 06:41 AM.


Running on vBulletin®
Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2013 FutureQuest, Inc.
FutureQuest, Inc.