1
votes

I have all the symfony 1.4.18 source file in a folder called symfony. And I have the database.

under this symfony folder it has apps, cache, config, data, lib, log, plugins, test, web, .gitignore, symfony

what all i need to do to make it work in another shared host server?

how to change the config file to make it run in localhost? the config file is the following Under the config folder, vhost.conf file

DocumentRoot /var/www/vhosts/example.com/httpdocs/web

<Directory /var/www/vhosts/example.com/httpdocs/web>
 Options +FollowSymlinks
 php_admin_value open_basedir
 "/var/www/vhosts/example.com/httpdocs:/tmp:/usr/local/php:/usr/share/pear"
</Directory>

properties.ini file

[prod]
host=youripaddress
port=22
user=yourusername
dir=/var/www/vhosts/example.com/httpdocs/
type=rsync
password=yourpassword

databases.yml

all:
doctrine:
  class: sfDoctrineDatabase
  param:
    dsn: 'mysql:host=localhost;dbname=yourdbname'
    username: yourdbusername
    password: yourdbpassword
    attributes:
      default_table_type: InnoDB
      default_table_collate: utf8_unicode_ci
      default_table_charset: utf8
      use_dql_callbacks: true
2
You want to run symfony on your localhost OR on a shared host?j0k
@j0k I want to run symfony on my localhost first, then migrate to in shared host servernickleefly

2 Answers

1
votes

You should create a vhost locally (how depends a bit on your OS, search the web if you dont know) and point the DocumentRoot to the "web" folder in your symfony folder.

The vhost.conf file is a example file for such a vhost configuration.
Remember to change all pathes to your actual local pathes.

For your local setup use the dev Environment. So enter all you local parameters like pathes and db conf in the resp. config files (config_dev.ym) or sections ([dev]).

Then you can call: http://mylocal.virtualhost/app_dev.php

0
votes

@ivoba the project i was talking about is symfony 1.4.18. I know how to create vhost locally and point to web folder. Lets say i installed xampp in D drive, assume i have pointed symfony.dev to D:\xampp\htdocs\symfony\web

DocumentRoot D:/xampp/htdocs/symfony/web
<Directory D:/xampp/htdocs/symfony/web>
Options +FollowSymlinks
php_admin_value open_basedir
   "D:/xampp/htdocs/symfony:/tmp:D:/xampp/php:/usr/share/pear"
</Directory> 

properties.ini file should be

[prod]  
host=localhost
port=22
user=
dir=D:/xampp/htdocs/symfony
type=rsync
password=

is the config i am right? i should be able to access symfony.dev/index.php or symfony.dev/frontend_dev.php, right?