svn: /web/php-rmtools/trunk/client/include/ Tools.php

From: Date: Thu, 28 Apr 2011 20:32:30 +0000
Subject: svn: /web/php-rmtools/trunk/client/include/ Tools.php
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-10916@lists.php.net to get a copy of this message
pajoye Thu, 28 Apr 2011 20:32:30 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=310638 Log: - fix upload break introduced earlier Changed paths: U web/php-rmtools/trunk/client/include/Tools.php Modified: web/php-rmtools/trunk/client/include/Tools.php =================================================================== --- web/php-rmtools/trunk/client/include/Tools.php 2011-04-28 20:31:59 UTC (rev 310637) +++ web/php-rmtools/trunk/client/include/Tools.php 2011-04-28 20:32:30 UTC (rev 310638) @@ -128,8 +128,12 @@ function upload_build_result_ftp_curl($src_dir, $target) { include __DIR__ . '/../data/config/credentials_ftps.php'; - - $ftp = ftp_connect($ftp_server); + var_dump($ftp_server, $user_snaps, $password); + $ftp = ftp_connect($ftp_server); + if (!$ftp) { + echo "Cannot connect to $ftp_server\n"; + return false; + } $login_result = ftp_login($ftp, $user_snaps, $password); if (!$login_result) { return false; @@ -156,7 +160,7 @@ $fp = fopen($local_file, "rb"); $local_file = basename($local_file); - $remoteurl = "ftps://${ftp_user}:${ftp_password}@${ftpserver}${ftp_path}/${local_file}"; + $remoteurl = "ftps://${ftp_user}:${ftp_password}@${ftp_server}${ftp_path}/${local_file}"; \curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); \curl_setopt($ch, CURLOPT_URL, $remoteurl);

« previous php.webmaster (#10916) next »