ID: 16872
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: Session related
Operating System: Win 98
PHP Version: 4.2.0
New Comment:
All right,
So I have the this script:
?php
session_start();
/*
phpTextEditor v1.0 (03/21/02)
http://php.rij73.com
Copyright (C) 2002 rij73
Please post in the forum at http://php.rij73.com if you have any
questions or comments.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
include (config.inc);
//password check
if(($valid_pass != $editor_password) or ($valid_user !=
$editor_username)) {
echo htmlheadtitle$title/titlestyle type=\text/css\!--;
include (style.inc);
echo --/style/head;
echo body onload=\document.login.valid_user.focus()\table
align=center width=750 height=\90%\trtd align=center
valign=middleform name=\login\ method=\post\
action=\login.php\;
echo $userbrinput type=\text\
name=\valid_user\brbr$passbrinput type=\password\
name=\valid_pass\brbrinput type=\submit\ name=\submit\
value=\login\;
echo /form/td/tr/table/body;
} //end password check
//password okay, send to script!
elseif(($valid_pass == $editor_password) or ($valid_user ==
$editor_username)){
session_register('valid_user');
session_register('valid_pass');
header(Location: index.php);
}
?
I expect it to start a session, register the user and password and the
go to index.php.
Now when I run the script in the browser (I run under a Apache server),
PHP crashes.
Previous Comments:
[2002-04-27 10:31:06] [EMAIL PROTECTED]
Not enough information was provided for us to be able
to handle this bug. Please re-read the instructions at
http://bugs.php.net/how-to-report.php
If you can provide more information, feel free to add it
to this bug and change the status back to Open.
[2002-04-27 10:29:02] [EMAIL PROTECTED]
Hi,
I try to make a script with sessions, but when I use the command
session_start() in my script, PHP crashes. I don't know what causes it,
so please help me.
--
Edit this bug report at http://bugs.php.net/?id=16872edit=1