Get the current server from the IP address

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

Using the connection closure to the database in php

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

Multilevel built-in form in symfony 1.4

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

Calling a bind () member function on a non-object in

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')) { $

Porting a Symfony 1.4 to 2.0 Web site

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

View the PHP application trace in the Apache error log

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

Configuring the first schema.yml for Symfony 1.4

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.

How should be kept as HTML tags in the 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

Any PHP framework to use SECURELY on shared hosting?

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

Date of the format in indexSuccess.php

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

Symfony sfWidgetFormChoice default value off

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

sfValidatorDoctrineUnique and sha1 in Symfony?

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

get value in the action class

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

Log Doctrine Queries from Symfony 1.4 Tasks

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

symfony 1.4 - inject the connected user into the Doctrine model

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

Symfony link method generator.yml

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

How to set a foreign key to null? (Symfony)

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

Dynamic menu with symfony layout

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

Symfony: Web debug toolbar icons are gone

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

how to install symfony on a shared web server?

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

Javascript source in partial view of symfony

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

How to add the symfony utility to my PATH variable?

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

Does Symfony have weaknesses?

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

Set default values ​​in the Select option in Symfony?

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

Symfony routing issues with index.php

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

Error with propel-generate-crud in Symfony 1.0

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

Elmah For others PHP

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'