2
We picked up today a system developed by Phpnuke. When analyzing, we saw that the version is old, but the client is irreducible in developing a new site, so we have to work on that existing one. The problem is that the server is giving the error HTTP ERROR 500. We open the log and the error that appears is:
ob_start(): Second array Member is not a Valid method
The code block is that way:
if (strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) {
if (extension_loaded('zlib')) {
$do_gzip_compress = true;
ob_start(array('ob_gzhandler',5)); // Essa é a linha
ob_implicit_flush(0);
// if (ereg("MSIE", $_SERVER['HTTP_USER_AGENT'])) {
if (preg_match("/MSIE/", $_SERVER['HTTP_USER_AGENT'])) {
header('Content-Encoding: gzip');
}
}
}
The PHP version is PHP Version 5.6.40. How can I fix this? Note that there is also a commented conditional, because this was the first error that appeared and made the adjustment.
Have you checked the documentation of this function? What would be the second parameter?
– Woss
Hi Anderson. Yes, he seems to activate the output buffer, but I don’t know how to adjust it inside Phpnuke, because I never worked with Phpnuke.
– user24136
muted by

ini_set('zlib.output_compression_level', 5);
ob_start('ob_gzhandler');

– Adir Kuhn
Hi Adir. Now you’ve made that mistake:
ob_start(): output handler 'ob_gzhandler' conflicts with 'zlib output compression' in /home/user/public_html/mainfile.php on line 83
– user24136