Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy is Mage_Persistent breaking /api/wsdl?soap
    primarykey
    data
    text
    <p>I get the following error within Magento CE 1.6.1.0</p> <p><code>Warning: session_start() [&lt;a href='function.session-start'&gt;function.session-start&lt;/a&gt;]: Cannot send session cookie - headers already sent by (output started at /home/dev/env/var/www/user/dev/wdcastaging/lib/Zend/Controller/Response/Abstract.php:586) in /home/dev/env/var/www/user/dev/wdcastaging/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php on line 119</code></p> <p>when accessing <code>/api/soap/?wsdl</code></p> <p>Apparently, a <code>session_start()</code> is being attempted after the entire contents of the WSDL file have already been output, resulting in the error.</p> <p>Why is magento attempting to start a session after outputting all the datums? I'm glad you asked. So it looks like <code>controller_front_send_response_after</code> is being hooked by Mage_Persistent in order to call <code>synchronizePersistentInfo()</code>, which in turn ends up getting that <code>session_start()</code> to fire.</p> <p>The interesting thing is that this wasn't <em>always</em> happening, initially the WSDL loaded just fine for me, initially I racked my brains to try and see what customization may have been made to our install to cause this, but the tracing I've done seems to indicate that this is all happening entirely inside of core.</p> <p>We have also experienced a tiny bit of (completely unrelated) strangeness with Mage_Persistent which makes me a little more willing to throw my hands up at this point and SO it.</p> <p>I've done a bit of searching on SO and have found some questions related to the whole "headers already sent" thing in general, but not this specific case.</p> <p>Any thoughts?</p> <p>Oh, and the temporary workaround I have in place is simply disabling Mage_Persistent via the <code>persistent/options/enable</code> config data. I also did a little bit of digging as to whether it might be possible to observe an event in order to disable this module <em>only</em> for the WSDL controller (since that seems to be the only one having problems), but it looks like that module relies exclusively on this config flag to determine it's enabled status.</p> <p>UPDATE: Bug has been reported: <a href="http://www.magentocommerce.com/bug-tracking/issue?issue=13370" rel="nofollow">http://www.magentocommerce.com/bug-tracking/issue?issue=13370</a></p>
    singulars
    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.
 

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