Session Management problems [LONG]

From: Date: Sun, 02 Jul 2000 23:31:35 +0000
Subject: Session Management problems [LONG]
Groups: php.general 
Request: Send a blank email to php-general+get-4409@lists.php.net to get a copy of this message
Hi there, my name is Roberto and I am from Italy, so, first of all, excuse me for my English! ;[ I am developing a search engine which deeply uses Linux+PHP4+Apache(SSL). I started the development with php3 and I wrote down my own session management routines. Since PHP4 session management is really better than mine (well... it's not so difficult ) I upgraded my webserver and my code to php4 to use the session management features of PHP4, but I got problems from the first official release PHP4.0.0 . First of all, I need to explain how the search engine front end works: the system presents to the traveller a pull down menu with a static number of world zones (such as North and South America, Africa, Europe, etc.). The traveller choose his destination and clicks on the submit button. The second page should: - register in a session the chosen zone; - present to the traveller a dynamically built pull down menu with the nations (in the chosen zone) for which I can offer a tour (e.g.: Europe -> {Italy, French, Spain, UK}) The traveller choose the nation and clicks on the submit button. The third page should: - register in a session the chosen nation; - present to the traveller a dynamically built pull down menu with the cities (in the chosen nation) for which I can offer a tour (e.g.: Italy -> {Rome, Milan, Florence}) The traveller clicks on the submit button and the system presents all the offers we have for that destination. Now, the problem is that sometimes it works, sometimes it does not work! Specifically PHP creates a new session from step1 (WorldZone) to step2 (Nations) and create a new one from step2 (Nations) to step3 (Cities) and then uses this last created session until the end but if the traveller hits the back button on the page the system goes crazy saying that there is no tour for that destination (but I'm sure that this is not true!). Because of using some maps on each page I can recognize when there is no tour really from when it is an error. In fact, when PHP drops the session infos, there is no map on the page (in fact maps are inserted dynamically on the page referring to the zone and nations). There is an easy workaround for this problem: I could use hidden fields in the form, but I heavily use sessions in the Tour Operators front end. Tour Operators use a different front end to the database that let them insert new offers in the database. E.g.: the insertion is a 10 steps operation. Each step asks something to the TO (the zone, the nation, the city, the offer name, the offer description, prices, etc.) and each page stores this infos in the session object. At the end the system performs some checks to validate all the data inserted by the TO (eg it check departure date, number of rooms etc) and only after thess checks it stores everything on the database. So it is very annoying that sometimes PHP drops the session data sending the TO back to the login page. Since this morning I have one more problem: PHP4.0.1 with Apache+ModSSL creates session files in the /tmp directory, but all these files are empty (zero length), so the system cannot work at all! Please, help me. I think I've tried everything: with cookies, without cookies, with trans-sid, without trans-sid, with session_auto_start and without it. I don't know what to do. Thank you in advance, Roberto Cespa -- Colombo2000 http://www.colombo2000.it Il tuo prossimo viaggio comincia qui Your next travel starts here

« previous php.general (#4409) next »