• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cannot modify header information error in CI with Smarty

#1
[eluser]Myles Wakeham[/eluser]
I'm implementing NuSOAP in a CI app that also uses Smarty. I can call the WSDL without any problem and get the XML data sent from it fine if I call a PHP file directly from the root directory of the application.

But when I attempt to do this through a /index.php/..... structure, and have my NuSOAP calls through the CI controllers, I get the following error:

Severity: Warning

Message: Cannot modify header information - headers already sent by (output started at /var/www/cyberears.com/htdocs/ci_content/application/libraries/MySmarty.php:39)

Filename: libraries/nusoap.php

Line Number: 3281

There is no Smarty template being sent to the browser at all for this - just XML for the WSDL.

Is there a simple way to ensure that the output from CI doesn't go through the Smarty engine even if Smarty is installed as a library?

Myles

#2
[eluser]Michael Wales[/eluser]
If I remember correctly there is a whitespace at the end of the Smarty library...

That's the issue though, whether it's in the Smarty library or not, you have a whitespace somewhere that needs to be taken care of.

#3
[eluser]Myles Wakeham[/eluser]
Bingo! You were right. I found the problem in one of the libraries, and removed the whitespace. Now all works as it should.

Thanks again.

Myles


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.