The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to turn on long_arrays with PHP?

Discussion in 'General Discussion' started by Custom-Hosting, Jan 21, 2006.

  1. Custom-Hosting

    Custom-Hosting Well-Known Member

    Joined:
    May 25, 2003
    Messages:
    84
    Likes Received:
    1
    Trophy Points:
    8
    Hey,
    I just installed PHP5 with apache update and now a script isn't working.

    Someone said there is a problem with PHP5 and long_arrays has to be turned on for it to work.

    I put in register_long_arrays = On below register_argc_argv = On

    Is this what I should be doing?
    php info doesnt show up if long_arrays is turned on or not.

    Thanks
     
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    What, out of interest, are long arrays?
     
  3. elleryjh

    elleryjh Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    479
    Likes Received:
    0
    Trophy Points:
    16
  4. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    Yep: http://uk2.php.net/manual/en/ini.core.php#ini.register-long-arrays - I see now.

    The PHP manual says that, for PHP 5, register_long_arrays is enabled by default, so unless you have intentionally turned it off you may have to start looking elsewhere for the cause.

    From reading what this directive does, I very much doubt that having it turned off will cause any problems with PHP. The only 'problem' this could cause would be with scripts trying to access deprecated HTTP_*_VARS global arrays.

    The better option would be to use the superglobal arrays $_GET, $_POST etc - you can see what using deprecated features will do.

    Either way, just pop register_long_arrays = on into your php.ini to be sure it's enabled. However, I'd suggest updating any scripts that are using the deprecated features.
     
  5. Custom-Hosting

    Custom-Hosting Well-Known Member

    Joined:
    May 25, 2003
    Messages:
    84
    Likes Received:
    1
    Trophy Points:
    8
    The problem is with phpadsnew

    I cant login to the admin panel and on their forums a lot of other people have been posting about the problem lately and someone posted that he fixed it by putting in long_arrays as on in the ini file.

    Only started getting the problem after updating to PHP5, anyone have any other suggestions about PHP5 changes that could effect logins?
     
  6. mikehu

    mikehu Registered

    Joined:
    Jan 22, 2005
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    just had the same problem
    did as said and solved it
     
Loading...

Share This Page