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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
enoc22
Forum Commoner
Posts: 33
Joined: Wed Apr 01, 2009 12:45 pm

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

Post 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
Attachments
blog.zip
The blog files
(31.9 KiB) Downloaded 4 times
temidayo
Forum Contributor
Posts: 109
Joined: Fri May 23, 2008 6:17 am
Location: Nigeria

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

Post 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.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

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

Post 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 ;)
enoc22
Forum Commoner
Posts: 33
Joined: Wed Apr 01, 2009 12:45 pm

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

Post 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
Post Reply