Development

InstallingSymfonyOnOne

You must first sign up to be able to contribute.

Version 7 (modified by j.andersen, 9 years ago)
--

Installing Symfony on One.com

*** DRAFT ***

One.com is a well-know and cheap web hosting provider, without ssh access. This tutorial explains how to get your symfony app up and running on one.com.

1. Since application development is easier to do locally, and not directly at one.com we want to package our application. This is possible with the symfony task freeze, which will collect symfony itself and your project into your project folder.

# symfony freeze

2. Now we can upload our project with FTP to one.com

3. Loading the database schema. Since the sfControlPanel plugin is not allowed to call the php cli, you can create a database dump from your local database and import through phpMyAdmin.

3. Update config/database.yml and config/propel.ini to reflect your database credentials, delivered by one.com

4. Create a php file "create_symlink.php", which will create a symlink from /web/frontend_dev.php to /index.php. (Call the php script, after you have uploaded it to your document root).

<?php
/*
Allow write permissions on below directories before executing..
You should restore permissions after symlinks are created...
*/
$rootdir = realpath(dirname(__FILE__));
$webdir = realpath(dirname(__FILE__).'/web');
symlink($webdir.'/frontend_dev.php', $rootdir.'/index.php');
?>

5. Fixing wrong paths for web dir. Add the below line in the beginning of your frontend_dev.php / index.php script.

$_SERVER['SCRIPT_NAME']='/web/frontend_dev.php';

6. Deleting cache, just simply delete the subfolders of your /cache folder with your ftp program.

Calling sfSimpleCMS

  $this->redirect("http://".$this->getContext()->getRequest()->getHost().'/cms/en/home');