Run PHP Web Files Locally without Web Server Installed
This article gives the steps to run local PHP web files without installing a web server. Basically, PHP 5.4 and higher come with the capability to do this. This can be good if you download a git repo that has a mini site for like converting excel to wikitext that you just want to use temporarily.
- PHP 5.4+
Display Used TCP Ports
netstat -tan | grep tcp | grep LISTEN
Launch Site Locally
- Change directories to were you have the index.php file.
- Use PHP to launch a servlet in your code directory. Use a TCP Port between 1025-65535 and not currently used (Listen) from the netstat command above.
php -S localhost:<tcp port>
php -S localhost:8880