composer selfupdate Connection reset by peer - php

I use ubuntu in windows, and when i run composer selfupdate composer send me an error
[Composer\Downloader\TransportException]
The "https://getcomposer.org/versions" file could not be downloaded: SSL: Connection reset by peer
Failed to enable crypto
failed to open stream: operation failed
It's the same error in debian for windows.
But when i running composer selfupdate on powershell of windows
i don't have any error.
conf ubuntu
php -v
PHP 7.0.28-0ubuntu0.16.04.1 (cli) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with Zend OPcache v7.0.28-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies
with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans
conf debian
php -v
PHP 7.1.18-1+0~20180611145904.18+stretch~1.gbp2b32f6 (cli) (built: Jun 11 2018 14:59:07) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.18-1+0~20180611145904.18+stretch~1.gbp2b32f6, Copyright (c) 1999-2018, by Zend Technologies
conf windows
Windows 10 pro
Version 1803
Version OS 17134.1
php -v
PHP 7.0.23 (cli) (built: Aug 29 2017 06:13:57) ( ZTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies

Try to disable your antivirus, or try to whitelist that connection depending on which client you're using.
I already had this problem with Kaspersky.
Once disabled, the problem flew away.

Related

Problems with PASSWORD_ARGON2I in PHP 7.3.6

I read that there is a problem with PHP 7.2 and if you want to use ARGON2 you need to compile php using –with-password-argon2
In my case I'm using PHP 7.3.6
php -v
PHP 7.3.6 (cli) (built: Jun 22 2019 11:43:32) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.6, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.6, Copyright (c) 1999-2018, by Zend Technologies
with Xdebug v2.7.2, Copyright (c) 2002-2019, by Derick Rethans
If I try:
var_dump(password_hash('password', PASSWORD_ARGON2I));
it returns:
PHP Warning: Use of undefined constant PASSWORD_ARGON2I - assumed 'PASSWORD_ARGON2I' (this will throw an Error in a future version of PHP)
More info: MacOS Sierra

failed upgrading ioncube loeader for php 7.0 and 7.1 in plesk

I have installed plesk onyx in my ubuntu server plus php v7.0 and v7.1. When I tried to install WHCMS v 7.3.0 he told me that I have old ioncube loeader version and I need to make an upgrade to continue the installation so I followed that tutorial : https://support.plesk.com/hc/en-us/articles/214527125-The-IonCube-loader-is-not-available-for-Plesk-PHP-7-1
and this is the version of php v7.0 and v7.1 :
root#sd-86418:/opt/plesk/php/7.1/lib/php/modules# /opt/plesk/php/7.1/bin/php -v
PHP 7.1.10 (cli) (built: Sep 29 2017 15:42:12) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.0.3, Copyright (c) 2002-2017, by ionCube Ltd.
with Zend OPcache v7.1.10, Copyright (c) 1999-2017, by Zend Technologies
root#sd-86418:/opt/plesk/php/7.1/lib/php/modules# /opt/plesk/php/7.0/bin/php -v
Cannot load the ionCube PHP Loader - it was already loaded
PHP 7.0.24 (cli) (built: Sep 29 2017 12:33:10) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.0.3, Copyright (c) 2002-2017, by ionCube Ltd.
with Zend OPcache v7.0.24, Copyright (c) 1999-2017, by Zend Technologies
The issue is all time I got HTTP ERROR 500. Please any one help me.
Cannot load the ionCube PHP Loader - it was already loaded
In Plesk ioncube module is already installed and loaded out of the box with the corresponding plesk-php70-ioncube-loader package. You shouldn't install it as described in the mentioned KB article.
Actually, it is a bad idea to install WHMCS on the server where Plesk is already installed. Consequences may be unpredictable. Anyway, why do you think that WHMCS installer uses Plesk PHP /opt/plesk/php/7.0/bin/php instead of OS vendor's PHP from /usr/bin/php with own outdated ioncubeloader?

HP Startup:Unable to load dynamic library

how can resolve this probelm
pi#raspberrypi:~ $ php -v
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20131226/mosquitto.so' - /usr/lib/php5/20131226/mosquitto.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 5.6.20-0+deb8u1 (cli) (built: Apr 28 2016 00:01:26)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
I resolve this problem by write this commands
sudo pecl install Mosquitto-alpha
and created mosquitto.ini in
/etc/php5/mods-available/mosquitto.ini
and add this code
extension=mosquitto.so

constant cannot be resolved on a server

constants.php
<?
define('GREETING', 'Hello World');
?>
index.php
<?php
require("constants.php");
echo GREETING;
?>
This code gives me an error : PHP Notice: Use of undefined constant GREETING - assumed 'GREETING'
(Server 1 - Not Working) Ubuntu 14.04
PHP 5.5.9-1ubuntu4.14 (cli) (built: Oct 28 2015 01:34:46)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
(Server 2 - Working) CentOS 6.3
PHP 5.4.13 (cli) (built: Mar 14 2013 08:57:49)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with the ionCube PHP Loader v4.6.0, Copyright (c) 2002-2014, by ionCube Ltd.
(Dev Environment - Working) Windows 8.1
PHP 5.5.9 (cli) (built: Feb 5 2014 13:02:39)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with the ionCube PHP Loader v4.5.3, Copyright (c) 2002-2014, by ionCube Ltd.
What could be the problem and how do I make it work for Server 1?
Previous programmer made used of short tags which turned the block into a comment

Why does running this phar file spurios characters?

I am trying to run the wp-cli on my OSX terminal. Running it on the terminal causes the following output:
PHP Version:
PHP 5.3.29 (cli) (built: Jan 7 2015 10:59:34)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2014 Zend Technologies
Why could this be happening?

Categories