Skip to content

Latest commit

 

History

History
54 lines (46 loc) · 1.23 KB

readme.md

File metadata and controls

54 lines (46 loc) · 1.23 KB

php-mvc

Project created in the course: https://www.udemy.com/object-oriented-php-mvc

How to use

  1. Clone the git repository with the command:
cd /var/www
git clone https://github.com/wanderleihuttel/php-mvc
  1. Copy the apache configuration file to the folder /etc/apache/sites-available
cp /var/www/php-mvc/examples/mvc-apache2.conf /etc/apache2/sites-available
  1. Enabled site and rewrite mode
a2ensite mvc-apache2.conf
a2enmod rewrite
  1. Create database
# MySQL without password
mysql -u < /var/www/php-mvc/examples/mvc-create-database.sql 
# MySQL with password
mysql -u root -p < /var/www/php-mvc/examples/mvc-create-database.sql or 
  1. Create a MySQL user and password
# Access MySQL without password
mysql -u root
# Access MySQL with password
mysql -u root -p

CREATE USER 'mvc'@'localhost';
GRANT ALL ON *.* TO 'mvc'@'localhost' IDENTIFIED BY 'mvc123' WITH GRANT OPTION;
  1. Modify the 'URL_ROOT' in file /var/www/php-mvc/app/config/config.php to your real 'ip address' or use 'localhost'
 define('URL_ROOT','http://192.168.1.87/php-mvc');
  1. Restart apache
systemctl restart apache2

Default credentials access

username: [email protected]
password: mvc123