symfony

Can cache folder in Symfony be deleted without side effect?

As far as I know, the cache folder ( that's located along apps, config, data lib and other folders) in Symfony project are just storage folder. Can I choose not to check it into my source control? Will my action has adverse effect on the completeness of my check-in? ...

Set Mime_type validation in Symfony

I want to make sure that during file upload time, only the file of the format jpeg, png and gif are allowed. So the "File of type:" below in the screenshot must show jpeg, png and gif: I did the following for my validator in Symfony: $this->setValidator ( 'upload your filehere', new sfValidatorFile ( array ( 'required'=>true, '...

Form Upload with request->getParameter value equals null wil crash the web app.

I think I found a weird problem in Symfony. Here's my upload case form: <?php class UploadCaseForm extends sfForm { public function configure() { $this->setWidgets ( array ('Documents' => new sfWidgetFormInputFile ( ) )); $this->widgetSchema->setNameFormat('UploadCase[%s]'); $this->setValidators(array( ...

How do I save an array of data in a cookie with Symfony?

First off, I'm not all that familiar with cookies but I know how they work. I've seen quite a few different tutorials with plain PHP code but I'm looking for a solid example of how to store arrays in a cookie using the symfony syntax: $this->getResponse()->setCookie('myCookie', $data); You can't just pass in an array since it expects ...

Trouble using sandbox of symfony

I'm new to symfony and I am trying to run a simple command on the command line but I get an error message. When I try to execute the command: d:\new_xam\xampp\htdocs\sf_sandbox_1_2\sf_sandbox>symfony propel:build-model " I get the error: 'php.exe' is not recognized as an internal or external command,operable program or batch ...

i think my path is correct but still gives the same error 'php.exe' not recognized

my symfony sandbox is inside the htdocs of my xampp folder which is inside the program files in c drive i.e. c:\program files\xammp\htdocs\sf_sandbox\ but when i try to run the command symfony -v it gives the error 'php.exe' is not recognized as an internal or external command can somebody help me? what am i doing wrong?... ...

Error , can anybody help me

hi , im getting this error while trying to run a page http://localhost/sf_sandbox/web/frontend_dev.php/post ERROR: " 500 | Internal Server Error | PropelException Unable to open PDO connection [wrapped: could not find driver] " what is the problem , what i need to do eliminate this problem? thanks ...

checked the php.ini file "extension=php_pdo_mysql.dll" enabled but still error

I've checked the php.ini file the extensions are enabled: extension=php_pdf.dll extension=php_pdo.dll extension=php_pdo_firebird.dll extension=php_pdo_mssql.dll extension=php_pdo_mysql.dll but still when i try to open the page it gives the error 500 | Internal Server Error | PropelException Unable to open PDO connection [wrapped: cou...

Web front end caching best practices for site?

Summary As I'm looking on stackoverflow and around the net, I find that there is a general lack of good documentation on best practices for caching a high performance site that uses sessions. It would be helpful if we can share some ideas around some basic building blocks particularly around caching. For the purpose of this discussion, ...

Multiple databases support in Symfony

I am using Propel as my DAL for my Symfony project. I can't seem to get my application to work across two or more databases. Here's my schema.yml: db1: lkp_User: pk_User: { type: integer, required: true, primaryKey: true, autoIncrement: true } UserName: { type: varchar(45), required: tru...

send form data as web service in symfony

I am making a restrictive portal to a WiFi network using symfony, and I want to send a form as web service to other sites that want to use this portal. How should I solve this? I realize I could go the SOAP/WSDL route, but since symfony is already RESTful, it seems to me I could go the RESTful route with considerably less pain and loss o...

Mutliple criteria for single field in symfony?

I'm trying to define multiple criteria for a single field in symfony, but every time I define a second criterion, it overwrites the previous one. Here is an example of my code: # build query to fetch search results $c = new Criteria(); # set minimum price if($request->getPostParameter('price_from') > 0) { $c->add(HomeMode...

Symfony: Options for admin URL

In development mode my symfony admin/backend app can be accessed at http://localhost/backend_dev.php. For production mode, I created a controller php file, admin.php, so now in production the admin application can be accessed at http://www.domain.com/admin.php. What do I have to do to allow the admin app to be accessed at domain.com/ad...

Put Images on other computers under login credentials

I have an application server, a database server and a file server, with the file server has its own subdomain name (i.e., file.myexample.com) The file server stores all the images that are used in the application, the point is that I don't want the user to view those images without obtaining proper authentication first. So in a sense th...

Symfony - How can I insert behaviors in my doctrine migrations ?

Hello everybody ! Is it possible to add behaviors (eg. actAs Timestampable) in a doctrine migration to avoid defining the created_at and updated_at columns ? Thank's in advance ! ...

How to Upgrade Symfony from 1.2.4 to 1.2.7

I have a Symfony 1.2.4 application, taken and modified from the Symfony sandbox application, there was no effort made to make sure that the Symfony engine was separated from my application, so now the Symfony engine is just a folder inside my application. What is the best way to upgrade from Symfony 1.2.4 to 1.2.7? Any ideas? ...

php symfony to get blob image data from mysql

How can I get image data string from mysql db that has blob images? Thanks. ...

Use "Updated WMD Editor" in textareas loaded by AJAX Forms

We're trying to use Stackoverflow's excellent WMD / Markdown editor (http://blog.stackoverflow.com/2009/01/updated-wmd-editor/, http://github.com/derobins/wmd/tree/master) on a Symfony project. This works excellent on textareas without any AJAX involved. But when we have to include wmd.js first, and then later on user interaction (i.e. ...

Best practices when including/using a "partial view"?

In modern web frameworks like Rails and symfony the concept of partial includes or partial views is well documented and recommended. What I am having trouble with lately is deciding how much design to include in the partial. It's kind of hard to explain but I want to know what others do when creating a partial and including it in a tem...

Move Symfony framework out from my sandbox application

I use Symfony Sandbox structure in my development. Now, thinking of future ugrades, I want to separate the Symfony application out from my application and put it in a separate folder. The only problem is that it seems my application and Symfony are hopelessly intermingled together. Anyone has any idea how to separate the Symfony engines...