PDA

View Full Version : Database Connection


jerryn
04-16-2009, 08:24 AM
As near as I can tell, when I place the User Registration Solution Pack into a website, the database connect file is named "localhost".

If I have a current website, and the current database connection file is "connXYZ", do I need to change that to "localhost", or is there a way to configure the URSP database connection file to whatever you want?

Sorry, but I am having difficulities following the help files on this issue. I use DW CS4, and I purchased URSP and the Web Developer Suite.

I published a website and have it running with URSP and a database connection file of "localhost".

I want to add the URSP to a site that is already published and running with a database connection of "connXYZ" (example connection file name).

Your help understanding the "connection" would be appreciated.

jerry

Ray Borduin
04-16-2009, 10:05 AM
Update the connection server username and password, but leave the connection named localhost. Either that or create a new connection and do a find and replace in all of the files with your connection name in place of localhost.

jerryn
04-16-2009, 12:04 PM
Ray, thanks for the quick response.

I need to break my initial query into two parts. Here is the first.

I am starting a site from scatch using DW CS4 with no help from any of the Web Developer Suite wizards or extensions.

If I place all of the URSP files into a DW site and am testing it locally on my computer, the connection file in URSP is by default named "localhost.php".

I understand how to configure the "connection file" for my database.

The site is working "locally".

I desire to change the "database connection" from "localhost.php", to "connXYZ.php".

Here is what I am going to do (I think):

From DW CS4 I will:

1) delete the connection named localhost
2) delete the file named "localhost.php"
3) add a database connection name "connXYZ" and configure it with "localhost", "username", "password" (this should create the file "connXYZ.php"
4) "find" in all site files "localhost", and "replace" with "connXYZ"

Is this correct?

I think the "root url" in the globals file is "http://localhost/"sitename"". This would have to remain the same would it not. Are there any other instances in any of the URSP files that should not be replaced?

Thanks again for your help.

jerry

Ray Borduin
04-16-2009, 12:22 PM
This all seems correct. I would replace it everywhere and then you can just update the globals again to be what you need.

jerryn
04-16-2009, 01:43 PM
Ray, thanks again for your quick response. I'll try the above and see what happens. Now for the second issue.

I have a website that is currently published live and running on the web, with no WA extensions but some user pages and administrative pages that I created in DW. The database connection is "connABC" (example).

I want to modify the site by adding the URSP for "user registration" and "profile" maintenance, as well as the administrative pages included in URSP.

Is there a way to place the URSP pages in this site, which is already configured with the connection "connABC", without going through the routine we just discussed.

jerry

Ray Borduin
04-16-2009, 02:00 PM
Probably not any other way. You could just update the localhost connection to be the exact same values and not update anything but the connection.

jerryn
04-16-2009, 05:47 PM
Yes, of course. As I think about it, the connection "name" is really not much of factor in the overall scheme of things.

Thanks.

jerry