Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Affiliates Pro v3 php error

  1. #1
    Join Date
    Feb 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Affiliates Pro v3 php error

    Hi all,
    need some help from you, i upload the php scripts to the server and when i click on my link: http://www.cozyfeel.com/tracker/install/install.php, it gives me this error of Error: file /install/tree.chk is missing. Hope to get some solutions oon..

    thanks

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Can we see the code please?
    Jeremy | jfein.net

  3. #3
    Join Date
    Feb 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    the codes are:
    install.php
    PHP script text
    --------------------------------------------------------------------------------

    <?php
    /**,,`,o.O-(`-----2007-----)-O.o,`,,*\
    | |
    | ::: :::. .,-:::::/ |
    | SoftService.org ;;; ;;`;; ,;;-'````' Always a Pleasure |
    | Affiliate.PRO.v3.0 [[[ ,[[ '[[, [[[ [[[[[[/ Serving the Scene |
    | -------------------- $$$ c$$$cc$$$c "$$c. "$$ ----------------- |
    | Checked.&.Cleared BY 888 888 888, `Y8bo,,,o88o Greetz to WST|GTT |
    | MMM YMM [IAG] Null Group |
    | |
    \*,,`,o.O-(`---September--)-O.o,`,,**/
    ?>

    <?php
    // $Id: install.php 236 2007-09-17 08:21:46Z adgar $

    error_reporting(0);
    if (0 == intval(ini_get('safe_mode'))) set_time_limit(0);
    ini_set('memory_limit', '16M');
    session_start();
    ob_start();

    $flagfile = '../config/instflag';
    $finalstep = 4;
    $configfile = '../config/config.php';

    if (!file_exists($flagfile)) {
    if ((isset($_GET['step'])))
    $_SESSION['step']=$_GET['step'];
    elseif (!isset($_SESSION['step']))
    $_SESSION['step'] = 1;

    } else {
    $_SESSION['step'] = 4;
    }

    if (1 == $_SESSION['step']) {
    $tree = unserialize(file_get_contents('tree.chk'));
    if (false === $tree) {
    echo "<strong>Error:</strong> file /install/tree.chk is missing";
    exit();
    }
    $is_iis = (boolean) preg_match("/IIS/i", $_SERVER['SERVER_SOFTWARE']);
    $corrupt_files = array();
    foreach ($tree as $file => $size) {
    if (!($is_iis && false !== strstr($file, '.htaccess'))) {
    if (!file_exists('..' . $file)) $corrupt_files[] = $file;
    }
    }
    if (0 != count($corrupt_files)) {
    echo "<br>AffiliatePro distribution is incomplete, following files were not found:</strong><br>";
    echo implode("<br>", $corrupt_files);
    echo "<br>Please make sure all files from distribution on your server.";
    exit();
    }
    unset($tree, $is_iss, $corrupt_files);
    }

    if (file_exists($configfile)) {
    require_once('../affiliate/cfg.php');
    } else {
    $include_path=array(
    './',
    realpath('../config'),
    realpath('../lib'),
    realpath('../include')
    );
    ini_set('include_path', implode(PATH_SEPARATOR, $include_path));
    }

    require_once('xtemplate.class.php');

    $filename='templates/main.html';
    $xtpl=new XTemplate($filename);

    /* BEGIN: step_menu*/
    $stepmenu[]=array('number'=>'1', 'description'=>'Create Database', 'link'=>'install.php?step=1');
    $stepmenu[]=array('number'=>'2', 'description'=>'Primary Admin Setup', 'link'=>'install.php?step=2');
    $stepmenu[]=array('number'=>'3', 'description'=>'Site Setup', 'link'=>'install.php?step=3');


    for ($i=0; $i<count($stepmenu); $i++) {

    $xtpl->assign('curentstep',($_SESSION['step']==($i+1))?'<img src="images/li.png" border="0">':'&nbsp;');
    $xtpl->assign('stepnumber', $stepmenu[$i]['number']);
    $xtpl->assign('stepdescription', ($_SESSION['step']==($i+1))?'<strong>'.$stepmenu[$i]['description'].'</strong>':$stepmenu[$i]['description']);

    // $xtpl->assign('steplink', $stepmenu[$i]['link']);
    $xtpl->parse('main.step_menu.loop');
    }
    $xtpl->parse('main.step_menu.');

    if ($_SESSION['step']!=$finalstep)
    $xtpl->parse('main.step_menu');
    /* END: step_menu*/

    /* BEGIN: current_template*/
    $filename='step' . $_SESSION['step'];
    $xtpl->assign_file('CURRENTTEMPLATE','templates/' . $filename . '.html');
    require_once('php/' . $filename . '.php');
    /* END: current_template*/

    $xtpl->parse('main.template');
    /* BEGIN: buttonts_panel*/

    //prev button
    if (!in_array($_SESSION['step'], array(1, 2, $finalstep))) {
    $xtpl->assign('ONCLICK1', "onClick=\"window.location.href='install.php?step=".($_SESSION['step']-1)."';\"");
    } else {
    $xtpl->assign('DISABLE1', 'disabled="disabled"');
    }
    //next button
    if (!in_array($_SESSION['step'], array($finalstep-1, $finalstep))) {
    $xtpl->assign('ONCLICK2', "onClick=\"javascript:document.getElementById('dataform').submit();\"");
    } else {
    $xtpl->assign('DISABLE2', 'disabled="disabled"');
    }
    //finish button
    if (in_array($_SESSION['step'], array($finalstep-1))) {
    $xtpl->assign('ONCLICK3', "onClick=\"javascript:document.getElementById('dataform').submit();\"");
    } else {
    $xtpl->assign('DISABLE3', 'disabled="disabled"');
    }

    if ($_SESSION['step'] != ($finalstep)) {
    $xtpl->parse('main.buttonts_panel');
    }

    /* END: buttonts_panel*/
    $xtpl->parse('main');
    $xtpl->out('main');
    ?>

  4. #4
    Join Date
    Jul 2008
    Posts
    138
    Thanks
    13
    Thanked 1 Time in 1 Post

    Default

    Hi,

    In your install.php script look down at around line 38 in the code

    PHP Code:
    if (== $_SESSION['step']) {
    $tree unserialize(file_get_contents('tree.chk'));
    if (
    false === $tree) {
    echo 
    "<strong>Error:</strong> file /install/tree.chk is missing";
    exit();

    in $tree = unserialize(file_get_contents('tree.chk')); you might try changing the path as that assumes tree.chk is in the same directory as install.php (or double check to see if tree.chk and install.php are in the same directory)

    for instance if tree.chk is in the includes directory you would have $tree = unserialize(file_get_contents('includes/tree.chk'));

    That might at least get you past the "install" portion of the script.

  5. #5
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    It is in the same directory:
    http://www.cozyfeel.com/tracker/install/tree.chk
    Edit:
    The reason this is happening (i think) is because it's to long to unserialize.
    Last edited by Nile; 02-27-2009 at 02:27 AM.
    Jeremy | jfein.net

  6. #6
    Join Date
    Jul 2008
    Posts
    138
    Thanks
    13
    Thanked 1 Time in 1 Post

    Default

    Nice catch Nile.....been in front of a computer way too long today. Not sure on that then, since you disproved anything directory wise.

  7. #7
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    Yeah - it has to do with the serialize function.. :/
    Jeremy | jfein.net

  8. #8
    Join Date
    Feb 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    both the file are in the same directory, which means from th install.php file to change the
    $tree = unserialize(file_get_contents('tree.chk'));
    to
    $tree = unserialize(file_get_contents('http://www.cozyfeel.com/tracker/install/tree.chk'));
    please advice

  9. #9
    Join Date
    Jun 2008
    Posts
    589
    Thanks
    13
    Thanked 54 Times in 54 Posts
    Blog Entries
    1

    Default

    No, you don't need to do that. They are already in the same directory, so that directory is set as a default for files in that directory. The first example you gave is valid. Nile just thinks that unserialize can't parse such long file- i think...
    Last edited by magicyte; 02-27-2009 at 03:21 AM.

  10. #10
    Join Date
    Feb 2009
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    sorry for that, cos im not too sure about the php scripts, would you mind to explain what the serialize. what should i do ??

    thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •