X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 07651D1D370 for ; Thu, 8 Apr 2004 10:40:31 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 33558-06 for ; Thu, 8 Apr 2004 10:40:31 -0300 (ADT) Received: from smtp-out4.xs4all.nl (smtp-out4.xs4all.nl [194.109.24.5]) by svr1.postgresql.org (Postfix) with ESMTP id E8F66D1D097 for ; Thu, 8 Apr 2004 10:40:28 -0300 (ADT) Received: from localhost.localdomain (kiar.xs4all.nl [80.126.234.5]) by smtp-out4.xs4all.nl (8.12.10/8.12.10) with ESMTP id i38DeWCY095597 for ; Thu, 8 Apr 2004 15:40:32 +0200 (CEST) Received: by localhost.localdomain (Postfix, from userid 500) id E7009B6ED0; Thu, 8 Apr 2004 15:40:31 +0200 (CEST) Date: Thu, 8 Apr 2004 15:40:31 +0200 From: Joolz To: list-postgresql-php Subject: session_is_started() Message-ID: <20040408134031.GA13236@localhost.localdomain> Reply-To: pgsql-php@postgresql.org Mail-Followup-To: list-postgresql-php Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/14 X-Sequence-Number: 2671 Hello, I'm makeing a PHP frontend to a postgresql db, and want to use sessions in order to sore global variables. I read that it's enough to put session_start() in the top file of the app, but that doesn't work, when I go two or three PHP files "deep", the session is forgotten. To workaround this, I tried putting session_start() at the begonning of every PHP file that does something with session variables. This however gives me lot of these errors: "Notice: A session had already been started - ignoring session_start() in [scriptname] on line 5" I would like something like if (!session_is_started()) { // note: this function doesn't exist session_start(); } How have you solved this problem? Thanks for any tips! -- 15:36-15:40 Fedora Core release 1 (Yarrow) Linux 2.4.22-1.2174.nptl