If you are using the getDistance method provided by Geogrphical Template in Doctrine and got this error:
UPDATE: IT WAS FIXED, CHECK IT OUT AT http://www.doctrine-project.org/jira/browse/DC-524
500 | Internal Server Error | Doctrine_Connection_Pgsql_Exception
SQLSTATE[22003]: Numeric value out of range: 7 ERROR: input is out of range
You probably have the same problem that I got today..
I'm using NUMERIC on column type with precision 10, but the problem is not in the column latitude and longitude, it´s on calculation.
To resolve this problem I made a casting inside of ACOS function calculation, I tested it only in postgresql.
My DQL used to get all hotels around 3 kilometers of hotel id 189646
On symfony is a good idea to use the referer to costomize some messages, like this one below.
in template, you have to make a condition:
<?php if( $sf_request->getReferer() != '' ): ?>
The page <?php echo $sf_request->getParameter('page'); ?> was changed.
<?php else: ?>
I'm running plesk 9.0.1 and I configured my app on a subdomain, I did these steps to configure the app:
1) remove all default directories of domain
rm -rf /var/www/vhosts/example.com.br/subdomains/myapp/*
2) I put my files on document_root, like this
/var/www/vhosts/example.com.br/subdomains/myapp/conf,
/var/www/vhosts/example.com.br/subdomains/myapp/symfony
I was creating a new project and I wanted to create on model Client a field called birthday as DATE field. I noticed that the admin generator form created a limited year's select to 5 forward and backward. I'm too change the format of field of mm/dd/yyyy to dd/mm/yyyy. How can I did it?
You need to override the formClass, like this:
class ClientForm extends BaseClientForm
{
Recently I needed to use the xml-rpc lib with symfony. I created a function to make cache of xml-rpc requests using the symfony's sfFileCache and it work good.
I'm using the xml-rpc library that you can get on http://phpxmlrpc.sourceforge.net/
public function callCache( $methodName, $params ){
// generated a key to cache file