php-windows Digest 5 Oct 2003 23:05:31 -0000 Issue 1942
Topics (messages 21675 through 21684):
Session Problem
21675 by: Disko_kex
21676 by: Kai Wenk
21677 by: Disko_kex
21681 by: Mike Brum
21682 by: Disko_kex
Session prob
21678 by: Disko_kex
21679 by: Mike Brum
21680 by: Disko_kex
21683 by: Fernando Correa da Conceição
newbie problem
21684 by: Peter Gerwing
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Hi,
How can I save a session value? I tried:
<?php
session_start();
if (!empty($_SESSION["test"]))
$_SESSION["test"]++;
else
$_SESSION["test"]=0;
printf("%d",$session["test"]);
?>
but I get this warnings and its not working at all. What should I do?
Warning: session_start():
open(/tmp\sess_4d5fc486fcfae10349d5bf6fb21092ea, O_RDWR) failed: No such
file or directory (2) in c:\inetpub\wwwroot\session.php on line 7
Warning: session_start(): Cannot send session cookie - headers already
sent by (output started at c:\inetpub\wwwroot\session.php:7) in
c:\inetpub\wwwroot\session.php on line 7
Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at c:\inetpub\wwwroot\session.php:7) in
c:\inetpub\wwwroot\session.php on line 7
Warning: Unknown(): open(/tmp\sess_4d5fc486fcfae10349d5bf6fb21092ea,
O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Warning: Unknown(): Failed to write session data (files). Please verify
that the current setting of session.save_path is correct (/tmp) in
Unknown on line 0
--- End Message ---
--- Begin Message ---
Disko_kex wrote:
but I get this warnings and its not working at all. What should I do?
Warning: session_start():
open(/tmp\sess_4d5fc486fcfae10349d5bf6fb21092ea, O_RDWR) failed: No such
file or directory (2) in c:\inetpub\wwwroot\session.php on line 7
Warning: session_start(): Cannot send session cookie - headers already
sent by (output started at c:\inetpub\wwwroot\session.php:7) in
c:\inetpub\wwwroot\session.php on line 7
Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at c:\inetpub\wwwroot\session.php:7) in
c:\inetpub\wwwroot\session.php on line 7
Warning: Unknown(): open(/tmp\sess_4d5fc486fcfae10349d5bf6fb21092ea,
O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Warning: Unknown(): Failed to write session data (files). Please verify
that the current setting of session.save_path is correct (/tmp) in
Unknown on line 0
Do you have set the right directory for your temp-files in the php.ini?
(-> Does this directory /tmp exists?)
--
Kai G.K. Wenk
icq: #83858166
mobile: (+49) 0170/4240151
web: http://www.boozerchat.de
--- End Message ---
--- Begin Message ---
>Disko_kex wrote:
>> but I get this warnings and its not working at all. What should I do?
>>
>> Warning: session_start():
>> open(/tmp\sess_4d5fc486fcfae10349d5bf6fb21092ea, O_RDWR) failed: No
such
>> file or directory (2) in c:\inetpub\wwwroot\session.php on line 7
>>
>> Warning: session_start(): Cannot send session cookie - headers
already
>> sent by (output started at c:\inetpub\wwwroot\session.php:7) in
>> c:\inetpub\wwwroot\session.php on line 7
>>
>> Warning: session_start(): Cannot send session cache limiter - headers
>> already sent (output started at c:\inetpub\wwwroot\session.php:7) in
>> c:\inetpub\wwwroot\session.php on line 7
>>
>> Warning: Unknown(): open(/tmp\sess_4d5fc486fcfae10349d5bf6fb21092ea,
>> O_RDWR) failed: No such file or directory (2) in Unknown on line 0
>>
>> Warning: Unknown(): Failed to write session data (files). Please
verify
>> that the current setting of session.save_path is correct (/tmp) in
>> Unknown on line 0
>>
>>
>Do you have set the right directory for your temp-files in the php.ini?
>(-> Does this directory /tmp exists?)
>
I made some changes, no warnings or errors. But the session still not
working.
--- End Message ---
--- Begin Message ---
Assuming this is tied into your other problem (which I read first), then the
problem here is that it appears you're on a Windows machine and you don't
have php.ini set up correctly.
You need to set the session.save_path in php.ini to point to a directory
that exists. Mine, for example is this:
session.save_path = "C:\PHP\temp_dir"
Just make sure that the dir exists and point it there. That will clear up
the first error message and then the other ones will go away after that
one's gone.
-M
-----Original Message-----
From: Disko_kex [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 05, 2003 10:31 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Session Problem
Hi,
How can I save a session value? I tried:
<?php
session_start();
if (!empty($_SESSION["test"]))
$_SESSION["test"]++;
else
$_SESSION["test"]=0;
printf("%d",$session["test"]);
?>
but I get this warnings and its not working at all. What should I do?
Warning: session_start(): open(/tmp\sess_4d5fc486fcfae10349d5bf6fb21092ea,
O_RDWR) failed: No such file or directory (2) in
c:\inetpub\wwwroot\session.php on line 7
Warning: session_start(): Cannot send session cookie - headers already sent
by (output started at c:\inetpub\wwwroot\session.php:7) in
c:\inetpub\wwwroot\session.php on line 7
Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at c:\inetpub\wwwroot\session.php:7) in
c:\inetpub\wwwroot\session.php on line 7
Warning: Unknown(): open(/tmp\sess_4d5fc486fcfae10349d5bf6fb21092ea,
O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Warning: Unknown(): Failed to write session data (files). Please verify that
the current setting of session.save_path is correct (/tmp) in Unknown on
line 0
--- End Message ---
--- Begin Message ---
I've done that. Still not working.
-----Original Message-----
From: Mike Brum [mailto:[EMAIL PROTECTED]
Sent: den 5 oktober 2003 19:25
To: 'Disko_kex'; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Session Problem
Assuming this is tied into your other problem (which I read first), then
the
problem here is that it appears you're on a Windows machine and you
don't
have php.ini set up correctly.
You need to set the session.save_path in php.ini to point to a directory
that exists. Mine, for example is this:
session.save_path = "C:\PHP\temp_dir"
Just make sure that the dir exists and point it there. That will clear
up
the first error message and then the other ones will go away after that
one's gone.
-M
-----Original Message-----
From: Disko_kex [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 05, 2003 10:31 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Session Problem
Hi,
How can I save a session value? I tried:
<?php
session_start();
if (!empty($_SESSION["test"]))
$_SESSION["test"]++;
else
$_SESSION["test"]=0;
printf("%d",$session["test"]);
?>
but I get this warnings and its not working at all. What should I do?
Warning: session_start():
open(/tmp\sess_4d5fc486fcfae10349d5bf6fb21092ea,
O_RDWR) failed: No such file or directory (2) in
c:\inetpub\wwwroot\session.php on line 7
Warning: session_start(): Cannot send session cookie - headers already
sent
by (output started at c:\inetpub\wwwroot\session.php:7) in
c:\inetpub\wwwroot\session.php on line 7
Warning: session_start(): Cannot send session cache limiter - headers
already sent (output started at c:\inetpub\wwwroot\session.php:7) in
c:\inetpub\wwwroot\session.php on line 7
Warning: Unknown(): open(/tmp\sess_4d5fc486fcfae10349d5bf6fb21092ea,
O_RDWR) failed: No such file or directory (2) in Unknown on line 0
Warning: Unknown(): Failed to write session data (files). Please verify
that
the current setting of session.save_path is correct (/tmp) in Unknown on
line 0
--- End Message ---
--- Begin Message ---
<?php
if (! isset($_SESSION['count'])) {
$_SESSION['count'] = 1;
}
else {
$_SESSION['count']++;
}
print $_SESSION['count'];
?>
Why isn´t this working? Is there something I done wrong during the
installation or what?
--- End Message ---
--- Begin Message ---
You need to start the session.
sesstion_start();
Read up - http://us3.php.net/manual/en/function.session-start.php
-----Original Message-----
From: Disko_kex [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 05, 2003 12:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Session prob
<?php
if (! isset($_SESSION['count'])) {
$_SESSION['count'] = 1;
}
else {
$_SESSION['count']++;
}
print $_SESSION['count'];
?>
Why isn´t this working? Is there something I done wrong during the
installation or what?
--- End Message ---
--- Begin Message ---
Still not working?
-----Original Message-----
From: Mike Brum [mailto:[EMAIL PROTECTED]
Sent: den 5 oktober 2003 19:12
To: 'Disko_kex'; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Session prob
You need to start the session.
sesstion_start();
Read up - http://us3.php.net/manual/en/function.session-start.php
-----Original Message-----
From: Disko_kex [mailto:[EMAIL PROTECTED]
Sent: Sunday, October 05, 2003 12:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Session prob
<?php
if (! isset($_SESSION['count'])) {
$_SESSION['count'] = 1;
}
else {
$_SESSION['count']++;
}
print $_SESSION['count'];
?>
Why isn´t this working? Is there something I done wrong during the
installation or what?
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Use session_start().
<?php
session_start();
if (! isset($_SESSION['count'])) {
$_SESSION['count'] = 1;
}
else {
$_SESSION['count']++;
}
print $_SESSION['count'];
?>
--
Fernando Correa da Conceição
ICQ 168518047
http://manualphp.sourceforge.net
Participe da Tradução do Manual do PHP
"Disko_kex" <[EMAIL PROTECTED]> escreveu na mensagem
news:[EMAIL PROTECTED]
<?php
if (! isset($_SESSION['count'])) {
$_SESSION['count'] = 1;
}
else {
$_SESSION['count']++;
}
print $_SESSION['count'];
?>
Why isn´t this working? Is there something I done wrong during the
installation or what?
--- End Message ---
--- Begin Message ---
I use windows XP
I installed apache it works fine or at least boots in a console windaw and
tests fine
I installed Mysql and it works fine i've been in and setup databases etc
I installed PHP and it tests fine with the php -i giving me all the html
stuff
I know my host name, I know my user name I even know my password .
QUESTION?
I can't seem to get a html file with the PHP code to work. ?
any ideas
Peter
--- End Message ---