Beau
07-21-2005, 08:58 PM
I recently uploaded the latest version of my site: http://lilbro.net/ and ran into a problem with the .htaccess fuction:
php_value output_handler ob_gzhandler
The problem being that my site re-direction headers (I'm assuming) and other things won't work without that, I don't know why, but Bihira doesn't seem to allow that and it returns a 500 error.
I'm not really sure what's wrong if you could please help me.
Here is one of the errors that come up....
<i>Warning: Cannot modify header information - headers already sent by (output started at /home/lilbrone/public_html/header.php:32) in /home/lilbrone/public_html/members/login.php on line 20
Warning: Cannot modify header information - headers already sent by (output started at /home/lilbrone/public_html/header.php:32) in /home/lilbrone/public_html/members/login.php on line 21
Warning: Cannot modify header information - headers already sent by (output started at /home/lilbrone/public_html/header.php:32) in /home/lilbrone/public_html/members/login.php on line 22
Log In</i>
And here is the file: login.php
<i><?php
$location = $_SERVER['REQUEST_URI'];
if(isset($_POST['submit']))
{
$username = htmlentities($_POST['username']);
$password = md5($_POST['password']);
$varify = mysql_num_rows(mysql_query("SELECT user_id FROM users WHERE user_name = '$username' AND password = '$password'"));
if ($varify == 1) {
define('no_error', true);
}
else {
header("Location: /members/login_error.php");
}
}
if(defined('no_error'))
{
setcookie("lilbro_username", $username, time()+7776000, "/");
setcookie("lilbro_password", $password, time()+7776000, "/");
header("Location: $location");
}
?>
<form action="<?= htmlentities($_SERVER['REQUEST_URI']) ?>" method="post">
<fieldset>
<legend>
Log In
</legend>
<input type="text" class="login_box" id="username" name="username" />
<input type="password" class="login_box" id="password" name="password" />
<input type="submit" name="submit" value="Login" id="login_button" />
</fieldset>
</form></i>
Help is greatly appreciated!
php_value output_handler ob_gzhandler
The problem being that my site re-direction headers (I'm assuming) and other things won't work without that, I don't know why, but Bihira doesn't seem to allow that and it returns a 500 error.
I'm not really sure what's wrong if you could please help me.
Here is one of the errors that come up....
<i>Warning: Cannot modify header information - headers already sent by (output started at /home/lilbrone/public_html/header.php:32) in /home/lilbrone/public_html/members/login.php on line 20
Warning: Cannot modify header information - headers already sent by (output started at /home/lilbrone/public_html/header.php:32) in /home/lilbrone/public_html/members/login.php on line 21
Warning: Cannot modify header information - headers already sent by (output started at /home/lilbrone/public_html/header.php:32) in /home/lilbrone/public_html/members/login.php on line 22
Log In</i>
And here is the file: login.php
<i><?php
$location = $_SERVER['REQUEST_URI'];
if(isset($_POST['submit']))
{
$username = htmlentities($_POST['username']);
$password = md5($_POST['password']);
$varify = mysql_num_rows(mysql_query("SELECT user_id FROM users WHERE user_name = '$username' AND password = '$password'"));
if ($varify == 1) {
define('no_error', true);
}
else {
header("Location: /members/login_error.php");
}
}
if(defined('no_error'))
{
setcookie("lilbro_username", $username, time()+7776000, "/");
setcookie("lilbro_password", $password, time()+7776000, "/");
header("Location: $location");
}
?>
<form action="<?= htmlentities($_SERVER['REQUEST_URI']) ?>" method="post">
<fieldset>
<legend>
Log In
</legend>
<input type="text" class="login_box" id="username" name="username" />
<input type="password" class="login_box" id="password" name="password" />
<input type="submit" name="submit" value="Login" id="login_button" />
</fieldset>
</form></i>
Help is greatly appreciated!