Symfony Configuration


Table of Contents

Working with the sandbox release 
Trouble shooting and QAs 
Not using VirtualHost 
Not using VirtualHost 
Not using VirtualHost 
Use from a normal user 
mod_rewrite 
mod_rewrite 
Allowed memory exhausted 
Symptom 
Solution Synopsis 

Working with the sandbox release 

check out http://www.symfony-project.org/tutorial/my_first_project.html

Trouble shooting and QAs 

swith to mySql 

> how do you swith this over to mySql? Id like to get this runing on a full
> version of symfony (not sandbox) and mysql so i could feel i had a basis to
> go on and make some real world apps.

To use MySQL instead, make the following changes in sf_sandbox/config/propel.ini:

propel.targetPackage = model
propel.project = sf_sandbox
;propel.database = sqlite
;propel.database.createUrl = sqlite://./../../../../data/sandbox.db
;propel.database.url = sqlite://./../../../../data/sandbox.db
propel.database = mysql
propel.database.createUrl = mysql://mysqlUsername:password@localhost/
propel.database.url = mysql://mysqlUsername:password@localhost/sandbox
propel.mysql.tableType = InnoDB

I believe propel.output.dir should point to your project directory:

;propel.output.dir = /home/production/symfony-for-release/sf_sandbox
propel.output.dir = /var/www/sf_sandbox

Change sandbox_sf/config/databases.yml to use MySql:

dsn: mysql://mysqlUsername:password@localhost/sandbox

Install the php5-xsl package (I used Synaptic on ubuntu) for propel.

Uncomment the following line for php-cli in /etc/php5/cli/php.ini to include mysql for the command line interpreter:

;extension=mysql.so

This should do it.

donut on 2006-07-08

only the \_dev frontend works 

http://www.symfony-project.org/forum/index.php?t=msg&goto=20687&#msg_20687

My sandbox works fine only if the _dev version is accessed:

I.e., visiting http://localhost/sf_sandbox/web/frontend_dev.php/post/list works fine, whereas http://localhost/sf_sandbox/web/post/list is not, which yield the folloiwng error:

Not Found The requested URL /sf_sandbox/web/post/list was not found on this server. Apache/2.2.2 (Fedora) Server at localhost Port 80

I can make it works by inserting a "index.php", eg, http://localhost/sf_sandbox/web/index.php/post/list

but as soon as I click on the 1st post, same thing happens again:

http://localhost/sf_sandbox/web/post/show/id/1 Not Found The requested URL /sf_sandbox/web/post/show/id/1 was not found on this server. Apache/2.2.2 (Fedora) Server at localhost Port 80

I'm using 1.0.0-rc1, the previous beta4 has the same problem as well.

only the \_dev frontend works 

you need to add/enable mod_rewrite in apache.

documented on: 2006-09-23, GUTomek

only the \_dev frontend works 

> My sandbox works fine only if the _dev version is accessed

set no_script_name to off in apps/frontend/config/settings.yml:

prod:
  .settings:
    no_script_name:           off

Then,

php symfony clear-cache

T

usernames and passwords 

> I don't know that any usernames and passwords were created by default, so
> now how do we create users so that we can login?

Ok, so I should have searched through the code for the word "admin" *before* wrote my last comment…I was obviously copying the tutorial code instead of *reading* it….DOH! I now see that admin/password is the default…

RJLyders on 2006-04-23

QAs 

REdOG on 2006-04-13 at 09:43

It would be nice if the "my first project" was done from scratch and not from sf_sandbox.

QAs 

torspo on 2006-01-26

I really don't like the VirtualHost thing. That is what pushed me away from this project to explore other projects such as Cake, but now I'm back since I didn't like it there.

Is there a simple way to start a new app in /www_root/myapp/ that would be accessed via http://localhost/myapp/ or \~user/public_html/myapp that would be accessed via http://localhost/\~user/myapp/ instead?

no need any more 

$ php symfony propel-build-model
Could not open input file: symfony
$ symfony propel-build-model
ERROR: symfony - You must create a schema.xml file.

http://www.symfony-project.org/forum/index.php?t=msg&goto=12323&#msg_12323

symfony up to version 0.7.1914 (so include last stable ver) doesn't support propel-build-modle from a yml and it will get the "You must create a schema.xml file" error!

http://www.symfony-project.org/forum/index.php?t=msg&goto=15529&&srch=create+schema.xml+symfony+ERROR+You+must#msg_15529

rename schema.xml.sampl to schema.xml

no longer true 

[Note]

Due to the image paths in CSS files you will need to create sf/images/sf_admin/ folder in your document root and copy contents of sf_sandbox/web/sf/images/sf_admin/ folder there.

2006-03-27, Akinas