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

Sessions and IIS5.1

Context: WinXP Pro, IIS5.1, PHP5.03

Simplified:

the page http://myserver/myvirtualdir/index.php contains

<?php
echo 'here';
session_start();
echo 'there';
?>

but it only echoes 'here', it doesn't do anything after the session_start.

What is wrong? The code or maybe the session settings in php.ini ?
(Those settings have not been changed in comparison to the session settings
in php-ini-recommended)?

peter j. veger, best netherlands

Jul 17 '05 #1
6 1730
Peter J. Veger wrote:
Context: WinXP Pro, IIS5.1, PHP5.03

Simplified:

the page http://myserver/myvirtualdir/index.php contains

<?php
echo 'here';
session_start();
echo 'there';
?>

but it only echoes 'here', it doesn't do anything after the session_start.

What is wrong? The code or maybe the session settings in php.ini ?
(Those settings have not been changed in comparison to the session
settings in php-ini-recommended)?

peter j. veger, best netherlands


Hoi Peter,

Did you lookup session_start() at www.php.net?
I think not. :P

This is what is says:

-------------------------------------
Description
bool session_start ( void )

session_start() creates a session or resumes the current one based on the
current session id that's being passed via a request, such as GET, POST, or
a cookie.

This function always returns TRUE.

Note: If you are using cookie-based sessions, you must call
session_start() before anything is outputted to the browser.

-----------------------------------

Groetjes,
Erwin
Jul 17 '05 #2


"Erwin Moller" <si******************************************@spam yourself.com> wrote in message
news:42***********************@news.xs4all.nl...
Peter J. Veger wrote:
Context: WinXP Pro, IIS5.1, PHP5.03

Simplified:

the page http://myserver/myvirtualdir/index.php contains

<?php
echo 'here';
session_start();
echo 'there';
?>

but it only echoes 'here', it doesn't do anything after the session_start.

did you set display_error to On ?

it's probably a session.save_path error
What is wrong? The code or maybe the session settings in php.ini ?
(Those settings have not been changed in comparison to the session
settings in php-ini-recommended)?

peter j. veger, best netherlands


Hoi Peter,

Did you lookup session_start() at www.php.net?
I think not. :P

This is what is says:

-------------------------------------
Description
bool session_start ( void )

session_start() creates a session or resumes the current one based on the
current session id that's being passed via a request, such as GET, POST, or
a cookie.

This function always returns TRUE.

Note: If you are using cookie-based sessions, you must call
session_start() before anything is outputted to the browser.

-----------------------------------

Groetjes,
Erwin

Jul 17 '05 #3

"Erwin Moller"
<si******************************************@spam yourself.com> wrote in
message news:42***********************@news.xs4all.nl...
Peter J. Veger wrote:
<?php
echo 'here';
session_start();
echo 'there';
?>
but it only echoes 'here', it doesn't do anything after the
session_start.
peter j. veger, best netherlands
Hoi Peter,

Did you lookup session_start() at www.php.net?
I think not. :P


I did
This is what is says:
Description
bool session_start ( void )
session_start() creates a session or resumes the current one based on the
current session id that's being passed via a request, such as GET, POST,
or a cookie.
This function always returns TRUE.
Note: If you are using cookie-based sessions, you must call
session_start() before anything is outputted to the browser.
Groetjes,
Erwin


I simplified too much:
- I first tried (and that did nothing)
<?php
session_start();
echo 'there';
?>
- I then tried the text first given, just to see that the page was indeed
loaded by the server.

So I still have a problem
peter j. veger, best netherlands

Jul 17 '05 #4
"Mookstah" <no*****@spam.proof.alias.net> wrote in message
news:ne********************@news.actcom.co.il...
"Erwin Moller"
<si******************************************@spam yourself.com> wrote in
message
news:42***********************@news.xs4all.nl...
Peter J. Veger wrote:
> Context: WinXP Pro, IIS5.1, PHP5.03
> Simplified
> the page http://myserver/myvirtualdir/index.php contains
> <?php
> echo 'here';
> session_start();
> echo 'there';
> ?>
> but it only echoes 'here', it doesn't do anything after the
> session_start.
did you set display_error to On ?

it's probably a session.save_path error
> What is wrong? The code or maybe the session settings in php.ini ?
> (Those settings have not been changed in comparison to the session
> settings in php-ini-recommended)?
>
> peter j. veger, best netherlands


display_error = Off
I have set it to On and also ensured that error-logging is working.
Result:
- no error displayed;
- an error logged:
PHP Fatal error: session_start() [<a
href='function.session-start'>function.session-start</a>]: Failed to
initialize storage module: user (path: ) in K:\aa\bb\index.php on line 3

This "failing to initialize storage module", is that my fault?
peter j. veger, best netherlands
Jul 17 '05 #5
Peter J. Veger wrote:

display_error = Off
I have set it to On and also ensured that error-logging is working.
Result:
- no error displayed;
- an error logged:
PHP Fatal error: session_start() [<a
href='function.session-start'>function.session-start</a>]: Failed to
initialize storage module: user (path: ) in K:\aa\bb\index.php on line 3

This "failing to initialize storage module", is that my fault?
Hi Peter,

It sounds like php cannot save the sessionfiles.
(your session-array is just serialized and saved under the PHPSESSID in a
directory.)

CHeck your php.ini and find the header about sessions.
Make sure you have set:
- session.save_path = *****
- session.save_handler = files
- session.serialize_handler = php

The above **** should be a directory on the machine that PHP can write to.
If not, PHP cannot save the files (serialized sessions-data).

Hope this helps.

Good luck.
Regards,
Erwin Moller

------------------------------------
Here is a relevant piece:

; Handler used to store/retrieve data.
session.save_handler = files

; Argument passed to save_handler. In the case of files, this is the path
; where data files are stored. Note: Windows users have to change this
; variable in order to use PHP's session functions.
session.save_path = /tmp

; Whether to use cookies.
session.use_cookies = 1

; Name of the session (used as cookie name).
session.name = PHPSESSID

; Initialize session on request startup.
session.auto_start = 1

; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 0

; The path for which the cookie is valid.
session.cookie_path = /

; The domain for which the cookie is valid.
session.cookie_domain =

; Handler used to serialize data. php is the standard serializer of PHP.
session.serialize_handler = php

peter j. veger, best netherlands


Jul 17 '05 #6
Thank you, this is indeed the problem.

I had found it already myself!
My ini-file contained: session.save_handler = user
and I do not know how it got that value and what this means.
Now the values are correct and it works.

peter j. veger, best netherlands

"Erwin Moller"
<si******************************************@spam yourself.com> wrote in
message news:42***********************@news.xs4all.nl...
Peter J. Veger wrote:

display_error = Off
I have set it to On and also ensured that error-logging is working.
Result:
- no error displayed;
- an error logged:
PHP Fatal error: session_start() [<a
href='function.session-start'>function.session-start</a>]: Failed to
initialize storage module: user (path: ) in K:\aa\bb\index.php on line 3

This "failing to initialize storage module", is that my fault?


Hi Peter,

It sounds like php cannot save the sessionfiles.
(your session-array is just serialized and saved under the PHPSESSID in a
directory.)

CHeck your php.ini and find the header about sessions.
Make sure you have set:
- session.save_path = *****
- session.save_handler = files
- session.serialize_handler = php

The above **** should be a directory on the machine that PHP can write to.
If not, PHP cannot save the files (serialized sessions-data).

Hope this helps.

Good luck.
Regards,
Erwin Moller

------------------------------------
Here is a relevant piece:

; Handler used to store/retrieve data.
session.save_handler = files

; Argument passed to save_handler. In the case of files, this is the path
; where data files are stored. Note: Windows users have to change this
; variable in order to use PHP's session functions.
session.save_path = /tmp

; Whether to use cookies.
session.use_cookies = 1

; Name of the session (used as cookie name).
session.name = PHPSESSID

; Initialize session on request startup.
session.auto_start = 1

; Lifetime in seconds of cookie or, if 0, until browser is restarted.
session.cookie_lifetime = 0

; The path for which the cookie is valid.
session.cookie_path = /

; The domain for which the cookie is valid.
session.cookie_domain =

; Handler used to serialize data. php is the standard serializer of PHP.
session.serialize_handler = php

peter j. veger, best netherlands

Jul 17 '05 #7

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

Similar topics

6
by: Chewy509 | last post by:
Hi Everyone, I'll just start, and say I am not a PHP developer (I'm a sysadmin, who has gotten lumped with a non-working website). But since I like to do this type of stuff, I though I might...
6
by: JJ | last post by:
Hi, I really need to use cookieless ASP sessions with ASP 3 (IIS5) Can I find out the session ID from the first page, then post it or send it with the url to the next page, then at the start...
5
by: Jennifer Smith | last post by:
We have an environment running ASP on IIS5, where a user logs in via an ASP login page and an entry is made to the database recording the users login time and a database session. If the user then...
11
by: Ohaya | last post by:
Hi, I'm trying to understand a situation where ASP seems to be "blocking" of "queuing" requests. This is on a Win2K Advanced Server, with IIS5. I've seen some posts (e.g.,...
15
by: Jazzis | last post by:
I recently moved an application from W2K / IIS5 to W2K3 / IIS6. In the new environment user sessions expire after 2-3 minutes? I can't find any solution to this, although I found quite a few...
6
by: Paul | last post by:
Hi all, I seem to been having a problem with sessions. I have a session in the login page Session("UserLevel") = (MM_rsUser.Fields.Item("Accesslevel").Value) which doesn't seem to be visible...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
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...

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.