473,480 Members | 3,135 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

session id passed but not session contents

Hi all,

I'm having a problem with sessions with my shopping cart. It works fine
in my local server at home and office but after uploading the code in
the remote server, the cart contents (session) are no passed to the
cart from products page. At home and office, i am using xampp. The
remote server is using Linux and probably apache.

in my cart.php file, i did this: <?php echo "ID = " . session_id() .
"<br />"; ?to check if the session id is passed and it shows up but
when I do print_r($_SESSION['cart']['cart_contents']), it contains
nothing. I repeat this same code is working fine at home and office
under xampp. So i am thinking it is something to do with the remote
server. Is there anything i could do in php.ini in the remote server to
get this work? I think there is nothing wrong with my code as it works
under xampp.

Please help!

Ben

Dec 20 '06 #1
2 2037

crescent...@yahoo.com schrieb:
Hi all,

I'm having a problem with sessions with my shopping cart. It works fine
in my local server at home and office but after uploading the code in
the remote server, the cart contents (session) are no passed to the
cart from products page. At home and office, i am using xampp. The
remote server is using Linux and probably apache.

in my cart.php file, i did this: <?php echo "ID = " . session_id() .
"<br />"; ?to check if the session id is passed and it shows up but
when I do print_r($_SESSION['cart']['cart_contents']), it contains
nothing. I repeat this same code is working fine at home and office
under xampp. So i am thinking it is something to do with the remote
server. Is there anything i could do in php.ini in the remote server to
get this work? I think there is nothing wrong with my code as it works
under xampp.
Hm, unlikely. My code always worked fine on XAMPP and production
servers.
I really wonder, that your production system doesn't come with session
support
pre-configured

I feel, that there is something in your code, which is related to your
xampp dev-environments.

Could you post a bit more code? How do you open the session and such?

Dec 20 '06 #2
C.

cr*********@yahoo.com wrote:
Hi all,

I'm having a problem with sessions with my shopping cart. It works fine
in my local server at home and office but after uploading the code in
the remote server, the cart contents (session) are no passed to the
cart from products page. At home and office, i am using xampp. The
remote server is using Linux and probably apache.
If the session ID is propogating correctly, the most likely cause is
the session handler isn't able to do its job (e.g. no permissions on
directory).

Presumably you've got a DBMS available - drop in a DB based session
handler and see what happens - there's plenty available off-the-shelf.

C.

Dec 20 '06 #3

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

Similar topics

9
2972
by: Xizor | last post by:
Let's say I run a server. I have two people using the server. Bill and Joe. Bill is at address.com/bill and Joe is at address.com/joe. Let's say Joe and Bill are both using PHP with sessions on...
2
3250
by: Jason Telisch | last post by:
I read and reread the PHP manual about sessions, and I have a quick question. What causes the session id to change? I tried destroying the session and unsetting the session vars, but it maintains...
1
1435
by: mr_burns | last post by:
Hi, Is there a session ID that exists when you start a session on a PHP page? I have noticed that it sometimes is passed in the URL. How do I get this session ID even if it doesnt exist in the...
3
5277
by: David | last post by:
Hi, I write asp.net via c#. How should I know the client's session alive? 1. if ( Session.Equals ( null ) ) 2. if ( Convert.IsDBNull(Session) ) 3. if ( Session.Contents.Count == 0 ) Thanks...
13
1879
by: dee | last post by:
Hi My code complies the following line: Session("passed") = 1 but puts wiggly error line under the second Session("passed") in the following expression: Session("passed") = Session("passed") +...
5
8218
by: jb | last post by:
*Please* help --- I'm tearing my hair out. I want to use sessionstate in a webservice, accessed from a client, written in script (JScript, InfoPath). I have written my webservice (C# .NET). I...
5
10479
by: GeRmIc | last post by:
Hi, I have an ASPX application from which I need to pass session variables (ex:username and password) to an ASP Page. How do I do this? Could you pls give a n example code for both aspx and asp....
6
1579
by: mosscliffe | last post by:
I am testing for how/when a page is posted back and I decided to use a ViewState variable in PageLoad to set up a counter, but it appears, the ViewState is cleared on each PageLoad. So then I used...
2
2012
by: Lasse Edsvik | last post by:
Hello I have a problem with running classic asp on a windows 2003 server. For some reason it doesnt remove the sessions. I reload page and it removes some, reload again and it removes a few...
0
6920
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6763
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5367
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4503
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3015
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
574
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
210
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.