tags:

views:

74

answers:

1

Hi,

I know this topic is bit old, but i did surf the web and php.net site but didn't find the answer that I was looking for or i got bit confused!! :( . Below is my scenario.

I have installed the latest WAMP (fresh copy) (PHP 5.3.1 Apache 2.2.14 MySql 5.1.36)

I installed the joomla 1.5.20 and was getting error on 2nd step with error regarding cookie not being stored or error with session.save_path.

After looking into session.save_path everything was good and also the cookies were stored. So no issues were there.

After debugging more into joomla files and changing configuration of php.ini file I found that changing the parameters of session.bug_compat_42 and session.bug_compat_warn to off in php.ini file, the installation went good.

This might help some one. But my question is, how does this affect the installation of joomla and how exactly both the values makes difference to php!!??

Can some one please give me bit more information. Thanks, Tanmay

+1  A: 

it means your session defines a variable which also exists in global scope. and php thinks you wrote the code in a version < php4.2 and assumes you are actually trying to access an "unset" session variable from global scope.

something like

$_SESSION["foo"] = null;
$foo = "bar";

causes a warning which you can ignore by setting those php.ini parameters to "0"

kali
Thanks for the reply. But even this doesn't make more sense to me as my register global value is off. So I guess there should not be any conflicts!! Let me know if I am wrong
jtanmay
there really is no conflict.all thats happenning is php thinks you've written this piece of code before php 4.2 and warns you that functionality is no longer available. it does not(or did not) depend on register globals
kali
@kali, so you are suggesting that the joomla should be having some depreciated code!?
jtanmay
no :sjoomla is not written prior to php 4.2$_SESSION["foo"] = null;$foo = "bar";or the opposite of this is probably happening.or most likely$_SESSION["foo"] = $aVariableThatJoomlaNormallyFindsButDoesNotExistInYourSystem;$foo = "bar";is happening in your case.so php just warns you that your version is bigger than 42 and you can not assign "bar" to $_SESSION["foo"] this way. (which ofcourse you've never intended!)
kali
@Kali, thanks for your reply. My confusion got more complicated yesterday!!! I installed WAMP in my PC(before I was trying at workstation at my office!), and the joomla 1.5.20 installation went smooth even though the above 2 PHP session parameters were ON. I'll try to debug more and let you know if I find any thing. Thanks for your reply again, marking as correct for me :)
jtanmay