symfony-1.4

Symfony 1.4, doctrine: multiple join to one table

那年仲夏 提交于 2020-02-07 12:20:17
问题 the scheme: User: options: collate: utf8_unicode_ci charset: utf8 tableName: users columns: ID: type: integer(4) primary: true autoincrement: true USERNAME: type: string(255) notnull: true Task: options: collate: utf8_unicode_ci charset: utf8 tableName: tasks columns: ID: type: integer(4) primary: true autoincrement: true CREATED_ID: type: integer(4) notnull: true OWNER_ID: type: integer(4) notnull: true DESCRIPTION: type: text notnull: true relations: User: onDelete: CASCADE local: CREATED

Symfony 1.4, doctrine: multiple join to one table

情到浓时终转凉″ 提交于 2020-02-07 12:14:10
问题 the scheme: User: options: collate: utf8_unicode_ci charset: utf8 tableName: users columns: ID: type: integer(4) primary: true autoincrement: true USERNAME: type: string(255) notnull: true Task: options: collate: utf8_unicode_ci charset: utf8 tableName: tasks columns: ID: type: integer(4) primary: true autoincrement: true CREATED_ID: type: integer(4) notnull: true OWNER_ID: type: integer(4) notnull: true DESCRIPTION: type: text notnull: true relations: User: onDelete: CASCADE local: CREATED

Join query exception in Symfony 1.4.11/Propel 1.4.2

会有一股神秘感。 提交于 2020-02-06 19:03:09
问题 I need to run following query: SELECT m.TITLE, m.MOMENTOIMAGE, s.CREATED_AT, s.UNREAD, mem.FIRSTNAME, mem.LASTNAME, mem.MEMBER_PHOTO, mem.ID FROM `momento_send` s, `send_distribution` sd, `momento_distribution` d, `momento` m, `member` mem WHERE s.momento_idmember=6 AND sd.id_send=s.id AND sd.id_distribution=d.id AND d.momento_id=m.id; For that, I wrote following code in Symfony 1.4 (using Propel 1.4.2) (Thanks to @j0k) $c = new Criteria(); $c->clearSelectColumns(); $c->addSelectColumn

Symfony 1.4 - Unable to load cacheHelper.php

情到浓时终转凉″ 提交于 2020-01-15 10:14:52
问题 I have just setup symfony 1.4 on Amazon EC2 AMI Linux. Every thing seems to be configured fine but when I open the default h*tp://ec2-xxxxxxx-.amazonaws.com/ URL it shows me 401 | Unauthorized | InvalidArgumentException and the error is: Unable to load "cacheHelper.php" helper in: SF_ROOT_DIR/apps/frontend/lib/helper, SF_ROOT_DIR/lib/helper, SF_ROOT_DIR/lib/vendor/symfony/lib/helper. Any help is appreciated. <VirtualHost *:80> ServerName ec2-184-73-90-216.compute-1.amazonaws.com DocumentRoot

Symfony 1.4: PHP Fatal error: Allowed memory size of 33554432 bytes exhausted

只谈情不闲聊 提交于 2020-01-14 05:24:46
问题 I am trying to rebuild a symfony 1.4 database by running the following command: ./symfony propel:build-sql When I run the command, I get the following error: PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 89 bytes) in /lib/vendor/symfony/symfony-1.4.19/lib/plugins/sfPropelPlugin/lib/vendor/propel-generator/classes/propel/engine/database/model/Table.php on line 554 I checked my memory_limit configuration in /etc/php5/cli/php.ini The line is as follows:

Symfony 1.4: how to NOT display any filter through generator.yml

自古美人都是妖i 提交于 2020-01-14 03:29:29
问题 I created an admin module in Symfony . I would like to show the table list but without filters. By default I get all filters. I managed to unset all the filters by hand -using unset, in the filterForm file of the module. Even more, I enabled just one filter and unset it. Used the unset($this->widgetSchema['filter'], ...) for that. I don't like this solution. I would like to do it using the generator.yml : I tried: I) filter: false II) filter: display: false III) filter: display: [] <-- empty!

Symfony 1.4 doctrine - many-to-many relationship with extra field in intermediate table

笑着哭i 提交于 2020-01-14 02:48:27
问题 There are 3 tables: shelf, section and shelf_has_section intermediate table to support n-m relation. The schema build from symfony doctrine:build-schema looks as following. Simply, shelf(id, position) section(id, name) shelf_has_section(shelf_id, section_id, number_of_books) The schema. Shelf: connection: doctrine tableName: shelf columns: id: type: integer(4) fixed: false unsigned: true primary: true autoincrement: true position: type: string(255) primary: false notnull: true autoincrement:

500 internal server Symfony on production, possibly due to PHPsuexec

痴心易碎 提交于 2020-01-11 11:57:12
问题 Running into a 500 internal server error on my subdomain installation of Symfony when I attempt to visit any modules. The server does have PHPsuexec installed on it. Does anybody know whats up? Otherwise it states that the symfony project is installed and it runs fine on my server. One glitch could be that on my server the directories have permissions 777 and all files have 666 permissions. However, courtesy of PHPsuexec, most my directories seem to have 775 and the files a 664 permission

Format date in the indexSuccess.php

点点圈 提交于 2020-01-11 10:04:46
问题 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? thanks 回答1: You can make in symfony in your indexSuccess.php and showSuccess.php instead of for example: <?php $value->getCreatedAt() ?> next: <?php echo date('d.M.Y', strtotime($value->getCreatedAt())) ?> You can use other formats. 回答2: The format of some data absolutely not belongs into controller context - so please

Form requested url not found

99封情书 提交于 2020-01-07 02:21:23
问题 hello Im working on a symfony project. Im battleling with a form that wont redirect to its own page. the action attribute is set to "" and method set to post. In that case it should call the same page but im ending on a 404 page. here's the code of my page in the action file: public function executeDetail(sfWebRequest $request) { if($request->isMethod(sfRequest::POST)) { if(!$this->getUser()->isAuthenticated()) $this->redirect('@user_login'); $formData = $request->getParameter($this->form-