but i don't understand :
i thought the memory was cleaned when the script ended.
So when my form re-validate itself, it's the end of the script.
Why do i have memory problems?
Furthermore, i can't modify the php.ini because i'm not the admin on the server.
ciao
thks for your help
ps : i use curl because on the server the ftp functions of php are disabled.
the code:
<?php
// this directive does not chge anything
set_time_limit(0) ;
// echo 'POST :<br />' ;
// print_r($_POST) ;
// echo '<br />' ;
// We fetch the array containing the names of the files to download
$tab_file=unserialize(base64_decode($_POST['stabfile'])) ;
level=$_POST['level'] ;
$url=$_POST['url'] ;
$path=$_POST['path'] ;
// We begin the download
$filename=array_pop($tab_file) ;
if (count($tab_file)==0)
{
// if there is no file to download we redirect towards upmean
$script='upMean.php' ;
}
else
{
$script='up1.php' ;
}
echo "<h1>UP1 </h1><br>filename : $filename<br>";
if (!file_exists($path.'/'.$filename))
{
echo "begin of the cURL session<br>" ;
echo "url download $filename : $url<br>" ;
$fp = fopen($path.'/'.$filename, "w");
// Debut de session cURL
$ch = curl_init($url.'/'.$filename) ;
//curl_setopt($ch,CURLOPT_WRITEFUNCTION,"myPoorProgressFunc");
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1) ;
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_exec($ch);
curl_close($ch);
fclose($fp);
echo "end of cURL session<br>" ;
}
$ser_tab_file=base64_encode(serialize($tab_file)) ;
$ser_tab_dir=$_POST['stabdir'] ;
?>
<html>
<head>
<title>Up1 script</title>
<SCRIPT language="JavaScript">
function submitform()
{
setTimeout('document.formulaire.submit()',0000) ;
}
</SCRIPT>
</head>
<body onload='javascript:submitform()'>
<form name='formulaire' method='post' enctype='multipart/form-data' action='<?php echo $script ?>'>
<input type='hidden' name='page' value='up1'>
<input type='hidden' name='stabfile' value='<?php echo $ser_tab_file ?>'>
<input type='hidden' name='stabdir' value="<?php echo $ser_tab_dir ?>">
<input type='hidden' name='level' value='<?php echo $level ?>'>
<input type='hidden' name='url' value='<?php echo $url ?>'>
<input type='hidden' name='path' value='<?php echo $path ?>'>
</form>
</body>
</html>