A kickstarter package for quickly building scalable, robust web applications
JavaScript PHP Java Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Config
Console
Controller
Lib
Locale
Model
Plugin
Test
Vendor
View
tmp
webroot
.gitignore
.gitmodules
.htaccess
README.md
index.php
phpdoc.dist.xml
setup.sh
virtualhost-sample
virtualhost-sample-shorty
virtualhost-sample-ssl

README.md

The 42Viral Project

Documentation

The goal is to provide scalable and robust "kick start" for projects of any size. Provides an out of the box installer, user and privledge management and some common features and libraies that are usefull for secure and robust web development.

Installation

As we are still in alpha development, these install instructions are written for core development

Currently, installation is written for Apache2 on Ubuntu Linux.

Git based install

Add the CakePHP library

We recommend the advanced install options from the CakePHP Cookbook.

Add the following to you php.ini file Be sure to update this for both your server and CLI .ini files

include_path = '.:/usr/share/php:/usr/share/cakephp-2.x/lib'

Install CakePHP in the usr/share directory

cd /usr/share
sudo git clone https://github.com/cakephp/cakephp.git cakephp-2.x

Replace

  • example.com with the name of your site
  • /var/www/vhosts/ with your server path
  • httpdocs with whatever you want to call it

The app directory is highly recommended

cd /[path/to/your-site.com/httpdocs]/app

Clone the project

Assuming you are installing the 42viral application into a directory called app:

git clone git@github.com:42northgroup/42Viral.git app

The git repository for 42Viral consists of several git submodules which are mostly Plugins and are separate projects hosted on GitHub. You need to make sure you obtain all the submodules using the following command:

cd app
git submodule update --recursive --init

From a command line, navigate to your app directory and gain root access. (Required for setup as the script needs to access chown). You'll provide 2 arguments the user name that apache runs as (probably www-data) and the group that will have write access to the app directory (this is probably your username).

sudo ./Console/cake setup [www-data] [production]

The setup shell is an interactive tool which enables you to quickly setup your application's essential configuration.

You can use the option "0" when you are setting your application for the first time. This will automatically run all the setup steps in sequence.

You can also use the setup shell after the first setup to perform individual operations such as re-configuring the database parameters, clearing model cache, etc.

Development Environment

This section will provide additional details for setting up a full development environment

Installing PHPUnit

sudo apt-get install php-pear
sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover components.ez.no
sudo pear channel-discover pear.symfony-project.com
sudo pear install phpunit/PHPUnit
sudo apt-get install phpunit

There seems to be a version bug in in Ubuntu 11.04, running this will force a new version pear and fix the issue.

sudo pear upgrade pear
sudo pear install -a phpunit/PHPUnit

Installing x-debug

sudo apt-get install php5-xdebug

sudo vim /etc/php5/apache2/conf.d/xdebug.ini

; configuration for php xdebug module
zend_extension="/usr/lib/php5/20090626/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000

sudo /etc/init.d/apache2 restart

Credits

We strive to give credit where credit is due, if we missed something, please let us know!

The 42viral Projects's core development team

Plug-ins

Though we typically fork plug-ins to our repository prior to modification and use, we rather give credit to the original authors

Libraries and Concepts

Additional Credits

  • WebFontKit

License

Copyright 2012, 42NorthGroup

Licensed under The MIT License

Redistributions of files must retain the above copyright notice.

Copyright

Copyright 2012 42NorthGroup