symfony1

Passing PHP arguments into NetBeans into a page that features symfony url-routing

我怕爱的太早我们不能终老 提交于 2019-12-04 11:49:35
I am doing the Jobeet tutorial that features url routing. The url routing (I think that's the proper term) makes urls look like this http://localhost:8080/frontend_dev.php/job/extreme-sensio/paris-france/2/web-designer I would like to debug into this page however I cannot properly pass arguments into NetBeans. I set the arguments in NetBeans "Run Configuration" area to this job/extreme-sensio/paris-france/2/web-designer however the url that is executed is this (notice the ? that NetBeans automatically appends to index file) http://localhost:8080/frontend_dev.php?job/extreme-sensio/paris-france

Overriding Doctrine_Record (sfDoctrineRecord) instance methods in Doctrine PHP Symfony

点点圈 提交于 2019-12-04 10:53:23
问题 My background is in Propel, so I was hoping it would be a simple thing to override a magical getter in a Doctrine_Record (sfDoctrineRecord), but I'm getting either a Segfault or the override method is simply ignored in favor of the one in the superclass. https://gist.github.com/697008eaf4d7b606286a class FaqCategory extends BaseFaqCategory { public function __toString() { return $this->getCategory(); } // doesn't work // override getDisplayName to fall back to category name if getDisplayName

Rename “web” folder in Symfony 1.4

╄→гoц情女王★ 提交于 2019-12-04 10:06:26
I want to rename the "web" folder to "html" in symfony 1.4, unfortunately searching for documentation on this has lead me nowhere except for how this would be accomplished in 1.0, which does not seem to be working. Firstly, you don't have to rename it. You can just create a symbolic link (unless you're running windows): ln -s web html If you still want to change the web folder name than you could do it in your project's ProjectConfiguration class by overloading setRootDir(): class ProjectConfiguration extends sfProjectConfiguration { public function setRootDir($rootDir) { parent::setRootDir(

In remote host: Connection could not be established with host smtp.gmail.com [Connection timed out #110]

那年仲夏 提交于 2019-12-04 09:54:12
after deploying I gettin this error below when i try to send an mail: 500 | Internal Server Error | Swift_TransportException Connection could not be established with host smtp.gmail.com [Connection timed out #110] stack trace * at () in SF_ROOT_DIR/lib/vendor/symfony/lib/vendor/swiftmailer/classes/Swift/Transport/StreamBuffer.php line 235 ... 232. } 233. if (!$this->_stream = fsockopen($host, $this->_params['port'], $errno, $errstr, $timeout)) 234. { 235. throw new Swift_TransportException( 236. 'Connection could not be established with host ' . $this->_params['host'] . 237. ' [' . $errstr . '

Which one to go; Yii or Symfony

↘锁芯ラ 提交于 2019-12-04 09:01:24
问题 Okay. I'm NOT asking which one is better. I know Yii is not better than Symfony, Symfony is not better then Yii. I'm asking which one should i go with it. I want to give some points: I have a large project which is very-well formatted and very-well coded. If you seen my codes you would think that i made my own framework but its not. It just that very-well coded. I'm using custom made Controllers for HTTP requests. All i want to do is make my code much more easier to use and much more easier

Doctrine fixtures - circular references

我与影子孤独终老i 提交于 2019-12-04 08:55:43
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: nicole@example.com username: nicole password: nicole Groups: [Group_abc] Team: [Nicole_Team] As you can see, Nicole_Team references Nicole... but Nicole also references Nicole_Team. When Manager wasn't a required column this was OK (the fixture loaded, but Manager was NULL), but now it's required it's impossible to load

Detect language and redirect to subdomain on Symfony

纵然是瞬间 提交于 2019-12-04 08:41:47
I'm using Symfony 1.2.7. My web is in several languages, each of one is in a subdomain like en.example.com, es.example.com. If the user enters into example.com, I want to redirect him to his language. I also want to have support staging.example.com and redirect to es.staging.example.com and en.staging.example.com so I can test everything before the deployment. I have the following code that works both on index.php and frontend_dev.php. My question is, can you improve it? is there a better or cleaner way? Thanks! require_once(dirname(__FILE__).'/../config/ProjectConfiguration.class.php');

Aptana 3.0.4 and PHP Debugging

a 夏天 提交于 2019-12-04 08:10:24
问题 I have tried to debug PHP code in Aptana 3.0.4, however without success. First, it is possible? Second, what are the specific configurations? P.S.: I am using Symfony 1.4 and I want to debug the PHP code. 回答1: It's not possible yet on a plain vanilla version of Aptana Studio 3, but it will be possible soon (I hope). If you want to debug PHP, and only have the Aptana's editors support, you will need to install PDT on top of it and use its debugger capabilities for now. However, keep in mind

Custom route class

喜夏-厌秋 提交于 2019-12-04 07:27:45
In symfony 1.4 you could define a custom route class, where you override the generation of url with custom logic, for example: custom: class: sfDoctrineRouteCollection options: model: Custom prefix_path: /custom/category/:category_id column: id route_class: CustomDoctrineRoute class CustomDoctrineRoute extends sfDoctrineRoute { public function generate($params, $context = array(), $absolute = false) { if (!isset($params['category_id'])) { $params['category_id'] = sfContext::getInstance()->getRequest()->getParameter('category_id'); } return parent::generate($params, $context, $absolute); } }

Symfony framework - load Cyrillic data into database from fixtures

左心房为你撑大大i 提交于 2019-12-04 06:43:48
问题 How can I load data into database from fixture files with Cyrillic data? I've tried, but data in database is converted to ??? symbols. My fixture file is saved in UTF-8 encoding. 回答1: Are you using MySQL? You may need to change the collation and/or character sets for the tables in your database. A whole section exists in the MySQL Manual on this topic which I recommend if your project scope for internationalisation is wide, but essentially applying this SQL to each table will help you: ALTER