Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Virtually Impossable 1

Status
Not open for further replies.

TruthInSatire

Programmer
Aug 12, 2002
2,964
US
I need help with running my site in a virtual as i knew I would. here is the problem.

I have set up a virtual folder in IIS with all my files in it. I have set up the virutal folder in CF.

I can use cfinclude to include a template that is inside the virtual just fine. My problem is including a file from outside of the virtual when a page being run is inside the virutal.

I have an application.cfm file on the root. I have an application.cfm file inside the virtual. I need to include the root application.cfm folder from the virtual application.cfm folder.

once that is straight i'm sure i'll have a problem with file uploads too. all the scripts to upload images and files are inside the virtual, but the files need to be saved outside of the virtual.

please help!
Thanks.

A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.
-Douglas Adams (1952-2001)
 
Can't you call the root Application.cfm inside the virtual Application.cfm using <CFINCLUDE> tag?? or <CFLOCATION> tag??


____________________________________
Just Imagine.
 
no because it looks from the virtul root not the webroot.

<cfinclude template = "../application.cfm">
tells cf to look at "c:\mywebs\virtualFolder" not the root of the web which is at "c"\mywebs\accountowner\domain\www" That's not the actual path obviously. I think i've found a work around that may actually add another level of security.

so far i have 3 sites running the virtual using the work around.

A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.
-Douglas Adams (1952-2001)
 
Saving the files will be easy. You can use CFFILE of course and use qualified paths.

Hmm though...

Have you tried getting the path of the file inside the virtual and mapping from there?

ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
 
thanks for the reply webmigit.

the virtual is outside of the web, and the structure to the webroot isn't reliable because of the folder names for each site. I can't use a hardcoded qualified path because then i'd have multiple sites uploading to the same area (working on building a hosted solution which will have several hundred possibly thousands of sites (i hope)).

Right now i have a solution that seems to work ok. i've got three test sites using the same virtual, but saving files and updating the access (temp until i set up mysql) DB within there own domain.

I'm not sure how much i want to post to the public as it isn't finished yet. not to mention i could cause myself some security problems posting my solution in a public forum. not that i don't trust the TT regulars.. but public forums are public to everyone online.

A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.
-Douglas Adams (1952-2001)
 
Google Rocks! thanks, EXACTLY what i was looking for!

A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.
-Douglas Adams (1952-2001)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top