Note that there are some explanatory texts on larger screens.

plurals
  1. POSymfony2, jQuery Ajax request, web debug toolbar, 500 Internal Server Error
    primarykey
    data
    text
    <p>I am developing an application with Symfony2 platform that, at one moment, makes a simple AJAX request on document ready.</p> <pre><code>jQuery.ajax({ url: 'test.php', type: 'POST', data: { 'test': 'test' }, success: function( response ){ jQuery( 'div#container' ).html( response ); } }); </code></pre> <p>The problem is that on app_dev.php, where the debug toolbar is loaded, an 500 error is throwed. More precisely, the AJAX response from the 'test.php' file is received and loaded in the div container, but then, when it tries to load the toolbar, I receive an alert message:</p> <blockquote> <p>"An error occured while loading the web debug toolbar (500: Internal Server Error). Do you want to open the profiler?"</p> </blockquote> <p>If I open profiler, I don't see anything wrong.</p> <p>If I open the xhr request for the toolbar, a FastCGI 500 error is displayed:</p> <blockquote> <p>Module FastCgiModule</p> <p>Notification ExecuteRequestHandler</p> <p>Handler PHP54_via_FastCGI</p> <p>Error Code 0x000000ff</p> </blockquote> <p>If I don't try to make the AJAX request, the toolbar is loaded with no problem.</p> <p>If I make the request by hand (event on a button) after the toolbar is loaded, again, no problem. If I make the request by hand (event on a button) before the toolbar is loaded the error is throwed.</p> <p>Notes:</p> <ol> <li><p>This error occur only on the local machine (with ISS 7.5, PHP 5.4.14). On the production server (IIS server 8.0, same and PHP) the AJAX request is made, and the toolbar is loaded with no problems. I have replaced the php.ini on the local machine with the php.ini from the production server - same problem.</p></li> <li><p>Initialy AJAX request was loading the result of a simple bundle controller method, but then I have tried with a simple PHP file 'test.php', same problem.</p></li> <li><p>I have tried with post and get methods to make the request.</p></li> </ol> <p>Does anyone have any ideea what goes wrong?</p> <p>This is not a serious problem since I have multiple options the develop this app, but is bugging me, and I already lost a enough time with this.</p> <p>PS: if it make any difference, on same machine I have developed an application - no framework - that makes, multiple simultaneos ajax requests.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload