PDA

View Full Version : ??'s about local testing server w/ hosted DB


deafboyzaudio
08-24-2009, 07:16 PM
I am having some testing issues with my site. my settings are:
local root: C:\DBA\
images: C:\DBA\Images\
testing server folder: C:\wamp\www\DBAtest\
url prefix: http://localhost/DBAtest/

I am using WAMP for testing locally, the problem is it only works for some of my pages. Im coding in php, with my databases being held by my hosting company, 1 and 1. When i go to test certain dynamic pages i get an error of :
Warning: mysql_pconnect() [function.mysql-pconnect (http://localhost/DBAtest/function.mysql-pconnect)]: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\wamp\www\DBAtest\Connections\signIn.php on line 9

Warning: mysql_pconnect() [function.mysql-pconnect (http://localhost/DBAtest/function.mysql-pconnect)]: [2002] php_network_getaddresses: getaddrinfo failed: No such host is kn (trying to connect via tcp://db1990.perfora.net:3306) in C:\wamp\www\DBAtest\Connections\signIn.php on line 9

Warning: mysql_pconnect() [function.mysql-pconnect (http://localhost/DBAtest/function.mysql-pconnect)]: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\wamp\www\DBAtest\Connections\signIn.php on line 9

Fatal error: php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\wamp\www\DBAtest\Connections\signIn.php on line 9

The signIn.php file has my sign in info for my 1and1 database all correct and whats really weird is when i access this page(signUp) through the web and sign up, the values add to my database with 1and1. The page just doesnt test locally. if i change the info in signUp.php to localhost and such then the page previews locally.
My question is ...... "can i test pages locally that are linked to an online databse without having to switch the settings everytime", when i uplaod i want it to go on my server online. Im not worried about specific database data showing up on the pages, i just want to test for the layout/css.
Thanks in advance for any help, ive been strugglin with this for hours....

edbr
08-25-2009, 12:48 AM
i have no idea but i would never try to . just copy your database locally . after all, thats the purpose of a local server, test it before putting it live, if it works then, it will work live

deafboyzaudio
08-25-2009, 04:13 AM
yea i understand that if it works on my local machine it will work live, what im wonderin is if i have to keep changing the database settings to load it to the server everytime i upload. just like testing server settings and remote settings, they are different and DW knows when to use each. is there a way to configure DW so that when i test locally it uses the local host, etc sign in info for my database, and then use my remote DB sign in info when i uploiad to the web. that way i dont have to keep changing the signin.php file everytime i upload to get the database to work correctly both on the server and locally. get it?