Author: Christoph M. Becker (cmb69)
Date: 2021-10-08T12:56:37+02:00
Commit:
https://github.com/php/web-rmtools/commit/18dac6fd90d307ebd92a5c80ad89bd11a45c77c0
Raw diff:
https://github.com/php/web-rmtools/commit/18dac6fd90d307ebd92a5c80ad89bd11a45c77c0.diff
Cater to new server configuration for PECL cURL uploads
Changed paths:
M include/Tools.php
M script/pecl.php
Diff:
diff --git a/include/Tools.php b/include/Tools.php
index 7084b01..62bd43c 100644
--- a/include/Tools.php
+++ b/include/Tools.php
@@ -411,9 +411,10 @@ function upload_pecl_pkg_ftp_curl($files, $logs, $target)
$fp = fopen($local_file, "rb");
$local_file = basename($local_file);
- $remoteurl = "ftps://" . urlencode($ftp_user) . ":" .
urlencode($ftp_password) . "@${ftp_server}${ftp_path}/${local_file}";
+ $remoteurl = "ftps://" . urlencode($ftp_user) . ":" .
urlencode($ftp_password) . "@${ftp_server}:990${ftp_path}/${local_file}";
\curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
+ \curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
\curl_setopt($ch, CURLOPT_URL, $remoteurl);
\curl_setopt($ch, CURLOPT_UPLOAD, 1);
\curl_setopt($ch, CURLOPT_INFILE, $fp);
@@ -430,9 +431,10 @@ function upload_pecl_pkg_ftp_curl($files, $logs, $target)
$fp = fopen($local_file, "rb");
$local_file = basename($local_file);
- $remoteurl = "ftps://" . urlencode($ftp_user) . ":" .
urlencode($ftp_password) . "@${ftp_server}${ftp_path}/logs/${local_file}";
+ $remoteurl = "ftps://" . urlencode($ftp_user) . ":" .
urlencode($ftp_password) . "@${ftp_server}:990${ftp_path}/logs/${local_file}";
\curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
+ \curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
\curl_setopt($ch, CURLOPT_URL, $remoteurl);
\curl_setopt($ch, CURLOPT_UPLOAD, 1);
\curl_setopt($ch, CURLOPT_INFILE, $fp);
diff --git a/script/pecl.php b/script/pecl.php
index 855e91a..c20bdf0 100644
--- a/script/pecl.php
+++ b/script/pecl.php
@@ -327,7 +327,7 @@
if ($upload) {
try {
$root = $is_snap ? 'snaps' : 'releases';
- $target = '/' . $root . '/' . $ext->getUnrealName() .
'/' . $ext->getVersion();
+ $target = '/pecl/' . $root . '/' .
$ext->getUnrealName() . '/' . $ext->getVersion();
if ($ext->getName() != $ext->getUnrealName()) {
$real_pkg_file = $pkg_file;
--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php