Skip to content

This is a micro PHP framework focused on allowing rapid development of simple, fast dynamic websites. It was initially developed for Earth Empires.

License

Notifications You must be signed in to change notification settings

jhaagsma/eemphyre

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The emPHyre project is a mirco PHP framework for fast development of websites.
It was originally developed for http://www.earthempires.com which uses it.
For a small example site using the framework see http://empiresphpframework.evolution2025.com/


===============================================

//insert new instructions for Apache 2.4 and PHP 5.5

===============================================



THIS PROJECT ASSUMES YOU HAVE APC INSTALLED; AND apache mod_xsendfile enabled; AND THE php_cli INSTALLED!

REQUIRED SOFTWARE:
mod_xsendfile                   https://tn123.org/mod_xsendfile/          (though you can get around this with apache rewrite rules)
Alternative PHP Cache (APC)     http://ca3.php.net/manual/en/book.apc.php

RECOMMENDED SOFTWARE:
dBug                            http://dbug.ospinto.com/
Recaptcha                       http://www.google.com/recaptcha


SETUP YOUR PROJECT
----------------

Make a project directory (and change to it); for example:

mkdir /var/www/yourproject
cd /var/www/yourproject

Git init your project &etc (see normal git tutorials such as Git Magic: http://www-cs-students.stanford.edu/~blynn/gitmagic/ )

Clone the repository into a folder, empiresPHPframework

git clone git://github.com/jhaagsma/empiresPHPframework.git empiresPHPframework

Then add a gitignore for that folder

touch .gitignore

And add in empiresPHPframework/ to make it ignore that folder; that way you won't version control the empiresPHPframework with your own project

copy the empiresPHPframework/example/* to the base directory (if you want to set up the example site)



SETUP APACHE
----------------
Add an apache site configuration for your website that reroutes all requests to index.php;

cd /etc/apache2/sites-available
sudo nano yourproject

file contents should be something like this:

<VirtualHost *>
    ServerAdmin webmaster@yourdomain.com
    ServerName yourdomain.com
    #ServerAlias www.yourdomain.com #add server aliases as required

    RewriteEngine on
    RewriteRule /* /index.php

    DocumentRoot /var/www/yourproject/www
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/yourproject/www>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>
    ErrorDocument 404 /404.php
    ErrorLog /var/log/apache2/yourproject/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/yourproject/access.log combined
    ServerSignature On
</VirtualHost>

you can then link that to sites-enabled with

ln -s /etc/apache2/sites-available/yourproject /etc/apache2/sites-enabled/yourproject 

Restart apache using:

sudo apache2ctl restart

Your project should have the non-database components set up!

-------------------

FOR THE DATABASE COMPONENTS:

Create a new user and corresponding database in mysql, and put the user / pass / database names in the config file at yourproject/config.php
PHPMyAdmin allows for automatic creation of empty databases with a new user, incidentally.
You should move this file to somewhere more secure at some point (after setup!), and point the reference to it in example/www/index.php to wherever it resides

About

This is a micro PHP framework focused on allowing rapid development of simple, fast dynamic websites. It was initially developed for Earth Empires.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages