From: <cpj...@th...> - 2003-12-12 17:33:42
|
we arent calling the sess_init(). we set up the varibles in configure.php so we dont need to call sess_init(). there will be not 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 in configure.php that sess_init() would have set up. -------Original Message------- > From: Jeremy Eden <ede...@ho...> > Subject:=20 Re: [Etest-devel] Re: Re: [Etest-devel] Re: [Etest-devel] warnings and other questions > Sent: Dec 12 2003 11:03:39 > > How does the sess_init function get called?=A0=A0I don't see any call to it and > I don't see any mention of it in the PHP docs. > ----- Original Message ----- > From: "Craig P Jolicoeur" > To: > Sent: Friday, December 12, 2003 10:45 AM > Subject: [Etest-devel] Re: Re: [Etest-devel] Re: [Etest-devel] warnings and > other questions > =20 > =20 > why dont you just change your etest user password to 'protocol' in your > database so you dont have to make that change everytime??=A0=A0that is the > correct password we are using now. > =20 > =20 > =20 > i dont know what to tell you.=A0=A0I have no more ideas.=A0=A0maybe some of the > others can help you.=A0=A0Chris?? Brad?? any ideas.=A0=A0are you guys having > problems to or are you fine like me? > =20 > =20 > =20 > cpj > =20 > =20 > =20 > =20 > =20 > =20 > =20 > =A0=A0 -------Original Message------- > =20 > =A0=A0 > From: Jeremy Eden > =20 > =A0=A0 > Subject: > =20 > Re: [Etest-devel] Re: [Etest-devel] warnings and other questions > =20 > =A0=A0 > Sent: Dec 12 2003 10:15:41 > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0I have done some more looking and the sessions are not working on > my machine > =20 > =A0=A0 >=A0=A0at all. Is there something else that needs to be done with the > change from > =20 > =A0=A0 >=A0=A0having sessions stored to a directory vs. stored in the database. > Something > =20 > =A0=A0 >=A0=A0like a PHP.INI change? I am stuck until the sessions work on my > machine. I > =20 > =A0=A0 >=A0=A0can't even continue developing since I can't get past the > admin_home page. > =20 > =A0=A0 >=A0=A0The only change that I did, was to the configure.php file. I > changed the > =20 > =A0=A0 >=A0=A0DB_HOST to be 'localhost' instead of 'mysql' because the check for > the > =20 > =A0=A0 >=A0=A0localhost IP doesn't work on my machine because my server has a > static IP. > =20 > =A0=A0 >=A0=A0I also changed the DBPassword to 'etest' instead of 'protocol' > because that > =20 > =A0=A0 >=A0=A0was how I had setup the MySQL database before. It doesn't seem like > either > =20 > =A0=A0 >=A0=A0of these two changes should affect sessions though. Any ideas? > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0----- Original Message ----- > =20 > =A0=A0 >=A0=A0From: "Craig P Jolicoeur" > =20 > =A0=A0 >=A0=A0To: > =20 > =A0=A0 >=A0=A0Sent: Friday, December 12, 2003 7:39 AM > =20 > =A0=A0 >=A0=A0Subject: RE: [Etest-devel] Re: [Etest-devel] warnings and other > questions > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0I am not sure what to tell you. The admin and student pages work > fine > =20 > =A0=A0 >=A0=A0on my machine, and on the live sourceforge site. There are no > errors > =20 > =A0=A0 >=A0=A0being thrown like that. The sessions work fine. I am not sure where > =20 > =A0=A0 >=A0=A0your problem is coming from. Is anyone else having the same > problem?? > =20 > =A0=A0 >=A0=A0My thoughts are that it is probably something on your machine since > it > =20 > =A0=A0 >=A0=A0works fine for me and on the sf site. > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0You may still see some records in the etest_sessions table but they > most > =20 > =A0=A0 >=A0=A0likely are expired. The will still be there if the user didn't log > out > =20 > =A0=A0 >=A0=A0and just closed the browser or something like that. The reason they > are > =20 > =A0=A0 >=A0=A0there is no garbage collection has been run on expired sessions. I > will > =20 > =A0=A0 >=A0=A0have to implement something for that soon. > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0-----Original Message----- > =20 > =A0=A0 >=A0=A0From: ete...@li... > =20 > =A0=A0 >=A0=A0[mailto:ete...@li...] On Behalf Of > Jeremy > =20 > =A0=A0 >=A0=A0Eden > =20 > =A0=A0 >=A0=A0Sent: Friday, December 12, 2003 6:55 AM > =20 > =A0=A0 >=A0=A0To: ete...@li... > =20 > =A0=A0 >=A0=A0Subject: Re: [Etest-devel] Re: [Etest-devel] warnings and other > =20 > =A0=A0 >=A0=A0questions > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0I am starting my pages like you have in the example and it is still > =20 > =A0=A0 >=A0=A0giving those warnings and the redirect to the login page doesn't > work > =20 > =A0=A0 >=A0=A0either because the headers are already sent. It happens also with > the > =20 > =A0=A0 >=A0=A0student pages not just the admin pages. Before logging in a > student, go > =20 > =A0=A0 >=A0=A0to student_grade.php as an example and you should be redirected to > login > =20 > =A0=A0 >=A0=A0the student but instead I get warnings saying the headers are > already > =20 > =A0=A0 >=A0=A0sent and that is all I see. I have the latest from CVS, my database > is > =20 > =A0=A0 >=A0=A0setup with etest_mysql_import.sql and this is still happening. I am > =20 > =A0=A0 >=A0=A0running the website on a WinXP Home, MySQL 4.0.16, PHP 4.3.3 and > Apache > =20 > =A0=A0 >=A0=A01.3. > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0If no one is connected to the etest website (on my webserver) > should I > =20 > =A0=A0 >=A0=A0still see records in the etest_sessions table? > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0For the logout.php file the admin pages only set 'adminusername' > and > =20 > =A0=A0 >=A0=A0'Admin_Name' SESSION vars. > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0----- Original Message ----- > =20 > =A0=A0 >=A0=A0From: "Craig P Jolicoeur" > =20 > =A0=A0 >=A0=A0To: > =20 > =A0=A0 >=A0=A0Sent: Thursday, December 11, 2003 2:04 PM > =20 > =A0=A0 >=A0=A0Subject: [Etest-devel] Re: [Etest-devel] warnings and other > questions > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0This is how you should start your pages now. just include the > =20 > =A0=A0 >=A0=A0configure.php file and then do your $_SESSION['username'] check to > see > =20 > =A0=A0 >=A0=A0if the user is logged in. then setup your variables and include > =20 > =A0=A0 >=A0=A0html_header.php. Thats all you need to do now. The configure.php > files > =20 > =A0=A0 >=A0=A0does everything for you. It sets all the variable constants, > includes > =20 > =A0=A0 >=A0=A0the header.php file, setups the MySQL session management file, and > then > =20 > =A0=A0 >=A0=A0starts your session. All of this is done for you now in the > =20 > =A0=A0 >=A0=A0configure.php file. just start your pages like > =20 > =A0=A0 >=A0=A0this: > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0require('../includes/configure.php'); > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0if (!isset($_SESSION['username'])) > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0{ > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0header("location: ../index.php"); > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0exit; > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0} > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0$pagetitle =3D "View Grades"; > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0$stylesheet =3D "student_basics.css"; > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0$navbarname =3D > "../student_navbar/student_navbar_print.inc"; > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0require('../includes/html_header.php'); > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0if you are doing that, it should work fine for you. also, you need > to > =20 > =A0=A0 >=A0=A0make sure your database is set up correctly to handle the new > session > =20 > =A0=A0 >=A0=A0management table. import the etest_mysql_import.sql file into your > db > =20 > =A0=A0 >=A0=A0to set it up properly. > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0about deleting teachers, no teacher should be deleted if they have > =20 > =A0=A0 >=A0=A0associated tests, courses, etc... Really a teacher shouldnt have to > be > =20 > =A0=A0 >=A0=A0deleted, since schools will probably want to keep records of them > on > =20 > =A0=A0 >=A0=A0file for a long time, but we still should allow them to be deleted > if > =20 > =A0=A0 >=A0=A0they truly do want to. > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0craig > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0-------Original Message------- > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> From: Jeremy Eden > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> Subject: > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0[Etest-devel] warnings and other questions > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> Sent: Dec 11 2003 12:47:18 > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> After updating this morning I started getting PHP warnings on > =20 > =A0=A0 >=A0=A0every admin > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> page, see below: > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> Warning: session_start() Cannot send session cookie - headers > =20 > =A0=A0 >=A0=A0already sent > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> by (...mysql_sessions.inc.php:636) in configure.php:110 > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> Warning: session_start() Cannot send session cache limiter - > =20 > =A0=A0 >=A0=A0headers > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> already sent by (...mysql_sessions.inc.php:636) in > =20 > =A0=A0 >=A0=A0configure.php:110 > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> I am running Apache on WinXP. I also have noticed that now > that > =20 > =A0=A0 >=A0=A0the > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> headers.php is in configure.php the redirects to the login > page > =20 > =A0=A0 >=A0=A0don't work > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> anymore because the headers are already sent. These might be > =20 > =A0=A0 >=A0=A0related > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> issues. > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> I am almost done with the admin teachers pages I just have one > =20 > =A0=A0 >=A0=A0question > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> about deleting a teacher. Is a teacher allowed to be deleted > if a > =20 > =A0=A0 >=A0=A0course > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> they are teaching already has had tests or has students > enrolled? > =20 > =A0=A0 >=A0=A0I would > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> say no, but I would like more input. In the meantime I am > starting > =20 > =A0=A0 >=A0=A0work on > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> the admin classes pages. > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> Jeremy > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> ------------------------------------------------------- > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> This SF.net email is sponsored by: IBM Linux Tutorials. > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> Become an expert in LINUX or just sharpen your skills. Sign up > for > =20 > =A0=A0 >=A0=A0IBM's > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> Free Linux Tutorials. Learn everything from the bash shell to > sys > =20 > =A0=A0 >=A0=A0admin. > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> Click now! > http://ads.osdn.com/?ad_id=3D1278&alloc_id=3D3371&op=3Dclick > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0> [INVALID FOOTER] > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0-------Original Message------- > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0------------------------------------------------------- > =20 > =A0=A0 >=A0=A0This SF.net email is sponsored by: IBM Linux Tutorials. > =20 > =A0=A0 >=A0=A0Become an expert in LINUX or just sharpen your skills. Sign up for > =20 > =A0=A0 >=A0=A0IBM's Free Linux Tutorials. Learn everything from the bash shell to > sys > =20 > =A0=A0 >=A0=A0admin. Click now! > http://ads.osdn.com/?ad_id=1278&alloc_id371&op=3Dick > =20 > =A0=A0 >=A0=A0[INVALID FOOTER] > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0------------------------------------------------------- > =20 > =A0=A0 >=A0=A0This SF.net email is sponsored by: IBM Linux Tutorials. > =20 > =A0=A0 >=A0=A0Become an expert in LINUX or just sharpen your skills. Sign up for > =20 > =A0=A0 >=A0=A0IBM's Free Linux Tutorials. Learn everything from the bash shell to > sys > =20 > =A0=A0 >=A0=A0admin. Click now! > http://ads.osdn.com/?ad_id=3D1278&alloc_id=3D3371&op=3Dclick > =20 > =A0=A0 >=A0=A0[INVALID FOOTER] > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0------------------------------------------------------- > =20 > =A0=A0 >=A0=A0This SF.net email is sponsored by: IBM Linux Tutorials. > =20 > =A0=A0 >=A0=A0Become an expert in LINUX or just sharpen your skills. Sign up for > IBM's > =20 > =A0=A0 >=A0=A0Free Linux Tutorials. Learn everything from the bash shell to sys > admin. > =20 > =A0=A0 >=A0=A0Click now! http://ads.osdn.com/?ad_id=1278&alloc_id371&op=3Dick > =20 > =A0=A0 >=A0=A0[INVALID FOOTER] > =20 > =A0=A0 > > =20 > =A0=A0 > > =20 > =A0=A0 >=A0=A0------------------------------------------------------- > =20 > =A0=A0 >=A0=A0This SF.net email is sponsored by: IBM Linux Tutorials. > =20 > =A0=A0 >=A0=A0Become an expert in LINUX or just sharpen your skills. Sign up for > IBM's > =20 > =A0=A0 >=A0=A0Free Linux Tutorials. Learn everything from the bash shell to sys > admin. > =20 > =A0=A0 >=A0=A0Click now! > http://ads.osdn.com/?ad_id=3D1278&alloc_id=3D3371&op=3Dclick > =20 > =A0=A0 >=A0=A0[INVALID FOOTER] > =20 > =A0=A0 -------Original Message------- > =20 > =20 > =20 > =20 > =20 > =20 > ------------------------------------------------------- > This SF.net email is sponsored by: IBM Linux Tutorials. > Become an expert in LINUX or just sharpen your skills.=A0=A0Sign up for IBM's > Free Linux Tutorials.=A0=A0Learn everything from the bash shell to sys admin. > Click now! http://ads.osdn.com/?ad_id=3D1278&alloc_id=3D3371&op=3Dclick > [INVALID FOOTER] -------Original Message------- |