session error with the google maps plugin

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

Any idea how to get read of this thing? I know it is for sure from the map plugin

  • Adam Czajczyk
    • Support Gorilla

    Hello Sorin,

    I hope you're well today and thank you for your question!

    Although it may come "directly from Google Maps" plugin as you say, it can be caused by a number of reasons not directly related to the plugin itself.

    Among most common are global variable names duplicated session names and also assigning a variable to a session that's not yet initialized. In other word, it may be caused by a rare and unfortunate coincidence of variable/session naming among two or more different plugins.

    Fortunately, this is not a bug and a message you're getting is just a warning notice and usually it's good enough to disable strict checking for this warning. To do this, please create a "php.ini" file inside root folder of your WordPress install and put these lines inside:

    session.bug_compat_42 = off
    session.bug_compat_warn = off

    In case it didn't help, please try adding these lines instead at the very top of the ".htaccess" file of your website:

    php_flag session.bug_compat_42 0
    php_flag session.bug_compat_warn 0

    I hope this helps!

    Best regards,
    Adam

  • Adam Czajczyk
    • Support Gorilla

    Hello Sorin,

    Thanks for your replay.

    It may be possible that your hosting account is set not to accept users' php.ini files and/or php .htaccess directives. This is often the case, unfortunately.

    Another option may be to check your server's management panel (most likely a cPanel) agains "PHP settings" section, this may be available for configuration there.

    Also, could you please let me know what version of PHP are you using?

    Best regards,
    Adam

  • Sorin Dinca
    • New Recruit

    I used my cpanel account to create a custom php.ini in the wordpress directory and changed the fallowing from:

    session.bug_compat_42 = 1
    session.bug_compat_warn = 1

    to

    session.bug_compat_42 = 0
    session.bug_compat_warn = 0

    hope this helps somebody else if they have the same issue

  • Adam Czajczyk
    • Support Gorilla

    Hello Sorin!

    I understand that this solved the issue, am I correct? It would be great if you could confirm this and/or mark this thread as resolved if so (there's a button for this in a bottom right corner of replay text field).

    In case you had any other question, please start new threads and I'll be glad to assist you.

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.