"You can disable this functionality.." <--How

Jester2000
Jester2000's picture

Joined: 2003-06-24
Posts: 40
Posted: Tue, 2003-06-24 15:17

At the bottom of my Gallery I get this warning message:

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

My gallery seems to be working fine, and I don't have access or anything to update to the newest PHP... so I think that I want to disable this functionality. But how do you set session.bug_compat_42 or session.bug_compat_warn to off??

Thanks,

Jess
www.unicycle.com2.info

----
Give us your Gallery/webserver information to get a faster answer.
Get this information from the PHP diagnostic (in the configuration wizard).
Gallery URL (optional but very useful): http://www.creativeartist.net/jester/gallery_1
Gallery version: 1.3.3.
Apache version:
PHP version (don't just say PHP 4, please): 4.3.0 (i think)
Graphics Toolkit:
Operating system: Window xp
Web browser/version (if applicable):

I'm not sure about some of those... but I got some info off NETCRAFT about my server:

Web Server/0.1 (Unix) PHP/4.3.0 mod_gzip/1.3.19.1a mod_fastcgi/2.2.12 mod_perl/1.27 mod_ssl/2.8.12 OpenSSL/0.9.6d on Linux.

Go here for more info about the server:
http://uptime.netcraft.com/up/graph/?host=www.cihnetworks.com.
[/u]

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Tue, 2003-06-24 15:22

One way is checking FAQ C.18 :)

 
Jester2000
Jester2000's picture

Joined: 2003-06-24
Posts: 40
Posted: Tue, 2003-06-24 16:58

Thanks h0bbel!

This is what it says in the FAQs:

You can make it go away by editing your php.ini and setting
session.bug_compat_42 to off
or
session.bug_compat_warn to off

and then restarting Apache. Alternatively, you can edit your .htaccess file and put this line in it:

php_flag session.bug_compat_warn off

Well since I only have ftp access, I edited .htaccess

But it still didn't work.. UNTIL I added <server>php_flag session.bug_compat_warn off </server>

It works now :D

Thanks!

-=Jess=-

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Tue, 2003-06-24 17:14

as stated in the faq. :) Great you got it working!

 
Jester2000
Jester2000's picture

Joined: 2003-06-24
Posts: 40
Posted: Tue, 2003-06-24 17:35

Oh no! :(

I thought I had it working, because I refreshed the page. It turns out, when you refresh the page (with the error on it) it dissappears. Hmmmm... Well I don't know how to do this now.

I need help again! (i only have ftp access)

-Jess

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Tue, 2003-06-24 17:45

What does your .htaccess look like, can you post it here?

Edit:

You may also need to add one of the following lines (try one at the time) to your .htaccess file:

php_flag register_globals on
php_value register_globals 1

 
Jester2000
Jester2000's picture

Joined: 2003-06-24
Posts: 40
Posted: Tue, 2003-06-24 21:37

Well when I opened for the 1st time there was nothing in it. So I added:
php_flag session.bug_compat_warn off

should I keep that in there?

Should it look like this:

php_flag session.bug_compat_warn off
php_flag register_globals on

or this:

php_flag session.bug_compat_warn off
php_value register_globals 1

Or ???

Thanks, I really appreciate the help,

Jess

 
Jester2000
Jester2000's picture

Joined: 2003-06-24
Posts: 40
Posted: Tue, 2003-06-24 21:57

I don't understand... it doesn't even seem to need the .htaccess file.
I deleted it (with a backup on my comp) and the gallery still works.. hmmm.. I tried a lot of combinations with:

php_flag session.bug_compat_warn off
php_value register_globals 1
php_flag session.bug_compat_warn off

Er...I'm lost..

Please help me,

Jess

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Tue, 2003-06-24 22:02
 
Jester2000
Jester2000's picture

Joined: 2003-06-24
Posts: 40
Posted: Tue, 2003-06-24 22:21

Ok that makes sense... however there was nothing in my .htaccess file when I got it off my remote server to make the original change (or add-in):

php_flag session.bug_compat_warn off

Was should be in there??

Thanks,

Jess

 
Jester2000
Jester2000's picture

Joined: 2003-06-24
Posts: 40
Posted: Sun, 2003-06-29 19:09

Please help! How do I get the .htaccess file working again? I don't think it was ever using it... i dunno! I'm just confused about the .htaccess file..

Thanks in advance,

Jess

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Sun, 2003-06-29 19:16

Just delete the .htaccess, re-run the config wizard and after saving settings add "php_flag session.bug_compat_warn off" to it afterwards.

 
Jester2000
Jester2000's picture

Joined: 2003-06-24
Posts: 40
Posted: Sun, 2003-06-29 19:21

Ok sounds great h0bbel!

But- I'm kinda nervous about just re-running the config wizard.
Do you think you could give me a more detailed newbie-geared reply on how to do this safely?

I'm just curious- If I just downloaded the albums folder to my comp.. Is that all I need to back it up later on? Could I just re-install Gallery and copy the albums folder to the designated gallery albums folder?

Thanks for helping!!

Jess

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Sun, 2003-06-29 19:34

Well, you should be able to run the config again without any problems at all. As long as you have a backup of the albums/ and subdirs, you should be all set!

 
dinosm

Joined: 2003-07-23
Posts: 11
Posted: Wed, 2003-07-23 16:36

Hi y'all,

I have the same problem with this warning message.
I've read the FAQ of course, but I'm confused about the .htaccess file. Which one do I have to put this statement into, and where is it? Is it the one in my gallery directory?

I've tried putting

php_flag session.bug_compat_warn off
php_flag register_globals on

as well as

php_flag session.bug_compat_warn off
php_value register_globals 1

in the .htaccess file that is in my gallery's directory (which was empty before my editing it), but it did no good.

Which .htaccess file should I edit, and is there any way this will actually work?

Note: I am not root on the server so I cannot edit php.ini.

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Wed, 2003-07-23 16:52

php_flag session.bug_compat_warn off should do it, as long as your host allows php.ini overrides in .htaccess. And you are right, its tha .htaccess in your gallery dir.

 
dinosm

Joined: 2003-07-23
Posts: 11
Posted: Wed, 2003-07-23 21:45

How can I tell whether my host allows php.ini overrides in .htaccess - or maybe evn change it so that it does?

 
h0bbel
h0bbel's picture

Joined: 2002-07-28
Posts: 13451
Posted: Wed, 2003-07-23 22:12

dinosm, basically if it doesn't work, they don't allow it. :)

But, you could always contact your host with this info, and ask if they could fix it in their main php config.

 
dinosm

Joined: 2003-07-23
Posts: 11
Posted: Wed, 2003-07-23 23:47

Right!

Thanks for your help! :D

 
Jester2000
Jester2000's picture

Joined: 2003-06-24
Posts: 40
Posted: Tue, 2003-10-07 06:27

I'm still stuck.... ugh..

please help!

-Jess

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Tue, 2003-10-07 08:13

I don't feel like reading the whole thread. Can you summarize, or start a new one?

 
Jester2000
Jester2000's picture

Joined: 2003-06-24
Posts: 40
Posted: Tue, 2003-10-07 14:03