README
@author : Marc Harnist @date : 2023-11-04
- To run Light on localhost, you need phpmyadmin (see above "Run the application in localhost);
- To run online, you need to update the file public/config/config-online_s (see above "Online database connection : Rename file config-online_s in config-online");
- To run the application, you need to run php server (see above "Run the application in localhost);
- Clone the repository "Light" from https://github.com/MarcHarnist/light/tree/devOps;
- Run the CMS on a web navigator;
- Watch what happens;
- Show the error displayed;
- Propose a database creation formular;
- Propose the database tables creation.
- "ERR_CONNECTION_REFUSED", Ce site est inacessible, localhost n'autorise pas la connexion";
- The website does not run: PHP server must be started;
- Best idea in the moment: write a dashboard showing all actuals project and propose to run the servers php and sql;
- Write an html code in "root/index.php": "do you want to start the PHP server?";
- Write a Javascript code: popup window that opens if php server does not run;
- Copy the best answer for the sql server.
- Creating a dashboard for des php and phpmyadmin server (example: Easyphp dashboard)
- Creating a new repertory root/localhost, with index.html and "Start" button for the servers.
- create a plugin "install" like Wordpress but much simple;
Write you own database ids and password in public/config/config-online.php. This file is in gitignore list...
- Clone the repository "Light" from https://github.com/MarcHarnist/light/tree/devOps;
- Install phpmyadmin: download the phpmyadmon files from the web;
- Paste the files in the same repertory of your project;
- Use "make": open the Light/makefile and see the options;
- To run the phpmyadmin server, write "make serv" in the Win. command prompt (CMD);
- To run the web application Light, write "make light" in the command prompt;
- If you "make option" is on the top list, you can only write "make" in the command prompt, and "enter";
Name : accueil.php Path : controller/accueil.php and public/view/accueil.php
- commits comment are crucials !
- git add .
- git commit -m "README.md update"
- git push (Push only the branch)
- git push --set-upstream (Push all)
git log //to see all commits number (hash) //memorize or copy a commit number (hash)
git checkout [number] //you can create a new branch
git branch -c rall-back-test //or not; You can use the command : git log oneline. And then you see that the comments are very important to detect wich version you want to restore!
git push --set-upstream //Send the projects on Git browser (Github for example)
Marc L. Harnist Plan: Models / View / Controllers en PHP et POO. Special feature: index.php is the first file read by the browser. All site files (templates, classes, controllers, site header, view, footer) are included in the index.php file
- Create a repertory root/test/;
- Example : root/charlie;
- Create a file inside : root/charlie/test.php;
- Optionnal : Create a controller : root/charlie/test-controller.php
- Open navigator in url : light/index.php?page=test;
- The browser will find Charlie?
Si l'on déplace un fichier dans le répertoire admin, l'ouverture de la page de connexion est déclenchée !
Il y a trois espaces pour l'instant: public, client et membre.
I create a new file that is abble to open, read and display the web application configuration file in an html page, by copying an other model created this month. This configuration file, specific to each application, is stored in the repertory "public".
root / engine / models / is the path where all models will be stored.
It will be easy to upgrade the website engine in a new version, just in upload the repertory "engine" and not touch the repertory "public". So, the web application design, images, and all its specific files wont be destroyed.