Page 1 of 1

Strange error "Warning: Unknown: Your script possibly......"

Posted: Sat Apr 04, 2009 1:13 am
by enoc22
Hi all,
i am getting a strange error(strange to me)
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

I am Trying to create a small blog type site(using xampp) with login(using a mysql database)
i loggin fine, but when i got to a nother page on the site then click the link to the home page i get the above error and it's like the session that holds the password and user name got unset. i don't know how.
i will up load the file of the php files and see what you php masters think

Thanks in Advance

Oliver
P.s. sorry if my code is messy. I'm still a total newby in php and haven't got everything down yet

Re: Strange error "Warning: Unknown: Your script possibly......"

Posted: Sat Apr 04, 2009 1:24 am
by temidayo
It will be better if u can paste portion of the page from which you are getting the error on the forum.

However, you are getting that error because you probably have a boolean variable that is 'unset' or not initialised.

For example you are doing something like

if ($page){
//perform action
}

while that variable has not been previously initiated. It is a security risk and that is why you are getting
that warning. There is a way to suppress the warning from php.ini file but it will not take the security away
the code needs to be checked.

Re: Strange error "Warning: Unknown: Your script possibly......"

Posted: Sat Apr 04, 2009 2:47 am
by Benjamin
enoc22 wrote:i will up load the file of the php files and see what you php masters think
PHP Masters think you should read the error message and consult the manual ;)

Re: Strange error "Warning: Unknown: Your script possibly......"

Posted: Mon Apr 06, 2009 7:49 pm
by enoc22
Hi,
Thanks for the Replies.
sorry if i was a bit lazy. i will look harder in php.net. ect next time.
i am just going to re-write the whole thing(i want to add some design and simplify the code a bit)Thanks for your help

A newby
Enoc22