Start a server on Mac OS X

user3425344 picture user3425344 · Nov 12, 2015 · Viewed 33.1k times · Source

I am figuring out how to use PHP OpenId

I have cloned the repo to the ~/www directory. There are some examples in the php-open-id/examples directory which I wanted to run.

Specifically, I wanted to render the page php-open-id/examples/consumer/index.php in order to better understand the API. I started a server in the php-open-id/examples directory using

python -m SimpleHTTPServer 8000

and I navigated to localhost://consumer/index.php

But it didn't work. It shows a dialog box to save the file. What is the correct way to render this PHP file?

Answer

user3425344 picture user3425344 · Nov 12, 2015

I have found a solution :

Run the server using

php -S localhost:9000