Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable secure-http config option for unsafe configured PECL website #257

Merged
merged 1 commit into from
Jun 6, 2022

Conversation

tntrex
Copy link
Contributor

@tntrex tntrex commented May 27, 2022

This change allows to download extensions from PECL using http, when PICKLE_PECL_UNSAFE environment variable specified

@mlocati
Copy link
Collaborator

mlocati commented Jun 6, 2022

Shouldn't we already use http://pecl.php.net instead of https://pecl.php.net if PICKLE_PECL_UNSAFE is set to a non falsy value?
See here and here...

@tntrex
Copy link
Contributor Author

tntrex commented Jun 6, 2022

Unfortunately, it's not working now with PICKLE_PECL_UNSAFE. Composer's downloader denies usage of http connection, because of secure-http option which is only disabled for "test server"

PICKLE_PECL_UNSAFE=1 ./pickle.phar install event -vvv
[06-Jun-2022 13:52:38 UTC] PHP Warning:  JIT is incompatible with third party extensions that override zend_execute_ex(). JIT disabled. in Unknown on line 0
Warning: JIT is incompatible with third party extensions that override zend_execute_ex(). JIT disabled. in Unknown on line 0
Checked CA file /etc/pki/tls/certs/ca-bundle.crt does not exist or it is not a file.
Checked directory /etc/pki/tls/certs/ca-bundle.crt does not exist or it is not a directory.
Checked CA file /etc/ssl/certs/ca-certificates.crt: valid
  - Installing event (latest-stable): Downloading http://pecl.php.net/get/event

    Download failed, retrying...
Downloading http://pecl.php.net/get/event

    Download failed, retrying...
Downloading http://pecl.php.net/get/event

Failed: [Composer\Downloader\TransportException] 0: Your configuration does not allow connections to http://pecl.php.net/get/event. See https://getcomposer.org/doc/06-config.md#secure-http for details.

In Config.php line 461:
                                                                                                                                                         
  [Composer\Downloader\TransportException]                                                                                                               
  Your configuration does not allow connections to http://pecl.php.net/get/event. See https://getcomposer.org/doc/06-config.md#secure-http for details.  
                                                                                                                                                         

Exception trace:
  at phar:///home/warp/app/pickle.phar/vendor/composer/composer/src/Composer/Config.php:461
 Composer\Config->prohibitUrlByConfig() at phar:///home/warp/app/pickle.phar/vendor/composer/composer/src/Composer/Util/RemoteFilesystem.php:310
 Composer\Util\RemoteFilesystem->get() at phar:///home/warp/app/pickle.phar/vendor/composer/composer/src/Composer/Util/RemoteFilesystem.php:90
 Composer\Util\RemoteFilesystem->copy() at phar:///home/warp/app/pickle.phar/vendor/composer/composer/src/Composer/Downloader/FileDownloader.php:153
 Composer\Downloader\FileDownloader->doDownload() at phar:///home/warp/app/pickle.phar/vendor/composer/composer/src/Composer/Downloader/FileDownloader.php:97
 Composer\Downloader\FileDownloader->download() at phar:///home/warp/app/pickle.phar/vendor/composer/composer/src/Composer/Downloader/ArchiveDownloader.php:38
 Composer\Downloader\ArchiveDownloader->download() at phar:///home/warp/app/pickle.phar/src/Package/PHP/Convey/Command/Pecl.php:111
 Pickle\Package\PHP\Convey\Command\Pecl->fetch() at phar:///home/warp/app/pickle.phar/src/Package/PHP/Convey/Command/Pecl.php:52
 Pickle\Package\PHP\Convey\Command\Pecl->execute() at phar:///home/warp/app/pickle.phar/src/Package/Convey.php:63
 Pickle\Package\Convey->deliver() at phar:///home/warp/app/pickle.phar/src/Console/Helper/PackageHelper.php:119
 Pickle\Console\Helper\PackageHelper->convey() at phar:///home/warp/app/pickle.phar/src/Console/Command/InstallerCommand.php:217
 Pickle\Console\Command\InstallerCommand->execute() at phar:///home/warp/app/pickle.phar/vendor/symfony/console/Command/Command.php:298
 Symfony\Component\Console\Command\Command->run() at phar:///home/warp/app/pickle.phar/vendor/symfony/console/Application.php:1005
 Symfony\Component\Console\Application->doRunCommand() at phar:///home/warp/app/pickle.phar/vendor/symfony/console/Application.php:299
 Symfony\Component\Console\Application->doRun() at phar:///home/warp/app/pickle.phar/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at phar:///home/warp/app/pickle.phar/bin/pickle:38
 require() at /home/warp/app/pickle.phar:10

install [--no-convert] [--defaults] [--source] [--with-configure-options WITH-CONFIGURE-OPTIONS] [--save-logs SAVE-LOGS] [--dry-run] [--php PHP] [--ini INI] [--tmp-dir TMP-DIR] [--version-override [VERSION-OVERRIDE]] [--] [<path>]

@mlocati mlocati merged commit 6f3874f into FriendsOfPHP:master Jun 6, 2022
@mlocati
Copy link
Collaborator

mlocati commented Jun 6, 2022

The new version (0.7.10) includes this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants