Mini-net is a very tiny social network.
It is based on the PHP framework Symfony2, and is also using Bootstrap, jQuery and Fancybox.
Requirements
- Web server with PHP >= 5.3
- Database engine supported by Doctrine ORM, and the PHP driver for this database
Installation (for Debian 6 + Apache)
This guide is made for Debian6 with an Apache web server and a MySQL database, feel free to adapt it to your own configuration.Set up web server / database / tools
Install all the needed softwares:apt-get install apache2
apt-get install mysql-server
apt-get install php5 php5-mysql php5-sqlite php-apc php5-intl php5-gd
apt-get install git
curl -s http://getcomposer.org/installer | php
Set up the project
Clone mini-get git repository from githubgit clone https://github.com/inouire/mini-net.git
cp app/config/parameters.yml.dist app/config/parameters.yml
app/config/parameters.yml
with your database and locale settings.Retrieve project's php dependencies with composer:
composer install
git config --global http.proxy http://login:password@host:port/
git config --global https.proxy https://login:password@host:port/
Configure apache2 virtual host
Configure a new apache2 virtual host which root is the /web directory of git repositoryFor clean urls, activate mod_rewrite and AllowOverride of .htaccess in your apache virtual host
a2enmod rewrite
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ app.php [QSA,L]
</IfModule>
Give your web server read access, and set write permission for web server on app/cache, app/logs and web directoryusermod -G www-data -a your_user
chgrp -R www-data *
chmod g+rwx app/{cache,logs}
chmod g+rwx web/*
- set date.timezone (for example Europe/Paris)
- set short open tags to Off
- set max upload size to 10M (only images need to be uploaded in mini-net)
Check your config with Symfony built-in script at http://youradress/config.php (if not on localhost, temporary disable source check at the beginning of the file config.php)
Configure database
Create database with doctrine (if not already)php app/console doctrine:database:create
php app/console doctrine:schema:update --force
php app/console fos:user:create
Test application
Go to http://youradress/home You should get a login page, use the login/password of the user you created the step beforeEnjoy !
Troubleshooting
If you're having some issue and can't figure it with the message displayed in your browser, use the logs at app/logs/dev.log (or app/logs/prod.log for prod environment) to know what's going onIf running prod environnement, don't forget to clean the cache after each modification
php app/console --no-debug cache:clear --env=prod
from https://github.com/inouire/mini-net