symfony1

Strange symfony i18n error

岁酱吖の 提交于 2019-12-11 03:35:04
问题 I use symfony 1.4.11. In my site I have 3 languages in my site "se","en","no". In my backend, I use only en, and I have in settings: all: .settings: default_culture: en But in some module, when in frontend I have "se" language, have error : Data file for "se" was not found. In frontend I try, make i18n with database; Stack trace: stack trace at () in SF_SYMFONY_LIB_DIR/i18n/sfCultureInfo.class.php line 301 ... if (is_file($filename) == false) { throw new sfException(sprintf('Data file for "%s

Why are symfony DOMCrawler objects not properly passed between dependent phpunit tests?

試著忘記壹切 提交于 2019-12-11 03:14:42
问题 I have a test suite for phpunit for my symfony application. In that test file, I have some dependencies between different tests, and pass a DOMCrawler object between the dependent so that I don't have to navigate to it each time. However, in taking the approach that I did, It seems that you cannot submit forms with these passed objects, but you can click on the links on them. Is there a reason for this? Is my design just poor and if so, how should I change it? Any feedback is welcome. I've

Setting up Symfony with Nginx server

半城伤御伤魂 提交于 2019-12-11 03:08:16
问题 My project requires to set up symfony with Nginx server. I have previously used Symfony with Apache. Currently I have followed the steps mentioned here http://wiki.nginx.org/index.php?title=Symfony&oldid=6054 ,but somehow it is not running properly. Update: The nginx wiki now contains working configuration for symfony 1.4 and 2.0 回答1: Here is a working symfony nginx config. It is based on Ubuntu/Debian installations, please comment/edit at the linked post if conversion to another platform

Zend vs Symfony learning time

 ̄綄美尐妖づ 提交于 2019-12-11 02:49:14
问题 Is faster to learn Zend Framework or Symfony? Which framework has more and clear documentation? 回答1: I think both frameworks take some time to learn properly but you can't beat Symfony's documentation. 回答2: I think the documentation for both is clear enough. But somehow it seems to be, that ZF is simplier to learn because it constist of many loosely coupled classes. Symfony is more consistent to me and it's fundamental terms like "bundle" are a little bit more difficult to learn than those of

Error getting images to show up in Symfony 1.4.8

心已入冬 提交于 2019-12-11 02:07:53
问题 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 following: It seems like the images aren't showing. According to the text: If you see no image in this page, you may need to configure your web server so that

Struggling with one-to-many relation in an admin form

元气小坏坏 提交于 2019-12-11 02:06:52
问题 I do apologize if the answer to my question would be very obvious. I am new to Symfony and I wasn't able to find another question with exactly the same issue as mine at SO, thus I am posting a question. (And Google didn't help much either, but then again I am not very familiar with Symfony's terminology, so I might have worded my queries badly.) So, straight to the point. The schema.yml : user: id: email: { type: varchar, size: 255, required: true } ... # etc. partner: user_id: { type:

jQuery not recognizing Symfony JSON?

痞子三分冷 提交于 2019-12-11 01:46:23
问题 I'm trying to get my JSON data from Symfony but it doesn't seem to be working right. Below is the snippet of symfony code: $this->getResponse()->setHttpHeader('Content-Type', 'application/json; charset=utf-8'); return $this->renderPartial('listJsonResponse', array('jsonSlots' => json_encode($this->jsonQuery))); The above works fine and hits the partial. All that is in my partial is this: <?php echo $jsonSlots ?> Now according to Firebug this gets populated properly. Below is a copy of the

PHPUnit generated test skeleton path

人盡茶涼 提交于 2019-12-11 00:35:58
问题 Is it possible to tell phpunit where to put generated test skeleton file by the --skeleton-test command? Even is it possible to tell phpunit to repeat directory structure? Lest say i have file for testing in lib/model/SomeClass.php and i want phpstorm to generate unit test class and put it in test/lib/model/SomeClassTest.php without creation of all neccessary directory structure. Thanks in advance! 回答1: Example reproduced for convenience mkdir lib/model tests/lib/model echo "<?php class

Using sfFilter to update DB with Doctrine

强颜欢笑 提交于 2019-12-11 00:30:44
问题 I've created a sfFilter to update the current module where the user is at: class SessionFilter extends sfFilter { public function execute($filterChain){ if ($this->isFirstCall()){ $user = $this->getContext()->getUser()->getId(); $module = $this->getContext()->getModuleName(); Doctrine::getTable('ActiveSession')->set($user, $module); Doctrine::getTable('ActiveSession')->refresh(); } $filterChain->execute(); } } When I look up into the db I found out that the record has set the field 'module'

checked the php.ini file “extension=php_pdo_mysql.dll” enabled but still error [closed]

青春壹個敷衍的年華 提交于 2019-12-10 19:44:11
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I've checked the php.ini file the extensions are enabled: extension=php_pdf.dll extension=php_pdo.dll extension=php_pdo_firebird.dll extension=php_pdo_mssql.dll extension=php_pdo_mysql.dll but still when i try to open the page it gives the error 500 | Internal Server Error | PropelException Unable to open PDO