tags:

views:

30

answers:

2

Hello,

Here is an example. Is it possible to save the output buffer. I would like to cache what its going to output.

header('Content-type: text/css');
ob_start("compress");


function compress($buffer) {
    $buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer);
    $buffer = str_replace(array("\r\n", "\r", "\n", "\t", '  ', '    ', '    '), '', $buffer);
    return $buffer;
}


include('layout.css');
include('pages.css');
include('form.css');
include('global.css');

ob_end_flush();
A: 

Did you try looking through the error logs? Depending on the server you can find this information out in the vhost file where it is stored. This should be your first line of action is look through the Apache error logs, as they should show up any errors.

For instance, I set mine to (on Ubuntu) /var/log/apache2/sitename.error.log

Brad F Jacobs
A: 

I think you might be thinking of something like in this comment on the set_error_handler documentation page:

However, I would second premiso's comment about using error logs instead. Overriding error_handling is unintuitive and usually leads to more complication than usefulness in my experience.

See:

Both are PHP_INI_ALL, so they can be set in script using ini_set(), or in .htaccess, as well as global configuration locations.

Brent C