Be gentle, DW faithful. I'm a n00b to this entire field and use of PHP, DW, etc. I have a few questions....I'm using ~2008 Macbook Pro, DW5, and MAMP.
Set up my site with PHP files, got a local test up and running, got the Recordsets/Queries to look and function the way I like off my local server. In other words, the site workds great locally. Signed up for bluehost to act as my remote , uploaded all the files fine. BUT, when I went to view my site on the remote server, the php pages that are restricted to members just don't display at all (HTTP 500 error). I'm assuming it's not a coding error as the pages display properly on the local, but not the remote (therefore, a DB connection issue). Here's what I've done to try and remedy.
- Exported DB from local, Imported to Remote (so its structured/named the exact same aside from the host-insterted characters before it)
- Enabled my IP to update the site remotely from host cPanel (my C-Class?)
The first line of PHP code on all of these member restricted pages starts with:
<?php require_once('../Connections/TBO_Golf.php'); ?>
The 'TBO_Golf.php' contains:
$hostname_TBO_Golf = "localhost";
$database_TBO_Golf = "TBO_Golf"
$username_TBO_Golf = " **** "
$password_TBO_Golf = " **** "
$TBO_Golf = mysql_pconnect($hostname_TBO_Golf, $username_TBO_Golf, $password_TBO_Golf) or trigger_error(mysql_error(),E_USER_ERROR);
Question 1) - I'm pretty sure that with the files on the remote server, they run the script trying to connect to a 'localhost', which is causing my error. Do I change the settings in the connection file or in the database connection window to what will work for my remote server? I know what they are as I created a second database connection to the remote (so now I have one for local and remote) Do I have to "re-do" the queries using a connection to the remote?
Question 2) Is changing the settings like this the best practice when moving from locally proven to remote (and from remote to local for testing) with respect to displaying dynamic pages? If not, what is?
Question 3) In my attempt to research, I read somewhere that DW can't handle more than one database connection at a time. I find this hard to believe, so is there any truth to this?
If anyone can help, this will be greatly appreciated!!!
Thanks in advance!!