juancarestre / php-sample-application

PHP 7.1 sample application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP 7.1 sample application

Sample PHP applications that uses:

  • Dependency Injection
  • Apache routing
  • Composer (aka: Not reinventing the wheel)

Requirements

  • Unix-like operating systems
  • Apache
  • MariaDB/MySQL
  • PHP >= 7.1
  • Command line tools make & wget

Setup

  1. Run make from project root.
  2. Create a 'sampleuser' MariaDB/MySQL account, by default, application is configured to use password 'samplepass'.
  3. Create the 'sample' database and load sql/db.sql.
  4. Configure Apache:
<VirtualHost *:80>
    ServerName %application.host.name%
    DocumentRoot /%path-to-repository%/web

    <Directory /%path-to-repository%>
        Require all granted
        AllowOverride all
    </Directory>

    php_admin_value include_path "/%path-to-repository%/"

    Include /%path-to-repository%/config/vhost.conf
</VirtualHost>

You are all set, point your browser to http://%application.host.name%/

About

PHP 7.1 sample application


Languages

Language:PHP 89.4%Language:Dockerfile 6.3%Language:CSS 2.9%Language:Makefile 1.3%