[symfony-users] File Download too big for memory

2010-09-02 Thread Gareth McCumskey
Hi all, I need some assistance in creating an action that will generate a CSV file on the server and then push that file for download to the end user. I have written the code to build the csv file and that works no problem. I have found plenty of stuff online about altering the response headers,

[symfony-users] link_to_remote help. please take a look.

2010-09-02 Thread Andro Fumero
hello everyone,   my script is not able to update div content using link to remote. below is my code. please tell me if i miss something.   indexSuccess.php [     div id=mycart     ?php include_partial(companyproduct/cart) ?     /div        td     ?php foreach ($pager as $companyproduct): ?  

[symfony-users] Re: symfony rest POST

2010-09-02 Thread Shihab KB
Hi, Thank you very much for your answer. It helped me a lot... :) Now I have another doubt. The following is my routing entry. api_test: url:/rest/:param1/:param2/:param3/test.:sf_format class: sfDoctrineRoute param: { module: rest, action: testing, sf_format: json } options: {

Re: [symfony-users] link_to_remote help. please take a look.

2010-09-02 Thread Gareth McCumskey
One small thing to simplify, in your action change the line: if($request-getParameter('prodid') is_null($request-getParameter('prodid')) == false) To look like: if($request-getParameter('prodid', -1) !== -1) The second parameter if getParameter() is the default value if the parameter does not

Re: [symfony-users] link_to_remote help. please take a look.

2010-09-02 Thread Andro Fumero
thanks for the info. correct if I'm wrong with this one. In my case, indexSuccess was not being called by other ajax request. what was being called is the partial div id=mycart ?php include_partial(companyproduct/cart) ? /div from indexSuccess.php. from indexSuccess.php ajax

Re: [symfony-users] File Download too big for memory

2010-09-02 Thread Daniel Lohse
Off the top of my head, I'd say that you might want to take a look at the stream classes (or functions) in PHP. Mind you, this is just a thought, as I've never done anything like that. ;-) Cheers, Daniel Sent from my iPhone4 On Sep 2, 2010, at 9:42 AM, Gareth McCumskey gmccums...@gmail.com

AW: [symfony-users] File Download too big for memory

2010-09-02 Thread Christopher Schnell
why not store the file on the servers hd (/tmp) before delivering it? Regards, Christopher. Von: symfony-users@googlegroups.com [mailto:symfony-us...@googlegroups.com] Im Auftrag von Gareth McCumskey Gesendet: Donnerstag, 2. September 2010 09:43 An: symfony-users@googlegroups.com Betreff:

[symfony-users] Re: How to translate the layout texts?

2010-09-02 Thread Javier Garcia
Sorry, my fault. On Sep 2, 11:54 am, Javier Garcia tirengar...@gmail.com wrote:   Hi, i have added something like this below in the layout: ?php echo __('foo'); ? I have added ?php use_helper('I18N') ? in the top of the layout code, but it doesn't translate it. No problem translating the

Re: [symfony-users] Problems after adding standard_helpers: [I18N] in settings.yml

2010-09-02 Thread Gábor Fási
Add the Partial helper to the list. On Thu, Sep 2, 2010 at 12:19, Javier Garcia tirengar...@gmail.com wrote: Hi, i have added the line below in settings.yml.     standard_helpers:   [I18N] After that, when i load a page i get this message: Fatal error: Call to undefined function

Re: [symfony-users] Problems after adding standard_helpers: [I18N] in settings.yml

2010-09-02 Thread stryc...@gmail.com
On Thu, Sep 2, 2010 at 12:19 PM, Javier Garcia tirengar...@gmail.comwrote: Hi, i have added the line below in settings.yml. standard_helpers: [I18N] After that, when i load a page i get this message: Fatal error: Call to undefined function include_partial() in

Re: [symfony-users] link_to_remote help. please take a look.

2010-09-02 Thread Andro Fumero
I'm actually using symfony 1.4 version. can some one help? i'm really stuck with this problem. Any help would be appreciated. From: Andro Fumero fugitive...@yahoo.com To: symfony-users@googlegroups.com Sent: Thu, September 2, 2010 5:20:02 AM Subject: Re:

Re: [symfony-users] Problems after adding standard_helpers: [I18N] in settings.yml

2010-09-02 Thread Javier Garcia
Thanks, so maybe when i add that line I'm _overwriting_ a configuration by default... Don't you think it would be better an _adding_ way ? In that way it would not be necessary adding Partial, etc...when you add I18N. On 09/02/2010 12:20 PM, Gábor Fási wrote: Add the Partial helper to the

[symfony-users] Re: The form empty values are not translated

2010-09-02 Thread Javier Garcia
No idea? On Aug 24, 1:46 pm, Javier Garcia tirengar...@gmail.com wrote:   Hi, I have a select to change the language of my forms and i have this widget: $this-setWidget('fecha_nac', new sfWidgetFormI18nDate(array('culture' = 'es_ES',                                                      

Re: [symfony-users] File Download too big for memory

2010-09-02 Thread Gareth McCumskey
I am. The problem is that all the examples I see involve setting the headers for the response (no problem there) and then it loads the file into memory before sending it to the end user for download. On Thu, Sep 2, 2010 at 11:32 AM, Christopher Schnell christopher.schn...@mda.ch wrote: why

[symfony-users] Re: IE8 and isXmlHttpRequest

2010-09-02 Thread HAUSa
Can you make something out of this? On 1 sep, 16:14, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: Thx :) I've been using: * Symfony 1.4.9 * jQuery 1.4.2 My call in my HTML template: setTimeout(ajax('div_javascript_ajax', '/en/world');, 1); The JS function: function

[symfony-users] Re: Timers in prod

2010-09-02 Thread HAUSa
Nobody? On 1 sep, 12:11, HAUSa jeroen_heeft_behoefte_aan_r...@hotmail.com wrote: In my prod environment, the timers are empty (sfTimerManager::getTimers()) How can I turn these on in prod? -- If you want to report a vulnerability issue on symfony, please send it to security at

[symfony-users] HelloControllerTest.php PHPUnit Test Fail in the sandbox PR3 branch

2010-09-02 Thread Fangzx
I am using symfony2 sandbox PR3 branch + PHPUnit 3.5.0RC2 in Windows XP. cd symfony-sandbox phpunit -c hello PHPUnit 3.5.0RC2 by Sebastian Bergmann. E Time: 2 seconds, Memory: 3.50Mb There was 1 error: 1) Application\HelloBundle\Tests\Controller \HelloControllerTest::testIndex

[symfony-users] autocomplete does not work when loaded in response to an ajax call

2010-09-02 Thread dagger
Hi, I am trying to implement input_auto_complete_tag - its a copy of http://www.symfony-project.org/book/1_0/11-Ajax-Integration#chapter_11_sub_autocompletion when i load the page normally - like a normal get request - no ajax involved - the auto complete field works but when i load the same

[symfony-users] Re: Doctrine + 2 different distinct queries affecting each others' results (bug?)

2010-09-02 Thread Johannes
These problems usually occur when you are loading partial relations from the database, and later on assume that the relation was loaded completely (Doctrine has no way to tell whether an object's relation was loaded partially or completely). Try refreshRelated() to re-load the specific relation

[symfony-users] Re: autocomplete does not work when loaded in response to an ajax call

2010-09-02 Thread rob
By default, content loaded via Ajax calls does not execute scripts. Try adding the parameter 'script' = true to the list of arguments of link_to_remote. -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message

[symfony-users] [Symfony2] session_start() error in Functional tests

2010-09-02 Thread Florian
Hi! I'm encoutering an error since an upgrade to the latest Symfony2. 1) Application\ECommerceBundle\Tests\Controller \ECommerceControllerTest::testIndex A session had already been started - ignoring session_start() /var/www/Symfony2-e-commerce/src/vendor/symfony/src/Symfony/Component/

Re: [symfony-users] HelloControllerTest.php PHPUnit Test Fail in the sandbox PR3 branch

2010-09-02 Thread Fabien Potencier
That works for me. Looks like you don't use PHP 5.3. -- Fabien Potencier Sensio CEO - symfony lead developer sensiolabs.com | symfony-project.org | fabien.potencier.org Tél: +33 1 40 99 80 80 On 9/2/10 3:20 PM, Fangzx wrote: I am using symfony2 sandbox PR3 branch + PHPUnit 3.5.0RC2 in Windows

[symfony-users] Re: mobile site strategy

2010-09-02 Thread Dennis
Rather than go the plugin route, why not use either a '.mobi' tld, or '.movi' subdomain, and symlinnk any directories that you need between the two projects? On Sep 1, 4:57 am, Benoit Montuelle benoit.montue...@gmail.com wrote: I've done it by adding specific layout, templates and stylesheet

[symfony-users] Re: Doctrine + 2 different distinct queries affecting each others' results (bug?)

2010-09-02 Thread John Kary
I also ran into this issue recently, exactly how you describe. I didn't find a real solution to it, and instead isolated each query and corresponding view into its own component. On Sep 2, 12:14 am, Guill Lo guill.b...@gmail.com wrote: Hi there! Still haven't found the solution, I'm skipping

[symfony-users] dbFusionChartPlugin

2010-09-02 Thread scott
I was unable to install this plugin at the command line and instead had to download and setup the package manually. Has anyone been able to set this plugin up successfully? The first fix required a change in the FusionHelper changing use_helper(Javascript); to use_helper(JavascriptBase); however

[symfony-users] Re: IE8 and isXmlHttpRequest

2010-09-02 Thread HAUSa
Damn... it indeed was a cache problem. God I hate IE Thank you! On 2 sep, 15:18, Gustavo Adrian comfortablynum...@gmail.com wrote: Could you post the code of the action that receives the AJAX request? and the headers that is receiving from IE. Also, try to embed a variable with a random

[symfony-users] Http load problem with concurrent users.

2010-09-02 Thread Ivo Az.
Hi. I am using a tool called Siege (http://www.joedog.org/index/siege- home) to test the http load with 50 concurrent users, and the results are bad: HTTP/1.1 200 0.64 secs:4923 bytes == /en HTTP/1.1 200 1.33 secs:4925 bytes == /en HTTP/1.1 200 1.38 secs:4922 bytes == /en

Re: [symfony-users] [Symfony2] session_start() error in Functional tests

2010-09-02 Thread Fabien Potencier
Can you send me your test file? -- Fabien Potencier Sensio CEO - symfony lead developer sensiolabs.com | symfony-project.org | fabien.potencier.org Tél: +33 1 40 99 80 80 On 9/2/10 4:57 PM, Florian wrote: Hi! I'm encoutering an error since an upgrade to the latest Symfony2. 1)

[symfony-users] Re: Http load problem with concurrent users.

2010-09-02 Thread pghoratiu
What's the CPU usage on that machine? In my experience 50-100 concurrent requests is quite large for dynamic pages and you need good hardware to handle that. Or you should look into using cache heavily, reverse proxy caching, avoiding the ORM layer entirely (by using memcache) ... I think that

[symfony-users] Re: autocomplete does not work when loaded in response to an ajax call

2010-09-02 Thread dagger
thanks alot rob... all functional! On Sep 2, 7:40 pm, rob rgonzalezra...@gmail.com wrote: By default, content loaded via Ajax calls does not execute scripts. Try adding the parameter 'script' = true to the list of arguments of link_to_remote. -- If you want to report a vulnerability issue on

Re: [symfony-users] [Symfony2] session_start() error in Functional tests

2010-09-02 Thread Florian Klein
Bien sur, voici un lien du fichier sur github: http://github.com/docteurklein/Symfony2-e-commerce/blob/master/src/Application/ECommerceBundle/Tests/Controller/ECommerceControllerTest.php Ca sera peut etre plus simple a visualiser. Sinon, je l 'ai mis en pièce jointe.

[symfony-users] Re: Http load problem with concurrent users.

2010-09-02 Thread Ivo Az.
My local machine CPU usage goes up to max, don't know about hosting's CPU usage, but the response times on there are the same. Luckily for this project the frontend changes only when something is changed from the backend, so I will work on the caching now. However, my next project will be a

[symfony-users] Re: Http load problem with concurrent users.

2010-09-02 Thread pghoratiu
Regarding cache one thing that you have to worry about is cache invalidation (which can grow into a really complex and ugly issue). Even if you don't use caching there are many strategies available, one that I recommend warmly is to avoid the ORM layer entirely by using memcache as intermediary

[symfony-users] overriding model-createQuery causes The default context does not exist. on doctrine:data-dump

2010-09-02 Thread Jochen Daum
Hi, in an application I'm building here we use a person table for staff, 3rd parties as well as patients. Because of the sensitivity of the data, I thought it makes sense to control the access rights to this table at model level, so I wrote this: class PersonTable extends Doctrine_Table {

Re: [symfony-users] File Download too big for memory

2010-09-02 Thread Jochen Daum
Hi, if you create the file yourself, you just need to start browser output while you are working on the file and clear the memory of any lines you have produced. I had the same problem, using an array to store all CSV lines, so I count how many lines I have and if it goes over a limit, I print

[symfony-users] Inheritance issue...

2010-09-02 Thread Sebastien Armand [Pink]
Hello everyone, I have a few classes of my model on top of which I wanted to add search capabilities through their 'Table' classes. After realizing that many functions I'm gonna create here will be similar from one Table class to the other I wanted to refactor all of this in one common place. So

[symfony-users] Re: motion : new mailling list for Synfony2

2010-09-02 Thread Tom Ptacnik
Agree On 1 zář, 16:23, sam zoulil...@gmail.com wrote: Hello, I follow this mailling list for a while, and I see more and more subject on Synfony2. I think that can be a good idea to split this one in 2 : synfony1 and synfony2 or at least allways use a tag like [sf2] in the subject. I am

Re: [symfony-users] Re: Inheritance issue...

2010-09-02 Thread Sebastien Armand [Pink]
Hmmm, yeah! Hadn't thought about behaviors, but they'd do the job perfectly I guess! Thanks On Fri, Sep 3, 2010 at 1:25 PM, Raphael Schumacher m...@raphaelschumacher.ch wrote: You may check out whether the behavior features in Doctrine may serve you for your need: - use the Searchable