PHP problem with ini_set.....help please =)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Varius
    Confirmed User
    • Jun 2004
    • 6890

    #1

    PHP problem with ini_set.....help please =)

    I have these lines in my page:

    ini_set('session.name','z');
    ini_set('session.use_cookies',0);
    ini_set('session.gc_maxlifetime',3600);
    ini_set('session.gc_probability',100);
    ini_set('session.use_trans_sid',1);

    and if I show phpinfo, they are all reflected in the 'Local' values except the use_trans_sid....I've tried it as 1, true, 'On',....but it remains set to value 'off' in phpinfo ???

    Anyone have any ideas how to resolve this issue? PHP version 4.3.8 running on FreeBSD 4.10
    Skype variuscr - Email varius AT gmail
  • M_M
    Confirmed User
    • May 2004
    • 1167

    #2
    just change it in php.ini
    ;-)!;-)!;-)!;-)!;-)!;-)!;-)!;-)!;-)!;-)!;-)

    Comment

    • swedguy
      Confirmed User
      • Jan 2002
      • 7981

      #3
      http://bugs.php.net/bug.php?id=28991

      session.use_trans_sid is PHP_INI_DIR for PHP 4 and PHP_INI_ALL for PHP 5.

      Comment

      • Varius
        Confirmed User
        • Jun 2004
        • 6890

        #4
        Ooooops silly me this page was on a new demo server that had been compiled without enableing trans sid

        As for the suggestion to edit it in php.ini, I prefer not touching my php.ini as different projects have diff settings requirements and I'd also have to change it on 15 webservers......

        I think once I recompile PHP to enable it, should work fine
        Skype variuscr - Email varius AT gmail

        Comment

        • swedguy
          Confirmed User
          • Jan 2002
          • 7981

          #5
          No, you can only set that particular var with ini_set from version 5, it doesn't work in 4.

          Comment

          • Varius
            Confirmed User
            • Jun 2004
            • 6890

            #6
            Originally posted by Varius
            Ooooops silly me this page was on a new demo server that had been compiled without enableing trans sid

            As for the suggestion to edit it in php.ini, I prefer not touching my php.ini as different projects have diff settings requirements and I'd also have to change it on 15 webservers......

            I think once I recompile PHP to enable it, should work fine
            Scratch this, after 4.1.2 you dont have to compile with enable-trans-sid, its done automatically ;/
            Skype variuscr - Email varius AT gmail

            Comment

            • Varius
              Confirmed User
              • Jun 2004
              • 6890

              #7
              Originally posted by swedguy
              No, you can only set that particular var with ini_set from version 5, it doesn't work in 4.
              Works on another server fine, I just tested with exactly the same OS and PHP version, and using those same ini_set lines...

              strange
              Skype variuscr - Email varius AT gmail

              Comment

              • Intrigue
                Confirmed User
                • Feb 2004
                • 662

                #8
                more often then not it's easier to use a .htaccess to set php settings (it's always good when things like register globals, session settings, etc.. are configured BEFORE the page is being executed)

                php_flag <name> <value> for boolean
                and php_value <name> <value> for others

                Comment

                Working...