473,386 Members | 1,699 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_start() does not reload existing session

I was about to post a note here asking whether anyone could suggest
why session_start() would create a new session each time, rather than
reloading the existing one. My development environment is 4.3.4 as a
dll in Apache 2 under W2K, serving from 'localhost', and the pages
that work fine on my dev machine were failing on my laptop. It was
driving me mad.

But the penny finally dropped. If anyone else runs into that problem,
check your anti-annoyance settings to see whether you've added an
entry for 'localhost' that allows cookies. I run AdSubtract Pro on
both machines, but only had a localhost entry on the main machine. So
on my laptop AdSubtract was consuming the cookies php was issuing.

*sigh* It's always the little things.

Margaret
--
(To mail me, please change .not.invalid to .net, first.
Apologies for the inconvenience.)
Jul 17 '05 #1
5 3259
Did you create the folder specific as session.save_path in php.ini? If the
folder doesn't exist, PHP won't create it for you and a session wouldn't be
saved.

Uzytkownik "Margaret MacDonald" <sc**********@att.not.invalid> napisal w
wiadomosci news:42********************************@4ax.com...
I was about to post a note here asking whether anyone could suggest
why session_start() would create a new session each time, rather than
reloading the existing one. My development environment is 4.3.4 as a
dll in Apache 2 under W2K, serving from 'localhost', and the pages
that work fine on my dev machine were failing on my laptop. It was
driving me mad.

But the penny finally dropped. If anyone else runs into that problem,
check your anti-annoyance settings to see whether you've added an
entry for 'localhost' that allows cookies. I run AdSubtract Pro on
both machines, but only had a localhost entry on the main machine. So
on my laptop AdSubtract was consuming the cookies php was issuing.

*sigh* It's always the little things.

Margaret
--
(To mail me, please change .not.invalid to .net, first.
Apologies for the inconvenience.)

Jul 17 '05 #2
Yes, I did--that was the first thing I checked. I went over php.ini
obsessively and even created a new sessions folder to see whether
there was something about the existing one it didn't like. But it was
storing the session records fine, it just wasn't picking them up
again. It was only after I started thinking about what *could* be
wrong that it dawned on me that php was behaving as though it wasn't
seeing the cookie that tells it which session is mine. At that point
the penny dropped and I checked AdSubtract. Voilá!

Chung Leong wrote:
Did you create the folder specific as session.save_path in php.ini? If the
folder doesn't exist, PHP won't create it for you and a session wouldn't be
saved.

Uzytkownik "Margaret MacDonald" <sc**********@att.not.invalid> napisal w
wiadomosci news:42********************************@4ax.com...
I was about to post a note here asking whether anyone could suggest
why session_start() would create a new session each time, rather than
reloading the existing one. My development environment is 4.3.4 as a
dll in Apache 2 under W2K, serving from 'localhost', and the pages
that work fine on my dev machine were failing on my laptop. It was
driving me mad.

But the penny finally dropped. If anyone else runs into that problem,
check your anti-annoyance settings to see whether you've added an
entry for 'localhost' that allows cookies. I run AdSubtract Pro on
both machines, but only had a localhost entry on the main machine. So
on my laptop AdSubtract was consuming the cookies php was issuing.

*sigh* It's always the little things.

Margaret
--
(To mail me, please change .not.invalid to .net, first.
Apologies for the inconvenience.)


--
(To mail me, please change .not.invalid to .net, first.
Apologies for the inconvenience.)
Jul 17 '05 #3
xEM
I want to add:
Session files have been created for that sessions in my /tmp right
(for example: /tmp/sess_05bc0085da02a60c940e4988ae7fa2bb)

--
pozdr.;)
~xEM
Jul 17 '05 #4
xEM
On 2004-03-26, xEM <me@o2.pl> wrote:
I want to add:
Session files have been created for that sessions in my /tmp right
(for example: /tmp/sess_05bc0085da02a60c940e4988ae7fa2bb)


ups! not that post, sorry ;)
[this is to my post]

--
pozdr.;)
~xEM
Jul 17 '05 #5
Perhaps you're having the same problem: cookies being blocked by some third
party software.

Uzytkownik "xEM" <me@o2.pl> napisal w wiadomosci
news:sl***************@192.168.1.5...
On 2004-03-26, xEM <me@o2.pl> wrote:
I want to add:
Session files have been created for that sessions in my /tmp right
(for example: /tmp/sess_05bc0085da02a60c940e4988ae7fa2bb)


ups! not that post, sorry ;)
[this is to my post]

--
pozdr.;)
~xEM

Jul 17 '05 #6

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

Similar topics

19
by: Chris Allen | last post by:
Hi I'm new to PHP and I'm trying to create a Login Form. Once the user has logged in then he shouldn't have to log in again. The trouble is I'm getting a new session ID between every page and so...
3
by: Trogdor | last post by:
I set up a server on an AMD 650 machine running gentoo linux. I installed Apachie 2, MySQL 4.1 and PHP 4.3.11 I use another computer on my local net (192.168.0.x) to access the server as a...
66
by: Ellinghaus, Lance | last post by:
> > Other surprises: Deprecating reload() >Reload doesn't work the way most people think >it does: if you've got any references to the old module, >they stay around. They aren't replaced. ...
6
by: Jeff Smythe | last post by:
Why does Session_Start in Global.asax fire for every page opened during a session of an ASP.NET application? Am I wrong to expect that it would fire only when the first page (i.e., any page in...
5
by: Niklas Uhlin | last post by:
Someone please explain why Session_Start fires multiple times / retains SessionID values between sessions, when you open an ASP.NET page from MS Word. For details of the problem, see below: 1....
5
by: Gabriel Lozano-Morán | last post by:
Is there any particular reason why the Session_Start() event gets triggerend by each aspx page request? Details: Windows XP Pro SP2 ..NET Framework v1.1.4322 C# SessionState set to mode...
0
by: Peter R. Vermilye | last post by:
I am involved on a web application that is using a third party set of APIs for remote database access (middleware). I've been brought in because of my background in programming, thus I'm new to...
1
by: jcode | last post by:
I have an ASPNET application that has worked correctly on couple of servers. I have just deployed it to another server and cannot resolve an issue. It appears as if the Session_Start is not...
5
by: greg | last post by:
Written in Asp.Net 2.0 The session_start fires on Development server running withing Visual Studio 2005 and also if access web site via localhost on development machine. But if copy to...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.