#! /usr/bin/php rollback(); exit(1); } if ($ret != $row2['filesize']) { echo "UPGRADE ERROR: file_put_contents($tmp) size error: ($ret != ".$row2['filesize'].")\n"; $ds->rollback(); exit(1); } $ret = $ds->store($row['docid'], $tmp); if (!$ret) { echo "UPGRADE ERROR: $ret: ".$as->getErrorMessage()."\n"; $ds->rollback(); exit(1); } } $ds->commit(); echo "SUCCESS\n";