Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Session side effect warning

session

  • Please log in to reply
2 replies to this topic

#1 Alhazred

Alhazred

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 133 posts

Posted 02 April 2009 - 03:11 AM

I've written a php appication and linked it inside a Joomla1.5 site.
My application needs to write some variables into the session, but at the bottom of the page I get this 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

Those settings are written inside php.ini file, but I have no access to it.
Is there any other way to hide that message?
I'm a php newbie, so I could say a wrong thing, but I was thinking to something like this: is there a way to say to the page "if you receive a text with this words don't write it, throw it away"?
If it is not possible, how could I solve my problem?
  • 0

#2 Alhazred

Alhazred

    CC Addict

  • Advanced Member
  • PipPipPipPipPip
  • 133 posts

Posted 02 April 2009 - 03:59 AM

Solved using error_reporting(0);
  • 0

#3 Orjan

Orjan

    CC Mentor

  • Moderator
  • 2918 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#

Posted 02 April 2009 - 04:30 AM

You need to take action for what generated this warning instead of just turning the error message off. Exactly what is not good with your code is impossible to say with no further information.
  • 0

I'm a System developer at XLENT Consultant Group mainly working with SugarCRM.
Please DO NOT send mail or PM to me with programming questions, post them in the appropriate forum instead, where I and others can answer you.






Also tagged with one or more of these keywords: session

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download