Im having real problens trying to turn output_buffering on . The hosting company will not turn it on in the php.ini file so they gave me a .htaccess file but it still dosent work.
see i need it on beacuse i have a login scipt that checks the database if the username and password is correct and admin = true then its sets a session and redirects to a particalar page. if it = something else it sets a different session and redirects to another page else it redirects to a faild page.
here is a simple test that i have done that does not work.
<html>
<?php
ob_start();
/ This will give an error. Note the output
above, which is before the header() call */
header('Location: http://www.mywebsite.com/');
//ini_set("output_buffering","on");
//if (ini_get("output_buffering")!="on") generror("You must enable output buffering to allow redirection");
//function generror($msg) {
//writes error message on current page and stops script from continuing
//echo $msg;
//exit;
//}
ob_end_flush();
?>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
ok
</body>
</html>
and here is my .htaccess file.
php_value register_globals 1
PHP_FLAG output_buffering 1
but nothing works.
please help.
cheers aron.