symfony1

Relation one to one in sf1.4/propel

拟墨画扇 提交于 2019-12-11 19:05:09
问题 i have installed sfGuardPlugin and created this model: propel: sf_guard_user_profile: _attributes: { phpName: sfGuardUserProfile } id: ~ user_id: { type: integer, foreignTable: sf_guard_user, foreignReference: id, required: true, onDelete: cascade } name: varchar(50) As it is written here, http://www.propelorm.org/wiki/Documentation/1.4/Relationships (see "One-to-one relationships"), It is supposed symfony generates the function sfGuardUser->getSfGuardUserProfile() and sfGuardUserProfile-

web server memory leak issue

时光总嘲笑我的痴心妄想 提交于 2019-12-11 18:44:28
问题 i'm create a dating website using symfony 1.4 (it's my first project using symfony). the problem is there server freezes if there is only 10 or less users online. i tryied optimizing my js, css, sprites using yslow i got grade A but still the problem is always there. that's why i think the way i build the application might be wrong so here is the website naijaconnexion.com i'm asking u for advices and things to do so i overcome this problem If i wasn't clear enough just ask, if you want

Propel version with symfony 1.4.11

你。 提交于 2019-12-11 18:22:31
问题 I went through few post but didn't find an answer to probably one of most simple questions. What is the standard Propel version that comes bundled with symfony 1.4.11? In one answer, I found a recommendation to use the awk command but unfortunately I'm on Windows, so that command will not run for me. Another answer was to install different Propel Lib; please, no such answers. 回答1: Simply give a look to the svn repository. Each symfony version are tagged. You will see: propel http://propel

Access sfConfig class in apps/appname/lib

流过昼夜 提交于 2019-12-11 18:10:12
问题 I have a symfony 1.4 application with some classes for connecting to a SOAP web service stored in apps/appname/lib. When I try to access the sfConfig class to get some variables I have set in app.yml , an error is thrown since the application doesn't recognize sfConfig::get('app_myvar') as a method being called on a class. How do I make the sfConfig class available to the classes in my apps/appname/lib directory? This is the error I'm getting Parse error: syntax error, unexpected '(',

symfony - embeddedForm - multiple checkboxes

半城伤御伤魂 提交于 2019-12-11 17:52:29
问题 I have article admin module and a tag module Tags are simply a single tag per row item What I'd like to do is to embed the list of all the tags (as checkboxes) into my article module Could I do this with embedded forms? EDIT: This is my schema: article: id: ~ title: { type: VARCHAR, size: '255', required: true } tags: { type: VARCHAR, size: '500' } created_at: { type: TIMESTAMP, required: true } updated_at: { type: TIMESTAMP, required: true } tag: id: ~ tag: { type: VARCHAR, size: '500',

sfGuard custom algorithm_callable

主宰稳场 提交于 2019-12-11 17:36:44
问题 I am trying to make custom algorithm for password hashing. I try to do this. In app.cfg: sf_guard_plugin: algorithm_callable: [Hlp, noHash] In apps/frontend/lib/Hlp.php: class Hlp { function noHash($password) //tried to make public or public static, but it didn't work either { return $password; } } And in my database 'algorithm' is set to 'noHash'. When I try to log in I get following error: The algorithm callable "noHash" is not callable. I am using php 5.2. What am I doing wrong? UPDATE

java script Alerts Unicode display issue in IE 8

牧云@^-^@ 提交于 2019-12-11 17:10:30
问题 currently im working on symfony based large application. i m having issue on displaying unicode characters inside java script alerts in IE browsers only fire fox not a issue working fine for example alert("<?php echo __("English word to auto convert to other languages by symfony ")?>"); In IE 8 version i can only see boxes when alert pops up. have anybody idea why this happen please. regards 回答1: Check the encoding of the page. This should be in an encoding that supports unicode characters.

Error 500 after deploying a symfony app

馋奶兔 提交于 2019-12-11 16:41:35
问题 I have deploy my project using "project:deploy --go". Now i have my folders "apps", "lib", "web", etc, inside "public_html". When i try to login to a user session of my web app, i get an error 500. This is what i'm founding in the php error log: [Tue Mar 09 05:47:02 2010] [error] [client 174.37.227.194] client denied by server configuration: /home/mainhost/public_html/whm-server-status [Tue Mar 09 05:47:02 2010] [error] [client 174.37.227.194] File does not exist: /home/mainhost/public_html

How to get an empty parameter from an url like “example.com/id//”?

北慕城南 提交于 2019-12-11 16:27:45
问题 I am using symfony 1.0 and below is the URL which displays the news description. http://news4u.com/search/news/id/344158/css//act/n In the above URL value for CSS is missing and the URL is supposed to be as below http://news4u.com/search/news/id/344158/css/n/act/n When I use $this->getRequestParameter('css') to get the value of css, I get it as 'act' and if the do the same for 'act', I get empty value. $getRequestParameter('css')=act $getRequestParameter('act')=<EMPTY> I am getting values for

Propel ORM UNION query

[亡魂溺海] 提交于 2019-12-11 14:19:36
问题 I have three criteria objects $c1, $c2, $c3 I want to return the union set of all three i.e.: ($c1 || $c2 || $c3) I have a function that expects a Criteria object, so I need to be able to return a criteria that represents the UNION of $c1, $c2 and $c3. Does anyone know how to achieve that? 回答1: You can do that with criterions: <?php $c = new Criteria(); $cton1 = $c->getNewCriterion(AuthorPeer::FIRST_NAME, "Leo"); $cton2 = $c->getNewCriterion(AuthorPeer::LAST_NAME, array("Tolstoy", "Dostoevsky