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

  • SEARCH
  • Home
  • 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 6899357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:24:43+00:00 2026-05-27T07:24:43+00:00

Yes, there’s a built-in web server in the upcoming release of PHP 5.4 which

  • 0

Yes, there’s a built-in web server in the upcoming release of PHP 5.4 which you can try out in their release candidates (I found about this just recently too!)

http://php.net/manual/en/features.commandline.webserver.php

What I need help figuring out is, is there any way to make it run on domain names other than localhost (it’s running fine on localhost, port 80)? Even 127.0.0.1 doesn’t work. I’ve put in dummy hostnames in my hosts file to point to 127.0.0.1 and they don’t work too. I understand that it’s just a release candidate, but I would like to know whether anyone else has already come up with a solution for this issue so that I can test my app with the actual domain name pointing to 127.0.0.1 in my hosts file. OS is Windows 7 Professional SP1.

Things I’ve already tried:
1. Googling (duh)
2. Looking through php.ini for options
3. Trying out 127.0.0.1, my LAN IP, my WAN IP with port 80 forwarded and NAT loopback issue fixed (router running DD-WRT)

  • 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-05-27T07:24:43+00:00Added an answer on May 27, 2026 at 7:24 am

    I did these tests on a Windows XP system, but should work the same on Linux as well by modifying the commands.

    Run your PHP test server like this:

    C:/php/php.exe -S 0.0.0.0:80
    or
    /usr/bin/php -S 0.0.0.0:80
    

    0.0.0.0 will bind to all available IP addresses on the system.

    On another machine on the network, I configured the hosts file to point to the internal IP of the system running PHP using a custom domain. This is not 127.0.0.1 as that refers to the local host, in my case I pointed my main PC to 192.168.88.247 which was the XP machine running PHP. Note the firewall should be disabled or set to allow traffic on port 80 on the machine running php.

    I configured my router to port forward traffic from external port 80 to 192.168.88.247:80. Then using a hosts file on a PC from an external network, I configured the fake domain to point to my WAN IP. I was able to access the PHP web server externally.

    That said, it is just a server for testing, so there may be unknown security risks opening it up to the outside world.

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

Sidebar

Related Questions

If yes is there any way to access a var defined in another PHP
Is there something like VSTS2010 Team System Web Access (TSWA), if yes where is
Is there a limitation in the length of a query that SQL Server can
Yes some questions get close :) There is a Bug in Java ( been
Yes, I know there's AlertDialog.Builder, but I'm shocked to know how difficult (well, at
Yes, I know there are four Memory windows, but I much prefer the display
if yes, is there a tutorial available for creating an android app using the
Is there any folder like res/drawable for mp3 or generally audio files? If yes,
Are there runtime errors(= exceptions) that do not generate a traceback? If yes, why
Is there any garbage collector concept available in iOS?if yes please guide us how

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.