This is a simple CRUD (Create, Read, Update, Delete) application built using PHP with the MVC (Model-View-Controller) pattern.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
What things you need to install the software and how to install them:
- PHP (version 7.4 or newer)
- MySQL (version 5.6 or newer)
- Web Server (such as Apache, Nginx, etc)
- Clone this repository to your local machine:
git clone https://github.com/lucifergotmad/ternakita.git
- Navigate to the project folder:
cd ternakita
- Create a new MySQL database and import the
ternakita_db.sql
file (replace 'database_name' with your database name):
mysql -u username -p database_name < ternakita_db.sql
-
Update the
config.php
file with your database credentials. -
Start your web server and navigate to the project in your web browser.
- Make sure you are cloning the project to the folders where your web servers read (Since its using Native PHP)
- If you are using Nginx as a Web Server, you would likely need to add more configuration.
-
Since Nginx did not support
.htaccess
out of the box we need to do something like this-
Open up your
nginx.conf
, you can try to search on google. but in my case is in/opt/homebrew/etc/nginx/nginx.conf
-
Now on the server block add this specific code
server { //your other config location / { root /path/to-your-project; index index.php index.html index.htm; try_files $uri $uri/ /index.php?url=$uri&$args; } location ~ \.php$ { root /path/to-your-project; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } //your other config }
-
-
If you get 403 Forbidden Request, you can try to run this command to update your permissions
chmod 755 /path/to-your-project
This command will give the owner full permissions, and read and execute permissions to the group and others.
-
If you want to contribute to this project and make it better, your help is very welcome.
Build with passion by @lucifergotmad