I used symfony 1.4 to create my application. I'd like to get the IP adress of the current server to put it within soap request So, how can i get the IP address of the current server?For most situations, using $_SERVER['SERVER_ADDR']; will work. If th
How do you perform translation with an embedded link_to function in the template using Symfony 1.4? Example: Please click <php echo link_to('here', sfConfig::get('app_url') ?> for additional info.I usually do something like this: echo __("Pleas
I was always in assumption that it is always a good practice to close database connection, regardless of database/ORM, like mysql_close(), Propel::close() etc. With reference to one of my other question and some other research on Internet, I came to
Need working example for multiple level embedded form in symfony-1.4(doctrine). sample schema as below: tableA: id tableB: id tableA_id tableC: id tableB_id For above prototype schema I want to add/edit record in above 3 table using same form.Please
my action.class.php if ($this->getRequest()->getMethod() == sfRequest::GET) { $this->formShoppingList = new ShoppingListForm(array( 'shoppinglist' => $items, ), array('shoppinglist_id' => $list_id)); } if ($request->isMethod('post')) { $
I've got a huge site that has been written (in a very bad way) in symfony 1.4 now, I've been asked to make some substantial changes to the navigation flow, add some features and so on.. considering the effort, I was wondering if it would be better to
I have developed an application in PHP (using the Symfony framework). My Apache error log file is getting full of these kind of errors: [Mon Feb 13 20:08:08 2012] [error] [client 60.169.75.168] Empty module and/or action after parsing the URL "/.&quo
I'm trying to set up Symfony 1.4. I'm not new to MVC but this is my first attempt at Symfony. I've been following the documentation on symfony-project.org/reference/1_4 and I have a "Hello, World!" page. I moved on to the next step -- database.
i create my new site. Now i learn and use Symfony. I have few questions. Why default Symfony allow add HTML tags to database? For example i create new module, i go to module/new, in title i enter <strong>test</strong> and next save it. In data
Are there PHP frameworks that would allow me to generate an application and then use it SECURELY on a shared hosting, as far as a shared hosting security can be achieved? By this I mean, for example, not requiring any app/tmp directory with 777 acces
I want to format the created_at field date from the original for something like 03.May.2011 to be shown in the indexSuccess.php and in the showSuccess.php Could you help me? thanksYou can make in symfony in your indexSuccess.php and showSuccess.php i
The widget looks like this: $this->widgetSchema['tara'] = new sfWidgetFormChoice(array( 'choices' => Doctrine_Core::getTable('Users')->getCountry(), 'expanded' => false, 'multiple' => false, )); And the getCountry function: static public $c
In User.class.php i have: $this->setCode(sha1($this->getPassword())); This is ok. In register form i would like use sfValidatorDoctrineUnique. $this->validatorSchema->setPostValidator(new sfValidatorDoctrineUnique(array('model'=>'User', 'co
how can i get number ID in action? for example class jobActions extends sfActions { public function executeIndex(sfWebRequest $request) { $this->jobeet_jobs = Doctrine::getTable('JobeetJob') ->createQuery('a') ->where('id = 3') ->execute(); ec
I'd like Symfony to log the Doctrine SQL queries that one of my tasks executes to a log file, much like the web debug toolbar does for non-cli code. Is this possible? Symfony version: 1.4.12 Doctrine version: 1.2.4 Here's some example code for a task
I would like to inject, with full testability, the id of the current logged in user into a creator_id field of a Doctrine_Record class, without using the sfContext singleton. I found a couple of Doctrine behaviours like http://www.symfony-project.org
How do I specify the method of an action (similar to _delete): generator: config: list: object_actions: myaction: {label: Label, action: myaction, method: post} This ignores my method setting and renders a get link: <a href="/backend/myaction/1&qu
I have a many-to-many relation with a linked table. See (simplified) schema below. Created according to the tutorial (http://www.symfony-project.org/doctrine/1_2/en/05-Data-Fixtures#chapter_05_many_to_many) The schema imports/builds correct and phpmy
I have a form with an input which is optionnal but I can't valid the form if the user don't fill it because it's a foreign key and Doctrine shows me an error. SQLSTATE[HY000]: General error: 1452 Cannot add or update a child row: a foreign key constr
I started using symfony a few weeks ago, and there are some things that are not clear for me. My question is that how could I put a list of categories (for menu) in the main layout of an application? How can I pass a variable for this layout and wher
Just moved a symfony project from local (win) to server (linux), and the icons in the web debug toolbar have disappeared. Only the image alts remain so I guess it's a path issue with the images. Basically, I see "Time 300ms" instead of "[ic
I have created a project(on my Localhost) in symfony(PHP Framework), and need to upload it on server(i.e the WEB Server), but i dont know how to do that, i got many methods on net, but i was not able to follow that. so please help.just push it in you
I'm using symfony 1.4, I wrote a piece of js code to use in a template, and I want to put it in a JS separated file because I'll use it many times in the code. I added the JS to the template using: <?php use_javascript('mi_js') ?> This templates has
I'm running the latest MAMP (i think so) on my Mac (10.5.8, PPC G4) and i added the following to my .profile - file in my home directory: export PATH=/Applications/MAMP/htdocs/lib/vendor/symfony/data/bin:$PATH But my Terminal is somehow unable to fin
I am currently conducting a technical review of a web application that was developed by a third party. The used symfony framework. Are there any known issues that I should visit first? E.g. any security holes. Thanks in advance for help. MarkI've use
I am using the widget sfWidgetFormChoice(array ( 'choices' => CountryPeer::getAllCountry(), )) and validator as sfValidatorChoice(array ( 'choices' => array_keys(CountryPeer::getAllCountry()), )) I get a select element as <select id="country
Currently, my login form looks like this, class LoginForm extends BaseFormPropel { public function setup() { $this->setWidgets(array( 'login_id' => new sfWidgetFormInput(), 'pwd' => new sfWidgetFormInputPassword() )); $this->widgetSchema->s
I have a site built in symfony. However, I'm putting some routing rules : resgister: url: /register param: { module: register, action: index } and I put a link : link_to('register - here','register') but this link points to http://www.mydomain.com/re
When I try to generate a CRUD test for a new project I am getting a PHP Warning and a Fatal Error. The errors relate to files that it cannot find, however, I have checked and the files are definitely there. The error text is 'require_once(lib/model/m
Is there an Elmah equivalent for PHP in general, Symfony in particular?Symfony comes with a logging framework that can log to file or any other backend you care to give it. From my understanding of Elmah this is about as close as you can get - there'