close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

File Manager using wrong file path

Thread began 7/28/2011 4:47 pm by emily425525 | Last modified 7/29/2011 5:12 pm by emily425525 | 2042 views | 6 replies |

emily425525

File Manager using wrong file path

I'm working with the File Manager portion of the HTML Editor (in this page, this is independent of the HTML editor).

No matter what I try the file path that is inserted into the database is

/siterootdirectory/imagedirectory/file.ext

That /siterootdirectory/ will make the files invalid once I make this site live. On my testing machine the siterootdirectory will be something like "sitename" but on the live server the root directory will be "public_html"

Even if I set the paths to recall the data to ../siterootdirectory/ it won't work because the siterootdirectory isn't the same name from local to live server.

Please advise how to change this.

I have tried putting the imagedirectory inside the same directory as the page with the file manager upload, I have tried changing all sorts of settings.

From reading the forum it wold appear there is a place to change the "root directory" but I can't find a folder for "HTML Editor" anywhere in my site files.

Using PHP, HTML Editor 3.01. Dreamweaver CS3, Mac OSX. Server is MAMP.

Thank you.

Sign in to reply to this post

Jason ByrnesWebAssist

since the content added to an html editor instance needs to display correctly on any page of your site, the image path needs to be relative to the server root.


for this to work from a testing server to a live server, you need to set the testing server up using the same site relative path.

one way to accomplish this is to use a subdomain for the testing server:

test.mydomain.com/

this way the same site relative path that works on the subdomain will work on the live domain.

Sign in to reply to this post

emily425525

I don't think you understand what I'm asking. I know that the server paths and setup must be the same.

On my computer I have many sites set up.
their server addresses are
thesitename/

On the testing webserver the addresses will be

thesitename/

On the live webserver the address will be

www.thesitename.com

Right now the File Manager uploads into the correct place, but the file path it saves in the database is:

/thesitename/media/file.ext

/thesitename/ is not necessary that is the folder/root of the website and does not exist on the webserver.

I think that File Manager things that the root of the site is actually the htdocs folder rather than thesitename folder.

I have looked through the forums and found references to an HTML Editor folder that should be present in the website's directory along with all the other webassist folders - that folder is not there. Please advise - how do I find out what HTML Editor considers to be the site root.

Sign in to reply to this post

Jason ByrnesWebAssist

I understand what you are asking.


the problem is that your testing environment contains a sub directory:
thesitename/


whereas the live server does not:
www.thesitename.com


any subdircetory on the end of the domain name will be added to the image paths:
so if your site is at:
thesitename/

the image paths will be:
/thesitename/images/imageName.jpg


the way around this is to use a sub domain, rather that a sub directory, for example
www.thesitename.mytestingserver/

most hosts will offer around 50 sub domains for any one main domain.

by using the sub domain, the paths for the testing server become consistent with the paths on the live server.

Sign in to reply to this post

emily425525

I don't know of anyway to force MAMP to use a subdirectory for local testing on my machine.

Why is the HTML editor deciding that the site root is up one directory from where it actually is. Why is it using /htdocs/ as the site root. I have dozens of sites /htdos/site1/ /htdocs/site2/ and so on...Shouldn't each site have it's own site root directory?

On the webserver it is set up the same way.
/public_html/ is eqivalent to my /htdocs/ folder

The full file paths are:

Local Machine: /htdocs/mysite/
Testing: /public_html/mysite/
Live site: /public_html/mysite.com

This doesn't make sense to me.

Sign in to reply to this post

Jason ByrnesWebAssist

  Why is the HTML editor deciding that the site root is up one directory from where it actually is. Why is it using /htdocs/  



because that is the actual site root as far as the domain is concerned.


"Site" means different things in different contexts.

in mamp, the address:
localhost/

maps to the the htdocs directory

if you create a subdirectory:
htdocs/mysite/

the root of the site:
mysite/

is still at:
htdocs/

it is just looking up one directory from the root to:
htdocs/mysite/

by creating the subdirectory you are not creating a new website.

you can set mamp up to use subdomains which would map the new sudirectory to a new site address.

you could set it up to map the address:
mysite.localhost/

to the folder:
htdocs/mysite/

using the subdomain approach:
mysite.localhost/

the subdirectory now becomes a new site.

I think you are confusing the Dreamweaver "Site" concept and applying that to your sites host, the concept of the site host is different than that in Dreamweaver.


i found a tutorial for setting up sub domains in mamp here:
subdomains-for-mamp-dev-environment/

Sign in to reply to this post

emily425525

Thank you, setting up the subdomains fixed the issue.

Much appreciated!

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...