php-general Digest 7 Dec 2009 05:47:41 -0000 Issue 6474

Topics (messages 300259 through 300262):

session overwriting global
        300259 by: Horváth Károly
        300260 by: Shawn McKenzie
        300261 by: Horváth Károly

includes linking to other files, help with relatives
        300262 by: Allen McCabe

Administrivia:

To subscribe to the digest, e-mail:
        [email protected]

To unsubscribe from the digest, e-mail:
        [email protected]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
Hi,

I have a very strange problem.
I am the new developer of an existing site. They have a custom session handler that stores the session in the database. The application connects to the database, registers the session handler with session_set_save_handler. Nothing interesting so far. Then it calls session_start which updates one of the global variables!!! I checked the session read(..) method and just before returning the global is untocuhed.
Can anybody explain how could that happen?

additional info:
the global variable is also stored in the session.
php 4.4.9, the problem only occurs on the dev server and not on the live site, and only with https! as far as we know the server configurations are identical except that that on the dev server we have an ssl certificate which is not verified so the browser shows the usual warning/accept certificate message.


--- End Message ---
--- Begin Message ---
Horváth Károly wrote:
> Hi,
> 
> I have a very strange problem.
> I am the new developer of an existing site. They have a custom session
> handler that stores the session in the database. The application
> connects to the database, registers the session handler with
> session_set_save_handler. Nothing interesting so far.
> Then it calls session_start which updates one of the global variables!!!
> I checked the session read(..) method and just before returning the
> global is untocuhed.
> Can anybody explain how could that happen?
> 
> additional info:
> the global variable is also stored in the session.
> php 4.4.9, the problem only occurs on the dev server and not on the live
> site, and only with https! as far as we know the server configurations
> are identical except that that on the dev server we have an ssl
> certificate which is not verified so the browser shows the usual
> warning/accept certificate message.
> 

register_globals = On in php.ini?

-- 
Thanks!
-Shawn
http://www.spidean.com

--- End Message ---
--- Begin Message ---
Shawn McKenzie írta:
Horváth Károly wrote:
Hi,

I have a very strange problem.
I am the new developer of an existing site. They have a custom session
handler that stores the session in the database. The application
connects to the database, registers the session handler with
session_set_save_handler. Nothing interesting so far.
Then it calls session_start which updates one of the global variables!!!
I checked the session read(..) method and just before returning the
global is untocuhed.
Can anybody explain how could that happen?

additional info:
the global variable is also stored in the session.
php 4.4.9, the problem only occurs on the dev server and not on the live
site, and only with https! as far as we know the server configurations
are identical except that that on the dev server we have an ssl
certificate which is not verified so the browser shows the usual
warning/accept certificate message.


register_globals = On in php.ini?

no.....

--- End Message ---
--- Begin Message ---
I am creating a database connection path that check for a session variable
to get the username, password, dbname, etc., but if the session has not been
set yet, I need my script to get those values from another file
(KEY.txt) where they are saved. I want to access this class from two
directories, and this text file (KEY.txt) is in a directory above both. Like
this:

root: folder1 - folder2

folder1: KEY.txt

folder2: index.php - database.php - folder3

folder3: index.php

I need to use database.php in both index files, but database.php references
KEY.txt. So my question is, do I have to check which directory the calling
script is in (ie. which index.php file is using database.php) and add the
according up directory references, or do I need to use some kind of
$_SERVER[DOCUMENT_ROOT]
thing?

Any help would be appreciated!

--- End Message ---

Reply via email to