Skip navigation
hsysgrp
Currently Being Moderated

Setting up a Remote Testing Server

Feb 6, 2013 11:02 AM

Tags: #dreamweaver

I cannot set up a testing server.  My remote server works fine. A test select.php page uploaded to the remote server retrieves data from the database no problem.

 

<?php

$host="qqqqqq"; // Host name

$username="xxxxx"; // Mysql username

$password="yyyy"; // Mysql password

$db_name="whatever"; // Database name

$tbl_name="products"; // Table name

 

 

// Connect to server and select database.

mysql_connect("$host", "$username", "$password")or die("cannot connect");

mysql_select_db("$db_name")or die("cannot select DB");

 

 

// Retrieve data from database

$sql="SELECT product_ID,product_name,product_unit,product_cost FROM $tbl_name";

$result=mysql_query($sql);

?>

 

In the site server definition screen:

 

 

Remote Server

 

 

FTP Address: xxxxxxx

user name: yyyy

password: zzzz

root directory:root/root

web url: http://not.for.public.use

 

 

Test Server

 

 

FTP Address: xxxx2

user name:yyyy2

password: zzzz3

root directory:/root2

web url:http://only.for.public.use

 

When I test this input, I get cannot connect to the database.  Is it not possible to define a test server that is not local?

 

Thank you for any help.

hsysgrp

 
Replies
  • Currently Being Moderated
    Feb 6, 2013 9:39 AM   in reply to hsysgrp

    Please take your FTP details down as anyone can connect to your website

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 6, 2013 9:46 AM   in reply to hsysgrp

    .. and don't forget to change your password, now that the world has seen it.

     

    ^_^

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 6, 2013 9:51 AM   in reply to hsysgrp

    If you are trying to set up a 'local' testing server on your computer the connection details are most likely incorrect. Usually you have a different set of connections for a local server.

     

    The host name for instance would not be sql5c40a.carrierzone.com its more likely to be something like locahost.

     

    $host="XXXXXXXXXXXXXX.com"; // Host name

    $username="XXXXXXXXXXXX"; // Mysql username

    $password="XXXXXX"; // Mysql password

    $db_name="XXXXXXXXXXXX"; // Database name

    $tbl_name="products"; // Table name

     

     

    Are you getting confused between a testing server and a remote server? The remote server details that you supplied in your post are infact your FTP details to login into the server and upload/delete any files and the test server deatils wouldn't be an FTP connection either

     

     

    You  might want to read this in regards to setting up a local testing server:

     

    http://www.webassist.com/support/documentation/how-tos/xampp_for_windo ws.php

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 6, 2013 10:02 AM   in reply to hsysgrp

    It's just been reported to the moderators. Hopefully they'll remove the details soon.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 6, 2013 10:37 AM   in reply to hsysgrp

    Use REMOTE server details.

    When you're ready to go live, change REMOTE details to your other server.

     

    Or, Simply create a TEST folder on your Remote server.  Add TEST folder to your Root directory (see screenshot).

     

    Root directory: htdocs/TEST/

     

    CS6-remote-site-root-folder.jpg

     

    When you're ready to go live, remove the TEST folder.

     

    Nancy O.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 6, 2013 11:15 AM   in reply to hsysgrp

    As you are looking at this screen, if you view your post with those details there should be a text link for Edit that you can click to remove the password and such.

     

    ^_^

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points