Menu

Problems with PHP 5

2005-08-31
2012-10-11
  • Jared White

    Jared White - 2005-08-31

    I had some major problems getting PhpWiki 1.3.11_rc3 working in a PHP 5.0.4 environment -- namely, the global variables just weren't working properly. After much trial and error, I found I could put this at the top of lib/Request.php:

    $GLOBALS['HTTP_SERVER_VARS'] = &$_SERVER;
    $GLOBALS['HTTP_GET_VARS'] = &$_GET;
    $GLOBALS['HTTP_POST_VARS'] = &$_POST;

    I had also put lines for the session and cookie superglobals in this spot, but after hours of tracking down login problems, I realized that I had to put that down in the spot after the session was started. So in the Request_SessionVars class, I put in the following after session_start();:

    $GLOBALS['HTTP_SESSION_VARS'] = &$_SESSION;
    $GLOBALS['HTTP_COOKIE_VARS'] = &$_COOKIE;

    Then everything seemed to be working all right.

    So, users, if you are using PHP 5 and are having problems with forms, logins, etc. -- try this fix!

    As, PhpWiki developers, I hope your PHP 5 support improves soon, because it sure took me ages to figure this out! :)

    All the best,

    Jared

     
    • Reini Urban

      Reini Urban - 2005-09-04

      This was a problem with the new PHP5 register_long_arrays settings which was already fixed in 1.3.x CVS and the 1.2.10 stable release some month ago. See Bug #1180115

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.