Clicking uplaod gives Parse error: parse error, unexpected T_STRING Clicking uplaod gives Parse error: parse error, unexpected T_STRING
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Clicking uplaod gives Parse error: parse error, unexpected T_STRING

Started by amy0603, December 11, 2005, 10:20:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

amy0603

Hi, I have searched all the prev. answers to similar ?'s about this, but still can not find a fix.  I'm very new to the computer world and have not found things very easy so far  :) so any help is appreciated.  I have had coppermine running great since March 05, until the last week.  One new user, each time she tried to upload she somehow got an error albums/edit......so I knew from once before I had to make an EDIT folder, which I have done.  Somehow it kept getting deleted each time she tries.  I searched and tried to fix it, but it didnt work so I changed everything back to how it was (I thought) but now I get this error when you click upload:
Parse error: parse error, unexpected T_STRING in /home/content/a/m/y/amy0603/html/coppermine/upload.php on line 405
Here are lines 400-410


unit in two.
    if ((is_string($ini_string)) and (eregi('^([[:digit:]])+([[:alpha:]])*$', $ini_string, $parsed_ini_size))) {

        // Store the numerical component in $ini_limit cast as an integer
        $ini_limit = (int) $parsed_ini_size[1];

        // Convert the unit to lower case for analysis and store in $ini_limit_unit.
        $ini_limit_unit = strtolower($parsed_ini_size[2]);


If anyone could help me so we can upload again, and I know the number in the config is 0777, which is that. but I don't know why the edit keeps dissapearing. Thanks. :) Amy

amy0603

Hi, I'm now getting an error on line 357 Here is that group of lines:

</script>
    <form method="post" action="$path" ENCTYPE="multipart/form-data">
    </td>
EOT;
}

// The close form function creates the submit button and the closing tags.
function close_form($button_value) {

// Pull the language array into the function.
global $lang_upload_php;

// Create the submit button and close the form.
echo <<<EOT
        <tr>
                <td colspan="2" align="center" class="tablef">
                        <input type="submit" value="{$button_value}" class="button">
                </td>
                </form>
        </tr>

EOT;
}

function form_instructions() {

    global $CONFIG, $lang_upload_php, $user_form, $max_file_size;

    echo "<tr><td colspan=\"2\">";

    printf ($lang_upload_php['reg_instr_2'], $CONFIG['max_upl_size']);

    if ($user_form > '3') {

        echo "<br /><br />{$lang_upload_php['reg_instr_3']}";

    }
}
    if (($user_form == '2') or ($user_form == '3') or ($user_form == '5') or ($user_form == '6')) {

        echo "<br /><br />{$lang_upload_php['reg_instr_4']}";

    }

    echo "<br /><br />{$lang_upload_php['reg_instr_5']}";

    echo "</td></tr>";

}


// The get_and_convert_to_bytes function retrieves a limitng value from php.ini and converts the shorthand to bytes.
function get_and_convert_to_bytes ($ini_variable_name) {

    // Get the variable from php.ini
    $ini_string = ini_get($ini_variable_name);
}
    // Declare an array to store regex matches in.
    $parsed_ini_size = array();

    // Make sure the returned value is a string, then split the number and the unit in two.
    if ((is_string($ini_string)) and (eregi('^([[:digit:]])+([[:alpha:]])*$', $ini_string, $parsed_ini_size)))

kegobeer

Without seeing the entire file I can't tell you exactly what you forgot to "undo".  I know this is not correct:

unit in two.

It may be easier to just download a fresh copy of your version from our site, extract the upload.php file and then upload that to your site.  If you've made modifications, this may cause problems, however.

You could always upgrade to 1.4.2.  Whatever you decide, make backups before proceeding.

Attach your upload.php file to your next post and I'll take a look at it.  Make it a txt file, like this:  upload.php.txt

It would also be helpful to know exactly what you did.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

amy0603

Hi, great idea (reloading a fresh version) I did download the upgrade too, but I've never done that before and I'm scared to mess it up again :)
Thank you for the great help. 
You may mark this solved.
Thanks. ;D

amy0603

Hi, great idea (reloading a fresh version) I did download the upgrade too, but I've never done that before and I'm scared to mess it up again :)
Thank you for the great help.  
You may mark this solved.
Thanks. ;D