I'm unable to get sessions to work properly with the combination
Apache 2.0.49 / PHP 4.3.6 / Windows XP.
The data is written to the correct place (according to php.ini), but
they are not read in again on the next page.
The following script illustrates the problem:
<?
session_start();
if (!isset($_SESSION['count'])) {
$_SESSION['count'] = 0;
}
else {
$_SESSION['count']++;
}
echo $_SESSION['count'];
?>
Each time the page is reloaded, the output should increment by one, i.e. it
should be: 0,1,2,..., and it indeed works this way on my laptop with
Apache 1.3.29 / PHP 4.3.6 / Windows XP, but, alas, not with the newest
Apache2...
Any suggestions??
Arne 3 1997
I use Apache 2.0.49 and PHP 4.3.6 with Windows XP without any problem with
sessions. Have you checked your php.ini file to make sure the setting for
session.save_path is correct?
--
Tony Marston http://www.tonymarston.net
"Arne Morken" <ar*********@mindmatters.no> wrote in message
news:40******@news.broadpark.no... I'm unable to get sessions to work properly with the combination Apache 2.0.49 / PHP 4.3.6 / Windows XP. The data is written to the correct place (according to php.ini), but they are not read in again on the next page. The following script illustrates the problem:
<? session_start(); if (!isset($_SESSION['count'])) { $_SESSION['count'] = 0; } else { $_SESSION['count']++; } echo $_SESSION['count']; ?>
Each time the page is reloaded, the output should increment by one, i.e.
it should be: 0,1,2,..., and it indeed works this way on my laptop with Apache 1.3.29 / PHP 4.3.6 / Windows XP, but, alas, not with the newest Apache2...
Any suggestions??
Arne
Yes, this was the first thing I checked.
The setup on my pc and my laptop are more or less identical, except for the
Apache version. php.ini is the same, cookie settings are the same.
Do the script I included work on your system?
Arne www.mindmatters.no
"Tony Marston" wrote: I use Apache 2.0.49 and PHP 4.3.6 with Windows XP without any problem with sessions. Have you checked your php.ini file to make sure the setting for session.save_path is correct?
-- Tony Marston
http://www.tonymarston.net
"Arne Morken" <ar*********@mindmatters.no> wrote in message news:40******@news.broadpark.no... I'm unable to get sessions to work properly with the combination Apache 2.0.49 / PHP 4.3.6 / Windows XP. The data is written to the correct place (according to php.ini), but they are not read in again on the next page. The following script illustrates the problem:
<? session_start(); if (!isset($_SESSION['count'])) { $_SESSION['count'] = 0; } else { $_SESSION['count']++; } echo $_SESSION['count']; ?>
Each time the page is reloaded, the output should increment by one, i.e. it should be: 0,1,2,..., and it indeed works this way on my laptop with Apache 1.3.29 / PHP 4.3.6 / Windows XP, but, alas, not with the newest Apache2...
Any suggestions??
Arne
"Arne Morken" <ar*********@mindmatters.no> wrote in message news:<40******@news.broadpark.no>... I'm unable to get sessions to work properly with the combination Apache 2.0.49 / PHP 4.3.6 / Windows XP. The data is written to the correct place (according to php.ini), but they are not read in again on the next page. The following script illustrates the problem:
<? session_start(); if (!isset($_SESSION['count'])) { $_SESSION['count'] = 0; } else { $_SESSION['count']++; } echo $_SESSION['count']; ?>
Do you say, all sessions are not working in Apache 2? Also, try by
adding the following two lines in the beginning of your script.
error_reporting(E_ALL);
ini_set('display_errors', 1);
--
| Just another PHP saint |
Email: rrjanbiah-at-Y!com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: ZoombyWoof |
last post by:
Hi. Im very new to php, and I have a problem here that I cant find the
solution for. I have problems with session variables, I want some
variables to maintain their value between different php...
|
by: mrbog |
last post by:
Tell me if my assertion is wrong here:
The only way to prevent session hijacking is to NEVER store
authentication information (such as name/password) in the session.
Well, to never authenticate...
|
by: Maverick |
last post by:
Hello all,
I read some good reviews about jakarta HTTPClient about its session
and cookies management system and fancied giving it a try as a
learning exercise but somehow I don't seem to be able...
|
by: Notgiven |
last post by:
I am considering a large project and they currently use LDAP on MS platform.
It would be moved to a LAMP platform. OpenLDAP is an option though I have
not used it before. I do feel fairly...
|
by: a |
last post by:
I already posted on this subject, but I have some more information that
should make the issue clearer.
Config: Apache 2.x, PHP 5.1.x, Windows XP Pro
A php script processes a form. Inside this...
|
by: manonoc |
last post by:
Hi everyone,
This appears only under IE, under Firefox there is no problems:
the session is lost, when i use the DNS name in the url (if i use the
ip adress, or the server name, there is no...
|
by: rgparkins |
last post by:
Hello
I am running out of time with a problem I have running PHP 5.04 and
Apache 2.0 and really need help :(. I have a page that stores a
variable in session but each time I reload that page the...
|
by: ddolgoff |
last post by:
Hello to everyone,
I have a problem of managing a session with cookies and
"session_set_save_handler()". I want to use php's built-in session
management mechanism with user-level session storage...
|
by: sugapablo |
last post by:
I have a server where two different users are each running a different
web application. I installed SugarCRM for one, and Info@Hand (built
from SugarCRM) for the other. Both are trying to save...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |