This is a LAMP stack web application that can perform account creation and CRUD operations as a Harry Potter themed contact manager!
Note: <project directory is the PhpStorm project directory. This is located in <user dir>/PhpStorm Projects/<project name>.
-
Install PhpStorm for your operating system. You can apply for an education license to get it for free.
- Once installed, open it an import the project from GitHub.
-
Install PHP and MySQL. This varies based on your OS.
- For Windows users:
- Install Chocolatey, a Windows packaging manager.
- Install PHP (run in admin PowerShell):
choco install php - Install MySQL:
choco install mysql
- For Mac users:
- Install PHP:
curl -s https://php-osx.liip.ch/install.sh | bash -s 7.3 - Install MySQL.
- Connect PHP and MySQL together:
sudo su - cd /var mkdir mysql cd mysql ln -s /tmp/mysql.sock mysql.sock
- Install PHP:
- For Ubuntu users:
- Run the following commands:
sudo apt update sudo apt install mysql-server php php-mysql
- Run the following commands:
- For Windows users:
-
All OS's: PhpStorm needs to know what PHP interpreter to use. Make sure it knows which to use:
- In PhpStorm, go to File > Settings (Ctrl+Alt+S)
- Go to Languages & Frameworks > PHP
- Click the ellipses on the right
- Click the + icon
- Select which binary to use
- Restart PhpStorm
-
Create a new database in PhpStorm.
- Open PhpStorm.
- Go-to
View -> Tool Windows -> Database- Go to the new tab opened on the right and click on the plus on the top left. Hover over Data Source and click on MySQL.
- We need to change a couple of options in the window that popped up. In the Host,User,Password,Database field place your database credentials for smallproject. Contact the database manager if you do not know your database credentials. At the bottom of the window, click Download missing driver files link.
- Click okay.
All done! You may now access the application from http://localhost:3000
If you cannot see the application, launch PhpStorm and click the browser icon in the editor.