|
Posted by Mladen Gogala on 07/10/05 06:27
On Sat, 09 Jul 2005 15:52:52 -0400, Shelly wrote:
> and only the "Error: " displayed. This told me that the session variable
> was not set. However, if I put echos in the code immediately after it gets
> set, then it echos and prints further that the headers have already been set
> (BTW, what does that mean?). So, I know that it is being set, it is not
> being unset anywhere, yet it isn't set when the form redisplays.
>
> I have been banging my head against the wall for hours now. Anyone have any
> ideas?
Yes. Probably, your web server has specified the nature of the error in
the log file. My server (Apache 2.0.53) does it like this:
[client 127.0.0.1] PHP Parse error: parse error, unexpected '{' in
/home/mgogala/work/DBA/security.php on line 25, referer:
http://localhost/dba/main_menu.html
If I am not mistaken, you haven't started the session, in the first place.
This is how things should look:
<?php
require_once ('config.php');
session_start();
$DSN = $_SESSION['DSN'];
$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
$ADODB_COUNTRECS = true; $db = NewADOConnection("oci8");
$usr = $_GET['user'];
$USRINFO = 'select USERNAME,
ACCOUNT_STATUS STATUS,
EXPIRY_DATE EXPIRES,
DEFAULT_TABLESPACE "DFLT. TBLSPCE",
TEMPORARY_TABLESPACE "TEMP. TBLSPCE",
CREATED,PROFILE,
........
After invoking the session_start() function, I can read my connect
information into the $DSN variable. Last, saying that "this has
worked before" makes no sense whatsoever and is probably the single
most irritating thing you can say to a support person. You either have
to explain before what exact event was it working or get the support
person to start believing in ghosts which are haunting your code. If
the support person has geeky sense of humor, it can be rather unpleasant
proposition.
--
http://www.mgogala.com
[Back to original message]
|