Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8281945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:12:24+00:00 2026-06-08T10:12:24+00:00

My development servers are external dev.site.com We have our database on an external IP

  • 0

My development servers are external “dev.site.com”

We have our database on an external IP address, but there is no DNS records for it. DNS has been set up locally using hosts files.

For example: database.site.com 55.444.33.21

Since my external development server cannot resolve database.site.com or 55.444.33.21 independently, nor can I add local DNS records to the server, how can I properly access it?

Is there some method in PHP I can utilize to essentially create an on-the-fly DNS for?

I do not have the ability to change how anything is setup, but I have full control of the codebase which is PHP. Essentially, I’m looking for a way to say 55.444.33.21 = database.site.com in my script so whenever I call database.site.com in code it works.

EDIT
I am not able to access it with just the ip, and i cannot add it to the local hosts file on the server. My goal is to find a workaround to these issues.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T10:12:25+00:00Added an answer on June 8, 2026 at 10:12 am

    Don’t call “database.site.com” in code.

    Instead, define a constant in one place in the code and use that constant throughout the rest of the code:

    define("DATABASE_SERVER", "database.site.com");
    

    or

    const DATABASE_SERVER = "database.site.com";
    

    Then throughout the code you’d use that constant instead of the actual value. So when you need to move the code to another environment, you configure it for that environment by changing the value of the constant:

    define("DATABASE_SERVER", "55.444.33.21");
    

    or

    const DATABASE_SERVER = "55.444.33.21";
    

    In general, you want to use actual dynamic values as little as possible in the code. This gives all of your code multiple reasons to change. The value should be abstracted behind a constant or variable or symbol of some kind so that, if the value changes, only that one piece of code has a reason to change. The rest continues to function.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an external Tomcat server configured to run J2EE applications on my development
We are facing an issue with iOS development where we repeatedly poll our servers
Not sure what to call it, but a combined solution for starting servers/logging/consoles/development would
We have upgraded our development SAP system from ECC6 SPS3 to ECC6 SPS5 .
i've got a stock standard ASP.NET web site, deployed to our development machine (internal
My current development project has two aspects to it. First, there is a public
What are some options to avoid the latency of pointing local django development servers
Continuous Integration servers like Hudson are a pretty amazing addition to software development. I
I've been using Amazons t1.micro servers for all my private web development projects so
Similar to the Visual Studio development web server (Cassini) limitation that it only servers

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.