FTP upload problemer
Hejsa PHP eksperter ;-)Har et problem med FTP upload, får følgende fejl:
Connected to ftp.whyweb.dk/dataentry
$source_file er lig: air.gif
Warning: ftp_put: Opening BINARY mode data connection for nyt_billede.gif in D:\Inetpub\wwwroot\websites\whyweb.dk\dataentry\virk.php on line 58
Fatal error: Maximum execution time of 30 seconds exceeded in D:\Inetpub\wwwroot\websites\whyweb.dk\dataentry\virk.php on line 58
Linie 58 ser således ud:
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
Her er koden for hele siden:
<?php
$ftp_server = "ftp.whyweb.dk/dataentry";
$ftp_user_name = "username";
$ftp_user_pass = "password";
$source_file = "air.gif";
$destination_file = "nyt_billede.gif";
//SET UP BASIC CONNECTION\\
$conn_id = ftp_connect($ftp_server);
//LOGIN WITH USERNAME AND PASSWORD\\
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
//CHECK CONNECTION\\
if((!$conn_id)||(!$login_result)){
echo "FTP connection has failed!<br>Attempted to connect to $ftp_server<br>";
exit;
}else{
echo "Connected to $ftp_server<br>".'$source_file'." er lig: $source_file<br>";
}
//UPLOADER\\
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
//CHECK UPLOAD STATUS\\
if(!$upload){
echo "FTP upload has failed!<br>Failed to upload $source_file to $ftp_server as $destination_file<br>";
}else{
echo "Hep, lortet virker";
}
//CLOSE FTP STREAM\\
ftp_close($conn_id);
?>
Link til siden: http://www.whyweb.dk/dataentry/virk.php
Link til udbyders php konfiguration: http://www.whyweb.dk/dataentry/info.php
Håber I kan hjælpe.
alpapa