Active11 months ago
Sep 28, 2017 - how to get a local web server development environment up and running in. Stack) and phpMyAdmin running on the new mac OS High Sierra.
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 usingand 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?
user3425344user34253441,5273 gold badges13 silver badges21 bronze badges
2 Answers
user3425344user34253441,5273 gold badges13 silver badges21 bronze badges
You need to have a php server for serving .php files. The simple python server is not a php server and therefore it is just simply listing the files in the directory for download.
If you are on OSX 10 or above, it comes with apache which has php module present and can be setup to serve php file.
Tutorials can be found here http://php.net/manual/en/install.macosx.bundled.php and here https://discussions.apple.com/docs/DOC-3083
If you would like to setup a dedicated server instead of using apache, MAMP is a good solution. Google It and see tutorials on how to set it up.
Kulvinder SinghKulvinder Singh