Not signed in ( Sign In)

Categories

Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    •  
      CommentAuthormarkxchan
    • CommentTimeFeb 23rd 2008 edited
     permalink
    So, you have downloaded flatpress svn thinking flatpress will work on PHP4 as said on the homepage but actually just works out-of-the-box using PHP4.3?

    Well congratulations, we had suffered the same fate, and this is why I made this how-to my fiend, to help you set flatpress up on php 4.2.3 or less! For great justice! And for those with dinosaur hosts and friends of people w/ dinosaur hosts who had been asked to install fp for them!

    Step 1
    Download teh flatpress SVN from the svn site. http://flatpress.sf.net/snapshots/

    Step 2

    In defaults.php change the line
    set_include_path(ABS_PATH);
    to
    ini_set('include_path', ABS_PATH);
    save.

    In fp-includes/core create a new file called core.old.php with the following contents. This will be our PHP compatibiliteez layer.

    <?php
    if (!function_exists('html_entity_decode')) {
    // For users prior to PHP 4.3.0 you may do this:
    function html_entity_decode($string)
    {
    // replace numeric entities
    $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $string);
    $string = preg_replace('~&#([0-9]+);~e', 'chr("\\1")', $string);
    // replace literal entities
    $trans_tbl = get_html_translation_table(HTML_ENTITIES);
    $trans_tbl = array_flip($trans_tbl);
    return strtr($string, $trans_tbl);
    }
    }
    ?>


    in the same dir, edit includes.php and add
    //PHP4 Compatibility Layer
    require_once INCLUDES_DIR.'core.old.php';

    before
    // WordPress plugin system

    Step 3
    Extract it on your host following the README (or "the file that nobody reads except who writes"). Then install it by running setup.php.

    Step 4
    ???

    Step 5
    PROFIT!!!

    You're all set from there. Wasn't that easy?

    Special thanks to NoWhereMan, without which, flatpress would never have been invented, and who replies fast to the Help forum of this community. If you have some spare change, try donating it to him... for great justice!
    •  
      CommentAuthorNoWhereMan
    • CommentTimeFeb 23rd 2008 edited
     permalink
    well, maybe it's worth adding those changes to SVN, as FP is meant to work on cheap hosts.