|
From: Craig P J. <cpj...@th...> - 2003-12-12 22:22:19
|
there are several reasons why we decided to store session info in the db. the need to do this started with a problem we were having with the sourceforge live testing version of etest. the sessions werent being kept from page to page and we didnt know why. I found out that the reason was because sourceforge has 5 web servers that run load-balancing software to distribute requests. so we were getting the login page from one server and storing our login info there, and then when we clicked a link to another page, that page might be sent to us from one of the other servers which didnt have out session info on it so we were being redirected to the login as if we never had logged in. so the two ways to get around this were to set the session_save_path() value to a folder in our webroot directory or to write our own session management functions using our mysql database. we chose to use the db because of the greater security that it provides for one reason. we didnt have to open up a folder in our webroot directory that all users could have access to and risk security issues through that. by using the db method we can also match all the session data to a users ip address to prevent (as chris called it) "session fixation", where another user "hijacks some session info as it is passed, grabs the session_id, and then writes out there own session info. with the db, we now map the session id to an individual ip address and check to make sure all session requests to that session_id come from the same ip address. another reason was portability. since we will have the mysql server anyways with our software, it made sense to use it for this need as well. plus, it was easy enough to implement and very easy for us to manage. =3D20 that pretty much sums it up. cpj -----Original Message----- From: ete...@li... [mailto:ete...@li...] On Behalf Of Brad Sent: Friday, December 12, 2003 3:02 PM To: ete...@li... Subject: [Etest-devel] Re: Etest-devel digest, Vol 1 #19 - 3 msgs Can someone bring me up to speed on why we are even storing the sessions in=20 the db? Is this really necessary? I'm assuming for security reasons but=20 would like an explanation. I have been very busy lately and have not had=20 much time to program. Therefore, my code is not using all of the new=20 configuration files. I plan to make a clone of the student or admin home=20 page to use as the instructor home page, but would like some explanation basically for my understanding. Thanks, Brad On Fri, 12 Dec 2003 11:35:01 -0800, etest-devel- re...@li... wrote : > Send Etest-devel mailing list submissions to > ete...@li... >=20 > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/etest-devel > or, via email, send a message with subject or body 'help' to > ete...@li... >=20 > You can reach the person managing the list at > ete...@li... >=20 > When replying, please edit your Subject line so it is more specific=20 > than "Re: Contents of Etest-devel digest..." >=20 >=20 > Today's Topics: >=20 > 1. Re: Re: Re: [Etest-devel] Re: Re: [Etest-devel] Re:=20 > [Etest-devel] warnings and other questions (Jeremy Eden) > 2. Re: warnings and other questions (Chris Wanstrath) > 3. =3D?iso-8859-1?B? UmU6IFJlOiBbRXRlc3QtZGV2ZWxdIFJlOiBSZTogW0V0ZXN0LWRldmVsXSBSZTogUmU6IFtF dGVz dC1kZXZlbF0gUmU6IFtFdGVzdC1kZXZlbF0gd2FybmluZ3MgYW5kIG90aGVyIHF1ZXN0aW9u cw=3D=3D ?=3D (=3D?iso-8859-1?B?Q3JhaWcgUCBKb2xpY29ldXI=3D?=3D) >=20 > --__--__-- >=20 > Message: 1 > From: "Jeremy Eden" <ede...@ho...> > To: <ete...@li...> > Subject: Re: [Etest-devel] Re: Re: [Etest-devel] Re: Re: [Etest-devel] Re: [Etest-devel] warnings and other questions > Date: Fri, 12 Dec 2003 13:36:59 -0500 > Reply-To: ete...@li... >=20 > I think I figured out why it was giving me those warnings. There are blank > lines after the last '?>' in configure.php and mysql_sessions.inc.php. This > is somehow causing the headers to be sent because when I removed them=20 > I was > working again just fine and the sessions were working with no more warnings. > I don't know if this blank is being seen as html code. Does this make sense > to anyone? >=20 > ----- Original Message ----- > From: "Craig P Jolicoeur" <cpj...@th...> > To: <ete...@li...> > Sent: Friday, December 12, 2003 12:35 PM > Subject: [Etest-devel] Re: Re: [Etest-devel] Re: Re: [Etest-devel] Re: > [Etest-devel] warnings and other questions >=20 >=20 > we arent calling the sess_init(). we set up the varibles in=20 > configure.php so we dont need to call sess_init(). there will be not=20 > documentation on it > since it isnt an actually PHP builtin function but a user-defined function. > but, we arent calling it right now, we set up the variables ourselves=20 > in configure.php that sess_init() would have set up. >=20 >=20 >=20 >=20 >=20 >=20 >=20 > -------Original Message------- >=20 > > From: Jeremy Eden <ede...@ho...> >=20 > > Subject: >=20 > Re: [Etest-devel] Re: Re: [Etest-devel] Re: [Etest-devel] warnings and other > questions >=20 > > Sent: Dec 12 2003 11:03:39 >=20 > > >=20 > > How does the sess_init function get called? I don't see any=20 > call to > it and >=20 > > I don't see any mention of it in the PHP docs. >=20 > > ----- Original Message ----- >=20 > > From: "Craig P Jolicoeur" >=20 > > To: >=20 > > Sent: Friday, December 12, 2003 10:45 AM >=20 > > Subject: [Etest-devel] Re: Re: [Etest-devel] Re:=20 > [Etest-devel] warnings and >=20 > > other questions >=20 > > >=20 > > >=20 > > why dont you just change your etest user password to=20 > 'protocol' in > your >=20 > > database so you dont have to make that change everytime??=20 > that is the >=20 > > correct password we are using now. >=20 > > >=20 > > >=20 > > >=20 > > i dont know what to tell you. I have no more ideas. maybe=20 > some of the >=20 > > others can help you. Chris?? Brad?? any ideas. are you guys having >=20 > > problems to or are you fine like me? >=20 > > >=20 > > >=20 > > >=20 > > cpj >=20 > > >=20 > > >=20 > > >=20 > > >=20 > > >=20 > > >=20 > > >=20 > > -------Original Message------- >=20 > > >=20 > > > From: Jeremy Eden >=20 > > >=20 > > > Subject: >=20 > > >=20 > > Re: [Etest-devel] Re: [Etest-devel] warnings and other=20 > questions >=20 > > >=20 > > > Sent: Dec 12 2003 10:15:41 >=20 > > >=20 > > > >=20 > > >=20 > > > I have done some more looking and the sessions are not working > on >=20 > > my machine >=20 > > >=20 > > > at all. Is there something else that needs to be done=20 > with the >=20 > > change from >=20 > > >=20 > > > having sessions stored to a directory vs. stored in the=20 > database. >=20 > > Something >=20 > > >=20 > > > like a PHP.INI change? I am stuck until the sessions=20 > work on my >=20 > > machine. I >=20 > > >=20 > > > can't even continue developing since I can't get past=20 > the >=20 > > admin_home page. >=20 > > >=20 > > > The only change that I did, was to the configure.php=20 > file. I >=20 > > changed the >=20 > > >=20 > > > DB_HOST to be 'localhost' instead of 'mysql' because the check > for >=20 > > the >=20 > > >=20 > > > localhost IP doesn't work on my machine because my=20 > server has > a >=20 > > static IP. >=20 > > >=20 > > > I also changed the DBPassword to 'etest' instead of 'protocol' >=20 > > because that >=20 > > >=20 > > > was how I had setup the MySQL database before. It=20 > doesn't seem > like >=20 > > either >=20 > > >=20 > > > of these two changes should affect sessions though. Any ideas? >=20 > > >=20 > > > >=20 > > >=20 > > > ----- Original Message ----- >=20 > > >=20 > > > From: "Craig P Jolicoeur" >=20 > > >=20 > > > To: >=20 > > >=20 > > > Sent: Friday, December 12, 2003 7:39 AM >=20 > > >=20 > > > Subject: RE: [Etest-devel] Re: [Etest-devel] warnings=20 > and other >=20 > > questions >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > I am not sure what to tell you. The admin and student=20 > pages work >=20 > > fine >=20 > > >=20 > > > on my machine, and on the live sourceforge site. There=20 > are no >=20 > > errors >=20 > > >=20 > > > being thrown like that. The sessions work fine. I am not sure > where >=20 > > >=20 > > > your problem is coming from. Is anyone else having the=20 > same >=20 > > problem?? >=20 > > >=20 > > > My thoughts are that it is probably something on your machine > since >=20 > > it >=20 > > >=20 > > > works fine for me and on the sf site. >=20 > > >=20 > > > >=20 > > >=20 > > > You may still see some records in the etest_sessions=20 > table but > they >=20 > > most >=20 > > >=20 > > > likely are expired. The will still be there if the user didn't > log >=20 > > out >=20 > > >=20 > > > and just closed the browser or something like that. The reason > they >=20 > > are >=20 > > >=20 > > > there is no garbage collection has been run on expired=20 > sessions. I >=20 > > will >=20 > > >=20 > > > have to implement something for that soon. >=20 > > >=20 > > > >=20 > > >=20 > > > -----Original Message----- >=20 > > >=20 > > > From: ete...@li... >=20 > > >=20 > > > [mailto:ete...@li...] On=20 > Behalf Of >=20 > > Jeremy >=20 > > >=20 > > > Eden >=20 > > >=20 > > > Sent: Friday, December 12, 2003 6:55 AM >=20 > > >=20 > > > To: ete...@li... >=20 > > >=20 > > > Subject: Re: [Etest-devel] Re: [Etest-devel] warnings=20 > and other >=20 > > >=20 > > > questions >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > I am starting my pages like you have in the example and=20 > it is > still >=20 > > >=20 > > > giving those warnings and the redirect to the login page > doesn't >=20 > > work >=20 > > >=20 > > > either because the headers are already sent. It happens=20 > also with >=20 > > the >=20 > > >=20 > > > student pages not just the admin pages. Before logging=20 > in a >=20 > > student, go >=20 > > >=20 > > > to student_grade.php as an example and you should be=20 > redirected to >=20 > > login >=20 > > >=20 > > > the student but instead I get warnings saying the=20 > headers are >=20 > > already >=20 > > >=20 > > > sent and that is all I see. I have the latest from CVS,=20 > my database >=20 > > is >=20 > > >=20 > > > setup with etest_mysql_import.sql and this is still happening. > I am >=20 > > >=20 > > > running the website on a WinXP Home, MySQL 4.0.16, PHP=20 > 4.3.3 and >=20 > > Apache >=20 > > >=20 > > > 1.3. >=20 > > >=20 > > > >=20 > > >=20 > > > If no one is connected to the etest website (on my webserver) >=20 > > should I >=20 > > >=20 > > > still see records in the etest_sessions table? >=20 > > >=20 > > > >=20 > > >=20 > > > For the logout.php file the admin pages only set=20 > 'adminusername' >=20 > > and >=20 > > >=20 > > > 'Admin_Name' SESSION vars. >=20 > > >=20 > > > >=20 > > >=20 > > > ----- Original Message ----- >=20 > > >=20 > > > From: "Craig P Jolicoeur" >=20 > > >=20 > > > To: >=20 > > >=20 > > > Sent: Thursday, December 11, 2003 2:04 PM >=20 > > >=20 > > > Subject: [Etest-devel] Re: [Etest-devel] warnings and=20 > other >=20 > > questions >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > This is how you should start your pages now. just=20 > include the >=20 > > >=20 > > > configure.php file and then do your=20 > $_SESSION['username'] check to >=20 > > see >=20 > > >=20 > > > if the user is logged in. then setup your variables and=20 > include >=20 > > >=20 > > > html_header.php. Thats all you need to do now. The=20 > configure.php >=20 > > files >=20 > > >=20 > > > does everything for you. It sets all the variable=20 > constants, >=20 > > includes >=20 > > >=20 > > > the header.php file, setups the MySQL session management file, > and >=20 > > then >=20 > > >=20 > > > starts your session. All of this is done for you now in=20 > the >=20 > > >=20 > > > configure.php file. just start your pages like >=20 > > >=20 > > > this: >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > require('../includes/configure.php'); >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > if (!isset($_SESSION['username'])) >=20 > > >=20 > > > >=20 > > >=20 > > > { >=20 > > >=20 > > > >=20 > > >=20 > > > header("location: ../index.php"); >=20 > > >=20 > > > >=20 > > >=20 > > > exit; >=20 > > >=20 > > > >=20 > > >=20 > > > } >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > $pagetitle =3D "View Grades"; >=20 > > >=20 > > > >=20 > > >=20 > > > $stylesheet =3D "student_basics.css"; >=20 > > >=20 > > > >=20 > > >=20 > > > $navbarname =3D >=20 > > "../student_navbar/student_navbar_print.inc"; >=20 > > >=20 > > > >=20 > > >=20 > > > require('../includes/html_header.php'); >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > if you are doing that, it should work fine for you.=20 > also, you > need >=20 > > to >=20 > > >=20 > > > make sure your database is set up correctly to handle=20 > the new >=20 > > session >=20 > > >=20 > > > management table. import the etest_mysql_import.sql file into > your >=20 > > db >=20 > > >=20 > > > to set it up properly. >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > about deleting teachers, no teacher should be deleted if they > have >=20 > > >=20 > > > associated tests, courses, etc... Really a teacher=20 > shouldnt have to >=20 > > be >=20 > > >=20 > > > deleted, since schools will probably want to keep=20 > records of them >=20 > > on >=20 > > >=20 > > > file for a long time, but we still should allow them to=20 > be deleted >=20 > > if >=20 > > >=20 > > > they truly do want to. >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > craig >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > -------Original Message------- >=20 > > >=20 > > > >=20 > > >=20 > > > > From: Jeremy Eden >=20 > > >=20 > > > >=20 > > >=20 > > > > Subject: >=20 > > >=20 > > > >=20 > > >=20 > > > [Etest-devel] warnings and other questions >=20 > > >=20 > > > >=20 > > >=20 > > > > Sent: Dec 11 2003 12:47:18 >=20 > > >=20 > > > >=20 > > >=20 > > > > >=20 > > >=20 > > > >=20 > > >=20 > > > > After updating this morning I started getting PHP=20 > warnings on >=20 > > >=20 > > > every admin >=20 > > >=20 > > > >=20 > > >=20 > > > > page, see below: >=20 > > >=20 > > > >=20 > > >=20 > > > > >=20 > > >=20 > > > >=20 > > >=20 > > > > Warning: session_start() Cannot send session cookie > - headers >=20 > > >=20 > > > already sent >=20 > > >=20 > > > >=20 > > >=20 > > > > by (...mysql_sessions.inc.php:636) in=20 > configure.php:110 >=20 > > >=20 > > > >=20 > > >=20 > > > > Warning: session_start() Cannot send session cache=20 > limiter - >=20 > > >=20 > > > headers >=20 > > >=20 > > > >=20 > > >=20 > > > > already sent by (...mysql_sessions.inc.php:636) in >=20 > > >=20 > > > configure.php:110 >=20 > > >=20 > > > >=20 > > >=20 > > > > >=20 > > >=20 > > > >=20 > > >=20 > > > > I am running Apache on WinXP. I also have noticed=20 > that now >=20 > > that >=20 > > >=20 > > > the >=20 > > >=20 > > > >=20 > > >=20 > > > > headers.php is in configure.php the redirects to=20 > the login >=20 > > page >=20 > > >=20 > > > don't work >=20 > > >=20 > > > >=20 > > >=20 > > > > anymore because the headers are already sent. These might > be >=20 > > >=20 > > > related >=20 > > >=20 > > > >=20 > > >=20 > > > > issues. >=20 > > >=20 > > > >=20 > > >=20 > > > > >=20 > > >=20 > > > >=20 > > >=20 > > > > I am almost done with the admin teachers pages I=20 > just have one >=20 > > >=20 > > > question >=20 > > >=20 > > > >=20 > > >=20 > > > > about deleting a teacher. Is a teacher allowed to=20 > be deleted >=20 > > if a >=20 > > >=20 > > > course >=20 > > >=20 > > > >=20 > > >=20 > > > > they are teaching already has had tests or has=20 > students >=20 > > enrolled? >=20 > > >=20 > > > I would >=20 > > >=20 > > > >=20 > > >=20 > > > > say no, but I would like more input. In the=20 > meantime I am >=20 > > starting >=20 > > >=20 > > > work on >=20 > > >=20 > > > >=20 > > >=20 > > > > the admin classes pages. >=20 > > >=20 > > > >=20 > > >=20 > > > > >=20 > > >=20 > > > >=20 > > >=20 > > > > Jeremy >=20 > > >=20 > > > >=20 > > >=20 > > > > >=20 > > >=20 > > > >=20 > > >=20 > > > > >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > ------------------------------------------------------- >=20 > > >=20 > > > >=20 > > >=20 > > > > This SF.net email is sponsored by: IBM Linux=20 > Tutorials. >=20 > > >=20 > > > >=20 > > >=20 > > > > Become an expert in LINUX or just sharpen your=20 > skills. Sign up >=20 > > for >=20 > > >=20 > > > IBM's >=20 > > >=20 > > > >=20 > > >=20 > > > > Free Linux Tutorials. Learn everything from the=20 > bash shell to >=20 > > sys >=20 > > >=20 > > > admin. >=20 > > >=20 > > > >=20 > > >=20 > > > > Click now! >=20 > > =20 > http://ads.osdn.com/?ad_id=3D1278&alloc_id=3D3371&op=3Dclick >=20 > > >=20 > > > >=20 > > >=20 > > > > [INVALID FOOTER] >=20 > > >=20 > > > >=20 > > >=20 > > > -------Original Message------- >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > ------------------------------------------------------- >=20 > > >=20 > > > This SF.net email is sponsored by: IBM Linux Tutorials. >=20 > > >=20 > > > Become an expert in LINUX or just sharpen your skills.=20 > Sign up > for >=20 > > >=20 > > > IBM's Free Linux Tutorials. Learn everything from the=20 > bash shell to >=20 > > sys >=20 > > >=20 > > > admin. Click now! >=20 > > http://ads.osdn.com/?ad_id=1278&alloc_id371&op=3Dick >=20 > > >=20 > > > [INVALID FOOTER] >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > ------------------------------------------------------- >=20 > > >=20 > > > This SF.net email is sponsored by: IBM Linux Tutorials. >=20 > > >=20 > > > Become an expert in LINUX or just sharpen your skills.=20 > Sign up > for >=20 > > >=20 > > > IBM's Free Linux Tutorials. Learn everything from the=20 > bash shell to >=20 > > sys >=20 > > >=20 > > > admin. Click now! >=20 > > =20 > http://ads.osdn.com/?ad_id=3D1278&alloc_id=3D3371&op=3Dclick >=20 > > >=20 > > > [INVALID FOOTER] >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > ------------------------------------------------------- >=20 > > >=20 > > > This SF.net email is sponsored by: IBM Linux Tutorials. >=20 > > >=20 > > > Become an expert in LINUX or just sharpen your skills.=20 > Sign up > for >=20 > > IBM's >=20 > > >=20 > > > Free Linux Tutorials. Learn everything from the bash=20 > shell to > sys >=20 > > admin. >=20 > > >=20 > > > Click now!=20 > http://ads.osdn.com/?ad_id=1278&alloc_id371&op=3Dick >=20 > > >=20 > > > [INVALID FOOTER] >=20 > > >=20 > > > >=20 > > >=20 > > > >=20 > > >=20 > > > ------------------------------------------------------- >=20 > > >=20 > > > This SF.net email is sponsored by: IBM Linux Tutorials. >=20 > > >=20 > > > Become an expert in LINUX or just sharpen your skills.=20 > Sign up > for >=20 > > IBM's >=20 > > >=20 > > > Free Linux Tutorials. Learn everything from the bash=20 > shell to > sys >=20 > > admin. >=20 > > >=20 > > > Click now! >=20 > > =20 > http://ads.osdn.com/?ad_id=3D1278&alloc_id=3D3371&op=3Dclick >=20 > > >=20 > > > [INVALID FOOTER] >=20 > > >=20 > > -------Original Message------- >=20 > > >=20 > > >=20 > > >=20 > > >=20 > > >=20 > > >=20 > > ------------------------------------------------------- >=20 > > This SF.net email is sponsored by: IBM Linux Tutorials. >=20 > > Become an expert in LINUX or just sharpen your skills. Sign=20 > up for > IBM's >=20 > > Free Linux Tutorials. Learn everything from the bash shell to > sys admin. >=20 > > Click now!=20 > http://ads.osdn.com/?ad_id=3D1278&alloc_id=3D3371&op=3Dclick >=20 > > [INVALID FOOTER] >=20 > -------Original Message------- >=20 >=20 >=20 >=20 >=20 >=20 > --__--__-- >=20 > Message: 2 > From: Chris Wanstrath <ch...@ba...> > To: ete...@li... > Subject: Re: [Etest-devel] warnings and other questions > Date: Fri, 12 Dec 2003 13:54:01 +0000 > Reply-To: ete...@li... >=20 > =3D2D----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > On Friday 12 December 2003 06:36 pm, Jeremy Eden wrote: > > I think I figured out why it was giving me those warnings. There=20 > > are bla=3D > nk > > lines after the last '?>' in configure.php and mysql_sessions.inc.php.=3D20 > > This is somehow causing the headers to be sent because when I=20 > > removed them > > I was working again just fine and the sessions were working with no=20 > > more warnings. I don't know if this blank is being seen as html=20 > > code. Does th=3D > is > > make sense to anyone? >=20 > Yes, I should have looked for that but it never occured to me. I've=20 > had th=3D > at=3D20 > problem before. The blank line is sent as \n which is not rendered in HTML=3D > =3D20 > but is printed, nonetheless. So technically, there was information=20 > sent. =3D > =3D20 > Nice catch. >=20 > =3D2D --=3D20 > Chris Wanstrath > ch...@ba... | www.badstatic.com >=20 > =3D2D----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.3 (GNU/Linux) >=20 > iD8DBQE/2ch7P8e1G1N5RJkRAjAnAJ9KE5FKvbIs1HmO/wovY9u6CR4gCQCdGHeO > A3RC9icbxuV8uJatzBQ5ygg=3D3D > =3D3DzMMs > =3D2D----END PGP SIGNATURE----- >=20 >=20 >=20 > --__--__-- >=20 > Message: 3 > From: "=3D?iso-8859-1?B?Q3JhaWcgUCBKb2xpY29ldXI=3D?=3D" <cpj...@th...> > To: ete...@li... > Date: Fri, 12 Dec 2003 14:35:37 -0500 > Subject: [Etest-devel] =3D?iso-8859-1?B? UmU6IFJlOiBbRXRlc3QtZGV2ZWxdIFJlOiBSZTogW0V0ZXN0LWRldmVsXSBSZTogUmU6IFtF dGVz dC1kZXZlbF0gUmU6IFtFdGVzdC1kZXZlbF0gd2FybmluZ3MgYW5kIG90aGVyIHF1ZXN0aW9u cw=3D=3D ?=3D > Reply-To: ete...@li... >=20 > that kind of makes sense if that was your problem. if there are some <cr><lf> characters for newlines that are being output to the browser, if=20 would affect the headers. all headers have to be sent before any output unless you buffer the output (which we dont). >=20 >=20 >=20 > cpj >=20 >=20 >=20 >=20 >=20 >=20 >=20 > -------Original Message------- >=20 > > From: Jeremy Eden <ede...@ho...> >=20 > > Subject:=3D20 >=20 > Re: [Etest-devel] Re: Re: [Etest-devel] Re: Re: [Etest-devel] Re:=20 > [Etest- devel] warnings and other questions >=20 > > Sent: Dec 12 2003 13:36:59 >=20 > > >=20 > > I think I figured out why it was giving me those warnings.=3DA0=3DA0There are blank >=20 > > lines after the last '?>' in configure.php and mysql_sessions.inc.php.=3DA0=3DA0This >=20 > > is somehow causing the headers to be sent because when I removed them I was >=20 > > working again just fine and the sessions were working with no=20 > more warnings. >=20 > > I don't know if this blank is being seen as html = code.=3DA0=3DA0Does this make sense >=20 > > to anyone? >=20 > > =3D20 >=20 > > ----- Original Message ----- >=20 > > From: "Craig P Jolicoeur" >=20 > > To: >=20 > > Sent: Friday, December 12, 2003 12:35 PM >=20 > > Subject: [Etest-devel] Re: Re: [Etest-devel] Re: Re:=20 > [Etest-devel] Re: >=20 > > [Etest-devel] warnings and other questions >=20 > > =3D20 >=20 > > =3D20 >=20 > > we arent calling the sess_init().=3DA0=3DA0we set up the = varibles in configure.php >=20 > > so we dont need to call sess_init().=3DA0=3DA0there will be not documentation on it >=20 > > since it isnt an actually PHP builtin function but a=20 > user-defined function. >=20 > > but, we arent calling it right now, we set up the variables ourselves in >=20 > > configure.php that sess_init() would have set up. >=20 > > =3D20 >=20 > > =3D20 >=20 > > =3D20 >=20 > > =3D20 >=20 > > =3D20 >=20 > > =3D20 >=20 > > =3D20 >=20 > > =3DA0=3DA0 -------Original Message------- >=20 > > =3D20 >=20 > > =3DA0=3DA0 > From: Jeremy Eden >=20 > > =3D20 >=20 > > =3DA0=3DA0 > Subject: >=20 > > =3D20 >=20 > > Re: [Etest-devel] Re: Re: [Etest-devel] Re: [Etest-devel]=20 > warnings and other >=20 > > questions >=20 > > =3D20 >=20 > > =3DA0=3DA0 > Sent: Dec 12 2003 11:03:39 >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0How does the sess_init function get = called? I=20 > don't see any call to >=20 > > it and >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0I don't see any mention of it in the PHP = docs. >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0----- Original Message ----- >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0From: "Craig P Jolicoeur" >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0To: >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0Sent: Friday, December 12, 2003 10:45 AM >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0Subject: [Etest-devel] Re: Re: = [Etest-devel] Re: [Etest-devel] >=20 > > warnings and >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0other questions >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0why dont you just change your etest user = password to 'protocol' in >=20 > > your >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0database so you dont have to make that = change everytime?? that is >=20 > > the >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0correct password we are using now. >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0i dont know what to tell you. I have no = more=20 > ideas. maybe some of >=20 > > the >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0others can help you. Chris?? Brad?? any = ideas. are you guys having >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0problems to or are you fine like me? >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0cpj >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0-------Original Message------- >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> From: Jeremy Eden >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> Subject: >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0Re: [Etest-devel] Re: [Etest-devel] = warnings and other questions >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> Sent: Dec 12 2003 10:15:41 >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> I have done some more looking and the = sessions=20 > are not working >=20 > > on >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0my machine >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> at all. Is there something else that = needs to be done with the >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0change from >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> having sessions stored to a directory = vs. stored > in the >=20 > > database. >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0Something >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> like a PHP.INI change? I am stuck until = the sessions work on >=20 > > my >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0machine. I >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> can't even continue developing since I = can't get past the >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0admin_home page. >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> The only change that I did, was to the configure.php file. I >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0changed the >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> DB_HOST to be 'localhost' instead of = 'mysql' because the check >=20 > > for >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0the >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> localhost IP doesn't work on my machine = because=20 > my server has >=20 > > a >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0static IP. >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> I also changed the DBPassword to 'etest' = instead of 'protocol' >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0because that >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> was how I had setup the MySQL database = before.=20 > It doesn't seem >=20 > > like >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0either >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> of these two changes should affect = sessions=20 > though. Any ideas? >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> ----- Original Message ----- >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> From: "Craig P Jolicoeur" >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> To: >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> Sent: Friday, December 12, 2003 7:39 AM >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> Subject: RE: [Etest-devel] Re: = [Etest-devel] warnings and >=20 > > other >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0questions >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> I am not sure what to tell you. The = admin and student pages >=20 > > work >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0fine >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> on my machine, and on the live = sourceforge site. There are no >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0errors >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> being thrown like that. The sessions = work fine.=20 > I am not sure >=20 > > where >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> your problem is coming from. Is anyone = else=20 > having the same >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0problem?? >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> My thoughts are that it is probably = something on your machine >=20 > > since >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0it >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> works fine for me and on the sf site. >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> You may still see some records in the etest_sessions table but >=20 > > they >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0most >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> likely are expired. The will still be = there if=20 > the user didn't >=20 > > log >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0out >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> and just closed the browser or something = like=20 > that. The reason >=20 > > they >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0are >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> there is no garbage collection has been = run on expired >=20 > > sessions. I >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0will >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> have to implement something for that = soon. >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> -----Original Message----- >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> From: = ete...@li... >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> = [mailto:ete...@li...] > On Behalf Of >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0Jeremy >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> Eden >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> Sent: Friday, December 12, 2003 6:55 AM >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> To: ete...@li... >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> Subject: Re: [Etest-devel] Re: = [Etest-devel] warnings and >=20 > > other >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> questions >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> I am starting my pages like you have in = the=20 > example and it is >=20 > > still >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> giving those warnings and the redirect = to the=20 > login page >=20 > > doesn't >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0work >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> either because the headers are already = sent. It happens also >=20 > > with >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0the >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> student pages not just the admin pages. = Before logging in a >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0student, go >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> to student_grade.php as an example and = you=20 > should be >=20 > > redirected to >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0login >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> the student but instead I get warnings = saying=20 > the headers are >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0already >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> sent and that is all I see. I have the = latest=20 > from CVS, my >=20 > > database >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0is >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> setup with etest_mysql_import.sql and = this is=20 > still happening. >=20 > > I am >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> running the website on a WinXP Home, = MySQL=20 > 4.0.16, PHP 4.3.3 >=20 > > and >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0Apache >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> 1.3. >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> If no one is connected to the etest = website (on=20 > my webserver) >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0should I >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> still see records in the etest_sessions = table? >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> For the logout.php file the admin pages = only set >=20 > > 'adminusername' >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0and >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> 'Admin_Name' SESSION vars. >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> ----- Original Message ----- >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> From: "Craig P Jolicoeur" >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> To: >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> Sent: Thursday, December 11, 2003 2:04 = PM >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> Subject: [Etest-devel] Re: [Etest-devel] = > warnings and other >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0questions >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> This is how you should start your pages = now.=20 > just include the >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> configure.php file and then do your = $_SESSION ['username'] >=20 > > check to >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0see >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> if the user is logged in. then setup = your=20 > variables and >=20 > > include >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> html_header.php. Thats all you need to = do now.=20 > The >=20 > > configure.php >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0files >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> does everything for you. It sets all the = > variable constants, >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0includes >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> the header.php file, setups the MySQL = session management file, >=20 > > and >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0then >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> starts your session. All of this is done = for you now in the >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> configure.php file. just start your = pages like >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> this: >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> require('../includes/configure.php'); >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> if (!isset($_SESSION['username'])) >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> { >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> header("location: ../index.php"); >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> exit; >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> } >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> $pagetitle =3D3D "View Grades"; >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> $stylesheet =3D3D "student_basics.css"; >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> $navbarname =3D3D >=20 > > =3D20 >=20 > > =3DA0=3DA0 = >=3DA0=3DA0"../student_navbar/student_navbar_print.inc"; >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> require('../includes/html_header.php'); >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> if you are doing that, it should work = fine for=20 > you. also, you >=20 > > need >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0to >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> make sure your database is set up = correctly to handle the new >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0session >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> management table. import the=20 > etest_mysql_import.sql file into >=20 > > your >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0db >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> to set it up properly. >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> about deleting teachers, no teacher = should be deleted if they >=20 > > have >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> associated tests, courses, etc... Really = a=20 > teacher shouldnt >=20 > > have to >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0be >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> deleted, since schools will probably = want to=20 > keep records of >=20 > > them >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0on >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> file for a long time, but we still = should allow them to be >=20 > > deleted >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0if >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> they truly do want to. >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> craig >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> -------Original Message------- >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > From: Jeremy Eden >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > Subject: >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> [Etest-devel] warnings and other = questions >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > Sent: Dec 11 2003 12:47:18 >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > After updating this morning I started = getting=20 > PHP >=20 > > warnings on >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> every admin >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > page, see below: >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > Warning: session_start() Cannot send = session cookie - >=20 > > headers >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> already sent >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > by (...mysql_sessions.inc.php:636) in configure.php:110 >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > Warning: session_start() Cannot send = session=20 > cache >=20 > > limiter - >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> headers >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > already sent by=20 > (...mysql_sessions.inc.php:636) in >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> configure.php:110 >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > I am running Apache on WinXP. I also = have=20 > noticed that >=20 > > now >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0that >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> the >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > headers.php is in configure.php the = redirects=20 > to the >=20 > > login >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0page >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> don't work >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > anymore because the headers are = already sent. These might >=20 > > be >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> related >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > issues. >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > I am almost done with the admin = teachers pages > I just >=20 > > have one >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> question >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > about deleting a teacher. Is a teacher = allowed > to be >=20 > > deleted >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0if a >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> course >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > they are teaching already has had = tests or has students >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0enrolled? >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> I would >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > say no, but I would like more input. = In the meantime I am >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0starting >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> work on >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > the admin classes pages. >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > Jeremy >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> > >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > -------------------------------------------------- ----- >=20 > > =3D20 >=20 > > =3DA0=3DA0 > >=20 > > =3D20 >=20 > > =3DA0=3DA0 >=3DA0=3DA0> >=20 > > =3D20 >=20 > > =3DA... [truncated message content] |