![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Oct 2004
Posts: 3
Rep Power: 0
![]() |
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? |
|
|
|
|
|
#2 |
|
Programming Guru
![]() |
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>";
__________________
|
|
|
|
|
|
#3 |
|
Programming Guru
![]() |
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 |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|