upload array dies???

We have the following foreach loop to upload images on an ecommerce site. We recently switched servers and the new server is running php 5.x the old was on 4.x (not sure if this is the issue).
What happens in that the script seems to die after uploading 10 images and ignores anything after that.
Any ideas?

[code] foreach ($list as $k => $v) {
$query_data = array(
“code” => $edit_lng,
“optionid” => $k,
“option_name” => $v[‘option_name’]
);
if ($edit_lng != $config[‘default_admin_language’]) {
unset($v[‘option_name’]);
}
$v[‘price_modifier’] = func_convert_number($v[‘price_modifier’]);

                        $colorid = stripslashes( getoptiondisplay( $v['option_name'] ) );
                        $colorid = str_replace( "/", "_", $colorid );
                        $colorid = str_replace( "&", "_", $colorid );
                        $colorid = str_replace( "\"", "_", $colorid );
                        $colorid = str_replace( "'", "_", $colorid );
                        $colorid = str_replace( ")", "_", $colorid );
                        $colorid = str_replace( "(", "_", $colorid );

                        if (is_uploaded_file($HTTP_POST_FILES["swatches".$k]['tmp_name'])) {
                         move_uploaded_file($HTTP_POST_FILES["swatches".$k]['tmp_name'], "../images_products/".$productid."-".$colorid."_s.jpg" ) or die( "couldn't copy1" );
                        
                        }
                        if (is_uploaded_file($HTTP_POST_FILES["detswatches".$k]['tmp_name'])) {
                          move_uploaded_file($HTTP_POST_FILES["detswatches".$k]['tmp_name'], "../images_products/".$productid."-".$colorid."_det.jpg" ) or die( "couldn't copy2" );
                        }


                func_array2update("class_options", $v, "optionid = '$k'");

                # Update multilanguage option data
                if (!empty($query_data['option_name'])) {
                    func_array2insert("product_options_lng", $query_data, true);
                }
            }[/code]

it could be post data memory size limit, upload file size limit settings in your new php.ini file.

please check with your hosting support.

Sponsor our Newsletter | Privacy Policy | Terms of Service