Menu

My Adventure Updating to 1.3.11p1

Help
Scott Auge
2006-01-06
2012-10-11
  • Scott Auge

    Scott Auge - 2006-01-06

    OK, so I decided to take everything on my systems to PHP 5.1.1. PHPWiki gave me some grief and this is a record of what I did to overcome the problems.

    1) Keeping the PHP 4 version on another web server, I dumped the pages out via the administration page. I have experience from previous upgrades, this is the least aggravating method of updating to the new database structure.

    2) Created the new database on MySQL. I would prefer to use PostgreSQL but one change at a time ya know?

    3) Loaded up the new database schema from the command line with the mysql-initialize.sql file.

    4) Started up apache2 with PHP 5 running on the new wiki code's home page. Of course, it doesn't work. Go into index.php and comment the if as in:

    // If any page is empty, comment the if ... line out,
    // to force include "lib/main.php".
    // Without the dir check it might fail for index.php via DirectoryIndex
    //if (@is_dir(SCRIPT_FILENAME) or realpath(SCRIPT_FILENAME) == realpath(FILE))
    include(dirname(FILE)."/lib/main.php");

    Aha - wiki starts loading up virgin wiki. It is looking good.

    5) Try to access another part of the new wiki. Doesn't work - always landing back onto the home page. Turns out I need to configure SCRIPT_NAME in config/config.ini and set USE_PATH_INFO=false.

    6) Well, at least the URL came up the way I was expecting it to (and how Google likes it) but still the same problem. After playing around with echo in Register.php it turns out that PHP Wiki REQUIRES the setting register_long_arrays = On in php.ini. Finally I can wander around in the default pages for the wiki.

    7) Attempt to load in the new pages, of which there are a lot of them. So, I start and then encounter script time limit problems. Go into php.ini and set:

    max_execution_time = 0 ; Maximum execution time of each script, in seconds
    max_input_time = 0 ; Maximum amount of time each script may spend parsing request data
    memory_limit = 80M ; Maximum amount of memory a script may consume (8MB)

    And guess what - still running into the same problem. Time to slosh through code and I find:

    loadsave.php has a hardcoded time limit in it. Increased the time limit to 300 seconds (since that is the time out on the web server anyhow.)

    8) Guess what - doesn't expand the zip file automatically. Delete pages and try again with unzipped files (and moved the zip to another directory.)

    Finally the old pages are loaded back into the wiki.

    Functional in three hours of WTF? and wonderfully functional again YAY!

     
    • Scott Auge

      Scott Auge - 2006-01-06

      Oh yea, I also had to stop off at gnu and pick up the gettext package otherwise it would segfault on start up of Apache2.

      This system is Suse 10.

       

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.