Not signed in ( Sign In)


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.

    • CommentTimeFeb 23rd 2008 edited
    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.

    Step 2

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

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

    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';

    // 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

    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!
    • CommentTimeFeb 23rd 2008 edited
    well, maybe it's worth adding those changes to SVN, as FP is meant to work on cheap hosts.