hey people.
this is my 1st time to get this error.
i usually save cookies using this code:

$time = time()+60*60*6;
// the time is saved for 6 hours
// then save the cookie with the $id data
setcookie("ln", $id, $time);

but with my new website. nothing is happening!!!
i am using a .htaccess, so can it be the reason??
this is the .htaccess data:

# Awah Dot Biz ---  htaccess file
# Made to control my site
# Made in 06/04/2011 at 00:57 am
# by Awah 
# Email : awah@awah.biz
# site : http://www.awah.biz
# the coder and designer of awah Dot Biz
<Files "htaccess_dist">
    order allow,deny
    deny from all

# Don't listing directory
Options -Indexes

# Follow symbolic links
Options +FollowSymLinks

# Default handler
DirectoryIndex index.php

# Turn on expiry
<IfModule mod_expires.c>
	ExpiresActive On
	ExpiresDefault "access plus 10 years"

# php 5, apache 1 and 2
<IfModule mod_php5.c>
	# default memory limit to 64Mb
	php_value memory_limit 64M
	# to make sure register global is off
	php_value register_globals 0
	# max post size to 8Mb
	php_value post_max_size 8388608
	# upload size limit to 5Mb	
	php_value upload_max_filesize 102428800

# Turn on mod_gzip if available
<IfModule mod_gzip.c>
	mod_gzip_on yes
    mod_gzip_dechunk yes
    mod_gzip_keep_workfiles No
    mod_gzip_minimum_file_size 1000
    mod_gzip_maximum_file_size 1000000
    mod_gzip_maximum_inmem_size 1000000
    mod_gzip_item_include mime ^text/.* 
    mod_gzip_item_include mime ^application/javascript$
    mod_gzip_item_include mime ^application/x-javascript$
    # Exclude old browsers and images since IE has trouble with this
    mod_gzip_item_exclude reqheader "User-Agent: .*Mozilla/4\..*\["
    mod_gzip_item_exclude mime ^image/.*
## Apache2 deflate support if available
<IfModule mod_deflate.c>
	AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript
	BrowserMatch ^Mozilla/4 gzip-only-text/html
	BrowserMatch ^Mozilla/4\.[0678] no-gzip
	BrowserMatch \bMSIE !no-gzip

<IfModule mod_headers.c>	
	Header append Vary User-Agent env=!dont-vary
	# The following is to disable compression for actions. The reason being is that these
	# may offer direct downloads which (since the initial request comes in as text/html and headers
	# get changed in the script) get double compressed and become unusable when downloaded by IE.
	SetEnvIfNoCase Request_URI action\/* no-gzip dont-vary
	SetEnvIfNoCase Request_URI actions\/* no-gzip dont-vary

# Configure ETags
<FilesMatch "\.(jpg|jpeg|gif|png|mp3|flv|mov|avi|3pg|html|htm|swf)$">
	FileETag MTime Size

please people. i reviewed my code more than once and nothing is wrong. this is my login script:

echo '<script type="text/javascript">window.location = "../home.php";</script>';
echo '
<script type="text/javascript"> alert("please fill the form");
//here the login code
$email = $_POST['email'];
$password = $_POST['password'];
$password = md5($password);
include_once "../engine/db/main.php";
$db = new db();
$email = mysql_real_escape_string($email);
$q = mysql_query("SELECT * FROM `all` WHERE email = '$email' AND password = '$password'");
echo 'Sorry, an Error has occured while we are trying to log you in. The Adiministrations System is being notified with this error and we are already trying to fix the error. Please Try again Laiter';
            echo mysql_error();
			$message =  "ERROR HAS OCCURED WHILE THE USER \" ".$email." \" was trying to login with the password \" ".$password." \" in the following link: http://awah.biz/login/login.php witht the ollowing error:".mysql_error()." ";
			$title = "Login Error";
			mail("errors@awah.biz", $title, $message, $headers);
if(mysql_num_rows($q) == 0)
echo "Sorry, we couldnt found your Email or Password in our databases. please try again";
else if(mysql_num_rows($q) >= 1)
while($row = mysql_fetch_array($q))
$id = $row['id'];
$time = time()+60*60*6;
setcookie("ln", $id, $time);
echo '
<script type="text/javascript">window.location = "../home.php"; </script>';

my erroro_reporting is set to -1 so i have to see all the errors and i disabled the redirect function to see if there is any error but i didnt see any error.\

i used another script to see if the cookies are set . the script is :

echo $_COOKIE['logedin'];
echo "<BR>\$_COOKIE['logedin'] is not set";
// the ln cookie
echo "<BR?\$_COOKIE['ln'] is set<BR>";
echo $_COOKIE['ln'];
echo "<BR>\$_COOKIE['ln'] is not set";

this thing is killing me!
please tell me what to correct.

note: my database connection is correct and all the database variables are set and working fine. i tested the id that is grabbed from the db and it was fine!

6 Years
Discussion Span
Last Post by diafol

i made it1!!!!!1
it is working perfectly now!!!
it is because the cookies permissions were blocked by the .htaccess i guess
so i just changes the directory and i meoved everything to the main drectory so that the cookie become available for the whole site!
thanks anyway


> no 1 knows the answer?

You bump after only 2 hours. That's a sure fire way of not getting an answer. Glad you solved it yourself.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.