Gallery possibly relying on no longer existing session side-

nsiu

Joined: 2003-01-27
Posts: 2
Posted: Mon, 2003-01-27 08:08

Hello,

The web server I'm running gallery on recently upgraded from php 4.2.2 to php 4.3.0 , and now I receive the following warning message at the bottom of the page whenever Gallery creates a new php session:

Warning: Unknown(): Your script possibly relies on a session side-effect
which existed until PHP 4.2.3. Please be advised that the session extension
does not consider global variables as a source of data, unless
register_globals is enabled. You can disable this functionality and this
warning by setting session.bug_compat_42 or session.bug_compat_warn
to off, respectively. in Unknown on line 0

After the session is created, the warning message no longer appears on subsequent loading of the pages. Just wondering: is Gallery indeed using this no longer supported "session side-effect", and if so, could I request that the code is updated so that the warning message is no longer displayed? Also, is anyone else experiencing this? Currently, I'm running Gallery 1.3.1 .

I guess this is only a "cosmetic" issue for now, as everything else working fine, although it'd be nice if the message went away :wink: , especially for those who don't have access to php.ini to turn of this warning message. If you're interested, you can see the warning message by going to

http://www.hanneth.com/~nsiu/gallery/

In any case, I'd like to say "thanks!" for the great work you guys are doing with Gallery, in both Gallery itself and the user support you guys give! :razz:

Nestor Siu

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Mon, 2003-01-27 12:43

PHP likes to throw this warning at Gallery, though it doesn't seem to have any effect..

To disable it, set either on of those php.ini settings in php.ini or add this to your .htaccess file for gallery

php_value session.bug_compat_42 0

(not tested, but I don't see why it shouldn't work -- if you have access, use php.ini instead)

 
nsiu

Joined: 2003-01-27
Posts: 2
Posted: Thu, 2003-01-30 08:19

Hi Andrew,

The server I'm running Gallery on actually has 'session.bug_compat_42' set to "on", and it also has 'session.bug_compat_warn' set to "on". The server doesn't have .htaccess enabled, so I couldn't set things there. I also didn't want to bug the Webmaster to ask him to change PHP.INI so I tried to turn the warning message off by using ini_set() and it worked!!

I added

<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>ini_set( "session.bug_compat_warn", "off" );</TD></TR></TABLE><!-- BBCode End -->

to the beginning of init.php (so that the command would be run by every main php file, although now that I think about it, adding the command to the beginning of session.php might make more sense), and the warning message no longer appears.

This could be handy for people who don't have access to .htaccess nor php.ini.

Nestor

 
sudheerkumar

Joined: 2008-11-04
Posts: 1
Posted: Tue, 2008-11-04 07:05

Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0