I would like to know how I can set the MySQL time zone to UTC (SET time_zone = 'UTC') from within Symfony/Doctrine, so when I call a UNIX_TIMESTAMP() function on a DATETIME field in my query, it returns the UTC unix time and not unix time in the server's time zone.
How can I do this, either automatically upon every connection, or manua...
Hi. Can someone give me some links to a maybe guide or to a symfony plugin, for voting system.
Thanks.
...
Hi, I'm using Symfony 1.4 and am a little stuck regarding form validation. I have a validator like the one below:
$this->setValidator('mobile_number', new sfValidatorAnd(array(
new sfValidatorString(array('max_length' => 13)),
new sfValidatorRegex(array('pattern' => '/^07\d{9}$/'),
array('invalid' => 'Invalid mobile number.'...
Hi, I'm using symfony 1.4 and the sfGuardDoctrinePlugin, I've got it installed and setup fine but I have the following problem:
If I login as an admin and update the permissions for a user, that user must logout then login again before having the newly added credential/permission.
Is there a way around this?
I'm not sure how easy this...
Hello,
on the backend on symfony 1.4 / Doctrine, you have a tool which allows you to filter data according to date, location, age (and many more according to your model)
EXAMPLE
I'm searching a way to do the same (with some customisation such as removing some fields) but in the frontend. I didn't find any documentation on how to do it...
If I use an ORM let's say with Zend or Symfony. Is it an all or nothing deal?
I'd like to use the ORM, but also want to optimize performance in some cases and write the query myself to get to the nitty gritty. So if I start using an ORM, is it going to be difficult to do it the old way once I include it in my project?
...
I'm using YAML to define the doctrine schema and would like to start the id field that's set on auto-increment with a number other than 0, let's say 324 (this is done in mysql by doing something like AUTO_INCREMENT=324.
This Google groups thread has a hint that it may be possible to do with command.pre_command event to execute the SQL b...
Hello,
I just saw that there is no so much documentation about sfGuardAuth groups and permission.
I have a permission named : moderator
I have 3 groups : full_time / half_time / quarter_time
In my backend (symfony 1.4 / doctrine), I have 5 modules
Only these two have to be visible for this : [st_job / st_offers ...].
Generic rule :
I...
I have been trying to upload my SYmfony plugin for some time but I keep getting this error.
Initially the dependency on the SYmfony Package was missing, but I added that.
My package.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<package packagerversion="1.9.0" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns...
I'm having a weird problem with my symfony backend. I can log in once, but after that I get
Unknown record property / related component "permissions" on "sfGuardUser"
Also, when I do login and try to edit a record from any module, I get
Fatal error: Call to a member function setLabel() on a non-object in plugins/sfDoctrineGuardPlugin/...
Hi I have two forms, a Specification form and a Source form.
I'm merging the two forms into one so that users can submit a specification and the source of the specification at the same time.
The problem is that the specification table has a field called name and the source table has a field called name. So, when creating the forms and...
Is there any way to load fixtures that have circular referencing? As an example I have the following fixture:
BusinessEntityTeam:
Nicole_Team:
name: Nicole's Team
Manager: [Nicole]
Business: [ACMEWidgets]
sfGuardUser
Nicole:
first_name: Nicole
last_name: Jones
email_address: [email protected]
...
Hello,
I want to test whether DQL supports this syntax : ROUND(NOW(), 'YEAR') (MySQL does). Here is what I tried in MySQL console:
mysql> SELECT ROUND(NOW(), 'YEAR');
+----------------------+
| ROUND(NOW(), 'YEAR') |
+----------------------+
| 20100923135639 |
+----------------------+
Trying the same thing in DQL gives this:
te...
I am trying to run this query and getting error "Unknown relation alias programs".
this is the query.
$q= Doctrine_Query::create()
->select('students.firstname',
'students.middlename',
'students.lastname',
'programs.program',
'courses.ti...
A question about symfony form validators. For example I have an url field. If the user leave this field empty, it is OK. But if the user provide an url, he should provide a valid one.
I tried $this->setValidator('url', new sfValidatorUrl(array(), array('invalid' => 'invalid url')));. But it doesn't permit empty values. (which is not t...
I have this doctrine query in symfony. It returns a lot of rows when i run mysql code generated by this dql query in phpBB but when i run it in symfony and access its results with this code:
foreach ($this->courses as $course){
echo "<br>".$course->firstname;}
it returns only one name. Also when i try to get $course->title, this erro...
There are a lot of PHP frameworks inspired by Ruby on Rails (CakePHP, Akelos, symfony). Is Zend Framework inspired in other frameworks or ideas? Do you have references (websites, books, etc) talking about it?
Thank you.
...
Is there a way to build a large-scale, multi-user (meaning users can register and login) web application / website with a php framework like symfony (MVC pattern) and intergrate a CMS like wordpress to manage the site?
My desired goal is to use wordpress to manage the content of the site, and quickly and easily add new features to site ...
Note: It was tough deciding whether this belonged here or ServerFault, but it seemed like a programming problem, so if it's out of place, feel free to migrate it.
I downloaded the sandbox of Symfony 1.4.8 and copied the files to my webserver. Unfortunately, when I try to access /symfony/sf_sandbox/web/ (where I installed it), I get the ...
I am trying to wrap my head around symfony's user authentication. Need advice on best practices.
apps/frontend/modules/mymodule/config/security.yml
edit:
is_secure: true
credentials: owner
all:
is_secure: false
When and where do I set $this->getUser()->addCredential('owner')?
In a filter of the filter chain?
If I set it there...