Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

How do I change the location of the Connections folder when creating a database connection?

New Here ,
Dec 16, 2009 Dec 16, 2009

Copy link to clipboard

Copied

I'm building a dynamic website and using DWCS4, MySQL, and PHP and want to change the default location of the Connections folder that is automatically created by DW when defining a database connection. It creates the folder within my "public" directory (which is the root for my website) but I'd like it to be one level up for security reasons. How do I change the location to a level up so it won't be accessible to others?

steve

TOPICS
Server side applications

Views

309
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Dec 17, 2009 Dec 17, 2009

Copy link to clipboard

Copied

This is a common problem with the way that Dreamweaver handles site definitions. It doesn't provide a way to deal with anything outside the site root.

One technique that many developers use is to create two site definitions: one based on the site root, the other based on your remote server's home directory. Dreamweaver yells at you when you do this, warning you that one site is nested inside another, which will create problems for site synchronization. But it won't stop you from creating the nested sites. You can then use the outer site definition to move the Connections folder and upload it to your remote server. Once you have done that, just work with the inner site definition based on the site root.

The alternative is to create a folder for your connection file(s) on your local hard disk in the same relative position as on the remote server, and adjust the links in your pages accordingly.

Neither solution is satisfactory. However, the connections files contain only PHP code. Even if anyone tries to access them directly through a browser, your database connection details will not be revealed. PHP code is processed on the server. Only the HTML output is sent to a browser. Someone would need to hack into your site to see the connection details. And if they can hack into your public directories, they can hack into your private ones, too.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 17, 2009 Dec 17, 2009

Copy link to clipboard

Copied

LATEST

Thanks for the info. I have a partner that does all the back-end development and he has a

directory scheme he wants to use and wanted me to use the same scheme on my PC. We don't have a remote server yet, we simply run everything using WAMP and the directory structure he wants to use caused the problem with the location of the Connections folder. He wanted it outside the public directory, DW wants it in the public directory. That's where the problem came in. So I have a choice based on what you are saying. Change the code in the web page of interest so it points to the correct location, or skip it all together and leave it in the public directory.  Was hoping there would be a way to follow the partner's directory structure without having to manually make changes, but I guess that's what I'll end up doing. Would be nice if Adobe would add one more item under the site manager for a particular site and that would be location for database connections.

thanks again,

steve

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines