Get a LAMP stack project up and running in 10 mins!
- IDE (eg.: VSCode)
- Docker
- Browser (eg.: Firefox)
To run this code,
- Clone the repo.
- Open command line in the same directory
- Open Docker, navigate to Containers
- Run
docker-compose up
in the CLI - Open a browser to view the table and view PHPMyAdmin page
Once you get the error:
Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in /var/www/html/index.php:3 Stack trace: #0 {main} thrown in /var/www/html/index.php on line 3
Go to Docker's 'www' server's interactive terminal and run docker-php-ext-install mysqli && docker-php-ext-enable mysqli && apachectl restart
Inspired from Vincent Stevenson's Build a Full Stack Web App in PHP and MySQL with Docker from scratch!.