<?php
$cmd = 'wget http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.37-linux-i686.tar.gz/'
$cmd .= 'from/http://ftp.club-internet.fr/mirrors/ftp.mysql.com/';
error_reporting(E_ALL);
$handle = popen( $cmd.' 2>&1', 'r');
while( $read = fread($handle, 100) ) {
echo nl2br($read);
flush();
}
pclose($handle);
?>
c quoi ta config toi ?rog a dit:j'ai essay& mais ça ne le fait qu'en php-cli
#################################################################################################################
# launch rsync command through a shell file #
#################################################################################################################
elseif(isset($_REQUEST['op']) && $_REQUEST['op'] == 'bak')
{
#checking the config was not bypassed
# action
if(!$key = array_search($_REQUEST["_input_action"],$action))
{
die("bad action");
}
elseif(!isset($comp[$_REQUEST["_input_comp"]]))
{
die("bad computer");
}
elseif(!isset($module_dir[$_REQUEST["_input_module"]]))
{
die("bad module");
}
#################################################################################################################
# find the shell file
#$tunnel = SSH.' '.ID_DSA_KEY_APACHE." -L ".$local_port[$computer].":".$target_server[$computer].":".REMOTE_PORT." SvcwRsync@".$sshd_server[$computer]." -T -N -f";
#
define('SHELL_FILE',$_SERVER['DOCUMENT_ROOT']."/command/".$_REQUEST["_input_action"].'/'.$_REQUEST["_input_comp"].$_REQUEST["_input_module"].'.sh');
#
#
echo ('--------------------------------------------------------------------------------------------<br>');
echo ('commande : '.$_REQUEST["_input_action"]." le module ".$module_name[$_REQUEST["_input_module"]]." de l'ordinateur ".$comp[$_REQUEST["_input_comp"]]);
echo ('<br>--------------------------------------------------------------------------------------------<br>');
flush();
flush();
echo ('<u>Requête en cours de traitement</u><br>');
flush();
flush();
#
$fp = fopen(LOG_FILENAME,"w+");
#
if(is_file(SHELL_FILE))
{
#$output = shell_exec('/bin/sh '.$shell_file." &>".LOG_FILENAME);
$output = '';
#
$handle = popen(SHELL_PATH.' '.SHELL_FILE.' 2>&1','r');
#
while($read = fread($handle,100))
{
echo nl2br($read);
fwrite($fp,$read);
flush();
#
#$output = $read;
}
pclose($handle);
#print($output);
}
#
echo ('<u>Transfert terminé</u>');
flush();
flush();
#
#$fp = fopen(LOG_FILENAME,"w+");
#fwrite($fp,$output);
fclose($fp);