473,320 Members | 2,088 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,320 software developers and data experts.

Session_Start() Hangs after setting Session_Id

CjB
Hello, I am trying to do the following in one of my pages.
session_id($_GET['SESSIONID']);
session_start();

I am running php5, however as soon as I call session_start the script
hangs and nothing happens. Is anyone else experiencing this problem, or
am I doing something incorrectly?

Thanks!

Jun 30 '06 #1
3 4958
Syl

CjB wrote:
Hello, I am trying to do the following in one of my pages.
session_id($_GET['SESSIONID']);
session_start();

I am running php5, however as soon as I call session_start the script
hangs and nothing happens. Is anyone else experiencing this problem, or
am I doing something incorrectly?

Thanks!


session_start(); must always be listed at the top of every page.
like this :

<?php
session_start();

Jun 30 '06 #2

"Syl" <da**********@gmail.com> wrote in message
news:11**********************@d56g2000cwd.googlegr oups.com...

CjB wrote:
Hello, I am trying to do the following in one of my pages.
session_id($_GET['SESSIONID']);
session_start();

I am running php5, however as soon as I call session_start the script
hangs and nothing happens. Is anyone else experiencing this problem, or
am I doing something incorrectly?

Thanks!


session_start(); must always be listed at the top of every page.
like this :

<?php
session_start();


That is not necessarily true. It does NOT have to be the very first
statement in the script, but BEFORE you want to start using the $_SESSION
array.

You need to check that you have a value in $_GET['SESSIONID'] before you use
it. Try this:

if (isset($_GET['SESSIONID'])) {
session_id($_GET['SESSIONID']);
} // if
session_start();

--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
Jun 30 '06 #3
Syl

Tony Marston wrote:
"Syl" <da**********@gmail.com> wrote in message
news:11**********************@d56g2000cwd.googlegr oups.com...

CjB wrote:
Hello, I am trying to do the following in one of my pages.
session_id($_GET['SESSIONID']);
session_start();

I am running php5, however as soon as I call session_start the script
hangs and nothing happens. Is anyone else experiencing this problem, or
am I doing something incorrectly?

Thanks!


session_start(); must always be listed at the top of every page.
like this :

<?php
session_start();


That is not necessarily true. It does NOT have to be the very first
statement in the script, but BEFORE you want to start using the $_SESSION
array.

You need to check that you have a value in $_GET['SESSIONID'] before you use
it. Try this:

if (isset($_GET['SESSIONID'])) {
session_id($_GET['SESSIONID']);
} // if
session_start();

--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org

Of course - you are absolutely correct Tony.

Thanks for clarifying my post.

Jun 30 '06 #4

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

Similar topics

3
by: Florence HENRY | last post by:
Hello, I've searched about my problem on google before posting, but I didn't find anything relevant... I have a problem with session_start. Here is my code : <html> <head> <?php...
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: Margaret MacDonald | last post by:
I'm having a funny problem. More than likely it's something simple that I'm just not seeing, but ...I'm not seeing it! I'm storing session data in a table, following the model in Lerdorf &...
8
by: lkrubner | last post by:
I was trying to set a cookie before I called session_start() and it was giving me an error. But isn't sessions really just a cookie? Why would it matter if I sent a cookie before session_start? Can...
0
by: Nathan | last post by:
This is a copy of a message at microsoft.public.dotnet.framework.clr: THE CODE: I'm using an HttpWebResponse object to send an HTTP POST to a Java server I have written and are running on the...
4
by: camou | last post by:
I get this error message: A session had already been started - ignoring session_start(). How can I check to see if a session was started already? Thanks
6
by: comp.lang.php | last post by:
I am using session_start() on index.php and for some reason sometimes it'll fail. No warnings, no errors, no notices, not even after prepending error_reporting(E_ALL) and ini_set('display_errors',...
0
by: Arno Stienen | last post by:
Perhaps I should be a bit more specific. When using this code to connect to a remote XML-RPC server (C++, xmlrpc++0.7 library): import xmlrpclib server =...
14
by: Sergei Shelukhin | last post by:
Hi. I have a session started in php and two browser windows (IE)/tabs (FF) open. In one window, I execute a very slow report, immediately after that, I execute a fast simple page in another. I...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.