Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.
/ php-framework Public archive

Framework PHP MVC (ORM, Views, Controllers, Router, Cache, SessionHandler, PHPUnit)

License

Notifications You must be signed in to change notification settings

dertin/php-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP FRAMEWORK

Currently in development, we hope to publish a stable version and its documentation soon.

The project was initially called "PHP Framework Particle". The idea is to find a better name in the future.

If you have questions or discover something to improve or change, please contact us at https://github.com/dertin/framework-php/issues

At the moment, you can test it in a test environment and see how it works.

INITIAL SETUP

  1. Go to the folder of your web server $ cd /var/www/htdocs

  2. Download the latest version of the framework and unzip it to the root directory of your web server
    $ sudo wget https://codeload.github.com/dertin/framework-php/tar.gz/master -O framework-php.tar.gz
    $ sudo tar -xvzf framework-php.tar.gz --strip 1 && rm framework-php.tar.gz

  3. Set the permissions of files and directories, as necessary
    $ sudo chown -R root:www-data.
    $ sudo find . -type d -exec chmod 755 {} \;
    $ sudo find . -type f -exec chmod 644 {} \;
    $ sudo chmod 660 error.log && sudo chmod -R 770 Particle/Core/tmp

  4. Edit the following configuration files:

    1. [Configuration of the main database]

      1. Particle/Apps/Settings/database.inc.php
    2. [General configuration of the application, you can also add your own constants]

      1. Particle/Apps/Settings/global.inc.php
  5. Web server configuration

  • For servers with Apache: The redirection directives must be active, for the .htaccess file to work

  • For servers with Nginx: Edit your .conf file in Nginx

  • Configuration example:

    index load.php;
      autoindex off;
    
    location ~ /.php$ {   
    	include /etc/nginx/fastcgi.conf;   
    	fastcgi_pass 127.0.0.1:9007;  
    }  
    
    location / {  
      if (!-e $request_filename){  
          rewrite ^(.+)$ /load.php?request=$1;  
      }  
    }  
    
  1. Install Composer (https://getcomposer.org/)

    • Install Application dependencies
    • $ sudo cd Particle/Apps && composer install
    • Install Framework dependencies
    • $ sudo cd Particle/Core && composer install
  2. Ready. Now just visit yourwebsite.com to verify if everything is working correctly.

  3. If you have any problems you can look at the log file generated by the framework itself.

  • error.log

Other configuration files

  • [Configuration Javascript and CSS resources for the layout]
  • Particle/Apps/Views/layout/asset.ini
  • [Configuration of constants for the templates]
  • Particle/Apps/Views/layout/default/configs-smarty/host/default.conf