473,386 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Session data problem under Apache 2.0.49

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
Jul 17 '05 #1
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

Jul 17 '05 #2
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

Jul 17 '05 #3
"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
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
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...
27
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...
0
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...
6
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...
9
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...
3
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...
4
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...
4
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...
2
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...
0
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,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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$) { } ...
0
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...
0
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
0
BarryA
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...
1
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...
0
marktang
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,...
0
Oralloy
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.