Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 28th, 2004, 7:55 AM   #1
Dragonfly
Newbie
 
Join Date: Oct 2004
Posts: 3
Rep Power: 0 Dragonfly is on a distinguished road
I build new Web server under Linux, using Apache 2.0.52 and PHP 5.0.2. The server, originally based on SuSE 9.1 distribution, now is almost fully recompiled from sources. And under new configuration the cookies mechanism is not working.

I use following code to test cookies functionality:

if(!isset($_SESSION['here'])
{
	session_start();
	$_SESSION['here'] = 'Dragonfly';

	print('Cookie is set');
}
else
{
	print('Cookie contains '.$_SESSION['here'])
	unset($_SESSION['here']);
}

Cookie files in the session.save_path is appeared, but I can't access them in another page!
I think, the problem in wrong configure options of Apache and PHP.
I use:

./configure --prefix=/usr/local/apache2 \
--enable-so \
--enable-cgi \
--enable-info \
--enable-rewrite \
--enable-speling \
--enable-usertrack \
--enable-deflate \
--enable-ssl \
--enable-mime-magic
for Apache and

./configure \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-mysql \
--prefix=/usr/local/apache2/php \
--with-config-file-path=/usr/local/apache2/php \
--enable-force-cgi-redirect \
--disable-cgi \
--with-zlib \
--with-bz2 \
--with-gettext \
--disable-xml
for PHP

Anybody can help me?
Dragonfly is offline   Reply With Quote
Old Oct 28th, 2004, 3:11 PM   #2
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
There are two types of ways to store user data. Sessions and cookies. They are not the same thing, they are completely different...

if(!isset($_SESSION)) {
  session_start();
  $_SESSION["here"] = "Drangonfly";
} else echo "<pre>" . var_dump($_SESSION, 1) . "</pre>";
__________________

tempest is offline   Reply With Quote
Old Oct 29th, 2004, 3:15 AM   #3
Berto
Programming Guru
 
Join Date: Aug 2004
Posts: 1,022
Rep Power: 6 Berto is on a distinguished road
Send a message via AIM to Berto Send a message via MSN to Berto
a session only lasts as long as a browser window is open, a cookie lasts until a timeout date (if one is specified)
__________________
"Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute. THAT'S relativity."

- Albert Einstein
Berto is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:11 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC