Skip to content

Instantly share code, notes, and snippets.

// in action of symfony 1.x
$default = 'some_module/some_action';
$referer = $request->getReferer();
$this->redirect($referer ? $referer : $default);
$ git config --global color.ui "auto"
foreach ($pager->getResults(Doctrine::HYDRATE_ARRAY) as $r)
{
}
sfContext::getInstance()->getConfiguration()->loadHelpers('Debug','Other1','Other2');
# evitar errores deprecated en symfony 1.1 en php 5.3
dev:
.settings:
error_reporting: <?php echo ((E_ALL | E_STRICT) & ~E_DEPRECATED)."\n" ?>
#error_reporting: <?php echo (E_ALL | E_STRICT)."\n" ?>
web_debug: on
cache: off
no_script_name: off
etag: off
cuando al hacer un:
$ ./symfony propel:build-model
en sf1.1 da:
PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 71 bytes) in /home/vhosts/pucp-labs/sfn/lib/symfony/util/sfToolkit.class.php on line 191
En el php.ini de CLI poner:
@phpleo
phpleo / gist:544614
Created August 23, 2010 02:01
Asp.Net Computer Name in Web page
' http://www.codetoad.com/forum/15_25108.asp
Dim name As String = System.Net.Dns.GetHostName
@phpleo
phpleo / gist:627224
Created October 14, 2010 22:36
Obtener conexto en asp mvc
' http://stackoverflow.com/questions/223317/httpcontext-on-instances-of-controllers-are-null-in-asp-net-mvc
Dim context As HttpContextWrapper = New HttpContextWrapper(Web.HttpContext.Current)
Return CType(context, HttpContextBase)
@phpleo
phpleo / opt
Created October 30, 2010 18:48
$ sudo mkdir symfony
$ sudo chmod 777 symfony/
$ cd symfony/
$ git clone http://github.com/symfony/symfony.git sf2/
@phpleo
phpleo / Editando php.ini en Ubuntu
Created December 6, 2010 02:25
Editando php.ini en Ubuntu
$ sudo gedit /etc/php5/cgi/php.ini