473,385 Members | 1,312 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,385 software developers and data experts.

PHP & session doesn't work like it should

Hello,

I have windows 2008 R2 and IIS 7.5 with PHP 5.2.4.
I've tried to upgrade to PHP 5.3.3 and the same problem.

I'm using WORDPRESS or phpmyadmin that need to use session.
I've enabled and gave the folder write permissions.

When I'm trying to use the session its created but its forgotten...


For example, i've created this page:


Expand|Select|Wrap|Line Numbers
  1. <?php
  2.  
  3. session_start();
  4.  
  5. $_SESSION['i'] = isset($_SESSION['i']) ? $_SESSION['i'] + 1 : 1;
  6.  
  7. echo $_SESSION['i'];
  8.  
  9. ?> 
I tried to refresh it more than 50 times, the result is always 1 but in the session folder I have 50 files...
The session is always re-created and not modified, its like the PHP forgot it...always create new ones..

What is the problem? It's make me crazy. I tried everything for more than 10 hours.

Thank you!
Aug 29 '10 #1
4 2819
Problem Solved (header problem).
Aug 30 '10 #2
dear you have to sent error message also so that problem can easily understand,,

any way congratulation to solved your prob..
Sep 9 '10 #3
There wasn't any error.
It was a problem with the HEADER (PHPSESSION) that was removed all the time...
Sep 9 '10 #4
humm
,,

ok :)

take care
Sep 10 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Darrell Blake | last post by:
I'm trying to use sessions to allow people to log into my site. The problem is that sometimes it works and sometimes it doesn't! As far as I'm aware my script is fine (hence why it works sometimes)...
1
by: TS | last post by:
ex in VB: oChild = XMLDoc.CreateElement("P") oChild3.InnerXml = "this is test data" '''''This doesn't work: oChild3.InnerXml &= " that i like to keep on hand" '''Neither does this:...
19
by: David Thielen | last post by:
Hi; If there are no namespaces this works fine for me. But if the xml has namespaces, then I get either no node back or an exception. Here is the sample xml: <root xmlns="http://www.test.org"...
3
by: Tom | last post by:
hello question 1: I have the following code below but the funny thing is that Session only works when I invoke it from the server side.. When I call this session from client (winform app) I...
3
by: Mike Malter | last post by:
I have a general error page that I configured in web.config as <customErrors mode="On" defaultRedirect="CRDefaultError.aspx" /> This error page comes up whenever an error occurs outside of any...
0
by: Natan | last post by:
After having lots of problems here, I realized that IE doesn't send the ASP.NET SessionID cookie when i open a window with window.open. A cookie should be always be sent when the page is in the...
12
by: Henry Wu | last post by:
Hi, I've semi-successfully converted my old VB6 project to VB.NET2003 http://wuhenry.beigetower.org/vbVideoInspection.rar ,it is a simple webcam program that works flawlessly on VB6. Now I'm having...
3
by: jansi1975 | last post by:
My scripts have been working since past 3 years. But now recently the page doesn''t work well. The page is working well under php4 in localhost but in the server side this seems to be error. on the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...

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.