symfony-1.4

Remove 'web' from Symfony 1.4 path on shared hosting?

可紊 提交于 2019-12-25 05:47:08
问题 I've found a lot of helpful information about installing Symfony 1.4 on a shared hosting plan, but I've run into a stumbling block that's confounded me all day. Going to http://www.alternium.net/jobeet/index.php returns a 404 instead of the file at http://www.alternium.net/jobeet/web/index.php. /jobeet/.htaccess: Options +FollowSymLinks +ExecCGI # Enable rewrite engine and route requests to framework RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^/robots.txt RewriteRule ^(.*)$

How to use Symfony get/setAttribute on nested Session Attributes?

不羁的心 提交于 2019-12-25 05:08:05
问题 I have a sfuser/attributes looking like this: session: symfony/user/sfUser/attributes: { symfony/user/sfUser/attributes:{ 15:{ Telefon:'+304994994994', option:'15', rules:'12', arrayBunch:[{ this: 'da', that: "where" }] }, 17:{...}, mysetting: "val" }, sfGuardSecurityUser:{}, admin_module:{}, sfGuardUserSwitcher:{} }} When i use setAttribute("mysetting", "val") they stores mysetting like show on my example. It is therefore unnecessary to use setAttribute("mysetting", "val", 15) because i got

How to use Symfony get/setAttribute on nested Session Attributes?

人走茶凉 提交于 2019-12-25 05:07:31
问题 I have a sfuser/attributes looking like this: session: symfony/user/sfUser/attributes: { symfony/user/sfUser/attributes:{ 15:{ Telefon:'+304994994994', option:'15', rules:'12', arrayBunch:[{ this: 'da', that: "where" }] }, 17:{...}, mysetting: "val" }, sfGuardSecurityUser:{}, admin_module:{}, sfGuardUserSwitcher:{} }} When i use setAttribute("mysetting", "val") they stores mysetting like show on my example. It is therefore unnecessary to use setAttribute("mysetting", "val", 15) because i got

sfValidatorDoctrineUnique fails on capital letters

百般思念 提交于 2019-12-25 03:59:14
问题 I've setup a post validator in my symfony form to stop duplication of primary keys. A primary key is a two-character string in this instance. Code used to validate: $this->mergePostValidator(new sfValidatorDoctrineUnique(array( 'model' => 'Manufacturers', 'column' => 'id', 'primary_key' => 'id' ))); The primary key is uppercase (for example AU). Bizarrely the post validator triggers successfully is lowercase 'au' is entered into the field (i.e. stops it from going to the database and

symfony on virtual host document root problem

a 夏天 提交于 2019-12-25 03:41:09
问题 Im trying to deploy symfony on virtual host. mod_rewrite converts /web URLs to domain root URLs (domain.com/image.gif is turning internaly into domain.com/web/image.gif). But thanks to web is executed internaly from /web dir, Symfony is still thinking it has document root there and prefixes any url_for() URLs with /web. So when i have route: show_books: url: /books ..and iam asking for: url_for('@route_name') Symfony is generating: /web/books I cant change hosting behaviour, i need to have

get all groups from the Users - sfDoctrineGuardPlugin

喜欢而已 提交于 2019-12-25 02:15:49
问题 In sfDoctrineGuardPlugin is: sfGuardUser: actAs: [Timestampable] columns: first_name: string(255) last_name: string(255) // indexes: is_active_idx: fields: [is_active] relations: Groups: class: sfGuardGroup local: user_id foreign: group_id refClass: sfGuardUserGroup foreignAlias: Users sfGuardGroup: actAs: [Timestampable] columns: name: type: string(255) unique: true description: string(1000) relations: Users: class: sfGuardUser refClass: sfGuardUserGroup local: group_id foreign: user_id

Table creaction on doctrine migration for custom behavior

不羁岁月 提交于 2019-12-25 02:15:34
问题 I've created custom doctrine(1.2) behavior which should create tables for models (very simmilar to i18n behavior). I see this tables in schema.sql, and if i execute it everything is fine, but this is no such tables if my migrations diff (doctrine:generate-migrations-diff). What i'm doing wrong? class DescriptionableGenerator extends Doctrine_Record_Generator { protected $_options = array( 'className' => '%CLASS%Description', 'tableName' => '%TABLE%_description', 'fields' => array(),

Symfony 1.4 Cross APplication link fail

回眸只為那壹抹淺笑 提交于 2019-12-25 01:12:27
问题 My Apps require cross application linking and after meticulously following the blog at http://symfony.com/blog/cross-application-links I got one of them working and one of them not working. The link to the backend application from the frontend works fine but not the link to the frontend on the backend code? Basically I have on my backendConfiguration.class.php file : protected $frontendRouting = null ; public function generateFrontendUrl($name, $parameters = array()) { return 'http:/

sfWidgetFormDoctrineChoice renders only one value but query returns 5 values

风流意气都作罢 提交于 2019-12-24 19:54:53
问题 I'm using a sfWidgetFormDoctrineChoice in a Symfony form in this way: $this->widgetSchema['no_emisor'] = new sfWidgetFormDoctrineChoice(array('model' => 'SdrivingEmisor', 'add_empty' => true)); I tried also with: $this->widgetSchema['no_emisor'] = new sfWidgetFormDoctrineChoice(array('model' => 'SdrivingEmisor', 'add_empty' => 'Seleccione un Emisor', 'expanded' => false, 'multiple' => false)); $this->widgetSchema['no_emisor'] = new sfWidgetFormDoctrineChoice(array('model' => 'SdrivingEmisor',

How to send POST variables to External URL ?

落爺英雄遲暮 提交于 2019-12-24 18:06:09
问题 I'm making a shopping cart. I would like to save the order before going to the payment gateway. My payment gateway requires me to send a POST to external address but not how to do it from a controller action. public function executeBuy(sfWebRequest $request) { sfProjectConfiguration::getActive()->loadHelpers('Url'); // save the order $this->order = new Order(); $this->save //etc.... //go to TPV Payment gateway $dsAmount = (float)$order->getPriceWithShipping() * 100; $dsOrder = (int)$order-