Strange problems / complicated

Discussion in 'Troubleshooting' started by ioj, Jan 17, 2005.

  1. ioj

    ioj Guest

    I used to run an old version of amember I think it was 1.9.3 or something. I upgraded the other day to the latest version because my host upgraded php.

    Anyway, I use amember for my image hosting site and the image hosting scripts rely on them and now none of them will work. The upload.php script I used to have is (Only the top part is important, I need to know what to replace it with now that I have upgraded amember/php)

    PHP:
    <?
    //the absolute location of where you want to upload it
    //the directory must be chmoded 777
    //jpgimage is the name from the top


    include('../account/config.inc.php');
    $t = & new_smarty();
    $_product_id = array('ONLY_LOGIN');

    require(
    $config['plugins_dir']['protect'] . '/php_include/check.inc.php');

    if (
    count($urls) == 1){
        
    $redirect sprintf("http://%s:%s@%s%s"
            
    $_amember_user['login'], $_amember_user['pass'],
            
    $HTTP_SERVER_VARS['HTTP_HOST'], $urls[0]);
    } else {
        
    $redirect $config['root_url'] . "/member.php";
    }
    #print_r($urls);


    if ($jpgimage_size 250000) {
        print 
    "Your file is too large (Keep it under 250kb). Please use your back button.";
        exit;

    }

    if (
    file_exists("../regimghost/$_amember_user.login/$jpgimage_name")) {
        print 
    "That file name is in use. Please rename your file and try again. Please use your back button.";
        exit;

    }

    if (!
    eregi("\.jpg$|\.gif$"$jpgimage_name)) {
        print 
    "Sorry, only jpg and gif files here (with a .jpg or .gif extention) Extensions are case sensitive.
            Please use your back button"
    ;
        exit;

    }


    if (!
    $dir = @opendir("../regimghost/".$_amember_user.$dirname)) {
        
    mkdir("../regimghost/".$_amember_user.$dirname0777);
        
    chmod ("../regimghost/".$_amember_user.$dirname0777);

    }


    move_uploaded_file($jpgimage"/usr/home/Domain/public_html/regimghost/$_amember_user/$jpgimage_name");
    chmod("/usr/home/Domain/public_html/regimghost/$_amember_user/$jpgimage_name"0644);
    print 
    "Thank you for your submission of $jpgimage_name.
    It is now stored at <b>http://www.Domain.com/regimghost/
    $_amember_user/$jpgimage_name</b><p>";
    print 
    "<p> Click back in your browser to upload another image.</a><p><p>If you get an error warning about unlink() that means your file is too big and it was not uploaded!";
    print 
    "<p><p> Here is a list of files you have uploaded. This is a quick view and you should use Image Management for any changes.<p>";
    print 
    "<p> <IFRAME SRC='http://www.Domain.com/regimghost/$_amember_user/' WIDTH=570 HEIGHT=1000 FRAMEBORDER=0>"


    ?>
    Anyway that used to work (It uploaded a picture from the previous html page form to the directory equal to the username). Now it is displaying errors like "Sorry, only jpg and gif files here (with a .jpg or .gif extention) Extensions are case sensitive. Please use your back button". Even if I put in a jpg or gif.
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    Please contact support with urls, ftp info and sample login info.

Share This Page