Unable to install Zend using composer - zend-framework

I have been using Zend since over 2 years now and have setup environment around 10-12 times but I never got any success installing zend using composer. The error says I should have PHP version same or above required version which is always is the case. I even tried changing the version in the composer to match exactly the version with my PHP and some times installing the exact same version of PHP to match zend requirement and I always gets the same error.
How do I handle this?
Error:
Your requirements could not be resolved to an installable set of packages.
zendframework/zendframework 2.3.9 requires php >=5.3.23 -> your PHP version (5.3.6) or "config.platform.php" value does not satisfy that requirement
PHP 5.3.6 (cli) (built: Mar 17 2011 10:48:37)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies

PHP 5.3.6 which you have is older than 5.3.23, because the last number 6 of your version is lower than the last number 23 in the minimum required version of the Zend framework you want to install.
UPDATE YOUR PHP. PHP 5.3 is not maintained anymore. PHP 5.3.6 has serious security bugs that got fixed in later versions, but are still open in your version.
The current PHP version is 5.6. Upgrading from 5.3 to a newer version might have some quirks regarding changed and deprecated features, but face the facts: You will never ever be able to use any recent PHP libraries via Composer because they are all requiring newer PHP versions.

Related

Magento Upgrade from 2.2 to 2.4.5 - Big trouble with PHP version

I spent 1 week trying to upgrade Magento from version 2.2 to 2.4.
In order to proceed I have downloaded and I am using composer 1.
My PHP version is 7.1 - Perfectly compatible with Magento 2.2.
With composer 1 I was able to get a "composer require" without errors.
I then launched the "composer update" command but it goes into error due to the lack of php 7.4 or higher.
Now: I could also update the php and finish the "composer update" but then the "magento/upgrade" will not work because it is the one of Magento 2.2 which only works with php 7.1
Do you have solutions?
I am aspects to upgrade Magento
You have 2 solution:
1, If you dont want to upgrade magento 2.2 to magento 2.4, you can remove php7.4 and use php7.1 again.
2, Upgrade magento version to 2.4.x:
With magento <=2.4.3, you can use php7.4
With magetno >=2.4.4, you can use php8.1
Step by step to upgrade magento version you can read it here Upgrade magento version
For Magento 2.4.4, the minimum requirement of PHP version is 8.1 so you need to make sure to change the PHP version then run the composer require to upgrade.
Check the official documentation: https://devdocs.magento.com/guides/v2.4/release-notes/release-notes-2-4-0-open-source.html
https://devdocs.magento.com/guides/v2.4/release-notes/open-source-2-4-5.html
For upgrade process:
https://www.cloudways.com/blog/magento-2-4-upgrade/
https://devdocs.magento.com/guides/v2.4/comp-mgr/cli/cli-upgrade.html
Thanks

Deprecated Functionality: idn_to_ascii() Magento 2.3.1 with PHP 7.2

I'm using Magento 2.3.1 with PHP 7.2, facing error while creating customers account at admin end.
Found some sources on the internet to degrade PHP version.
Is there any other option available without degrading PHP 7.2?
Log:
main.CRITICAL: Exception message: Deprecated Functionality: idn_to_ascii(): INTL_IDNA_VARIANT_2003 is deprecated in /public_html/vendor/zendframework/zend-validator/src/EmailAddress.php on line 560
idn_to_ascii() at Line 560:
return (idn_to_ascii($email) ?: $email);
I encountered this exact issue after upgrading the PHP version of the server to 7.3.
Initially, the issue was with the Zend framework like yourself, but after an upgrade to Magento 2.3.5 (in an attempt to correct the problem), an identical error was thrown for the newer Laminas.
I tried a number of solutions, including downgrading guzzle from 6.5.3 to 6.5.2, as suggested here: https://stackoverflow.com/a/61596343/9667652
It seems the only solution is to downgrade PHP to 7.1. The issue continues even with PHP 7.2. I downgraded to PHP 7.1 and emails are now sending.
EDIT: As per comment by #user125661, it's important to note that PHP 7.1 is no longer supported:
PHP 7.1 has reached End of Life. To maintain PCI compliance, Magento should not be run on unsupported software. Installing from GitHub will no longer work with Magento 2.3.4/PHP 7.1. The only way to install 2.3.4 with PHP 7.1.x is with Composer. Magento recommends using PHP 7.3
See: https://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html#php
This issue has been encountered repeatedly but is not able to be reproduced reliably, as documented here: https://github.com/magento/magento2/issues/19795
Looks as though the most likely reason for the issue is servers running CentOS 6, where CentOS 7 is needed: https://github.com/magento/magento2/issues/19795#issuecomment-486432245
Best bet is to get your server onto CentOS 7, but where this is not possible, it seems the only workaround is downgrading to PHP 7.1.

Want to install SOAP on PHP5.5

I am working on ubuntu 16.04 with PHP version 5.5 now I want to use SOAP library in it.
I have already installed php-soap package(with ref. How do I enable --enable-soap in php on linux?) and tried to enable it. but it won't works for me anyway.
By searching I found php soap package are available for PHP version 5.6, 7.0, 7.1.but am working on PHP version 5.5 and in situation that I can't change PHP version of my system.
Any way or suggestion to install soap for PHP5.5 would be great help.
The SOAP package is available for all versions of PHP since at least 4 something. There are two options on how to install/enable it depending on the way your PHP was installed initially.
If your PHP was installed via the distribution's package manager you just have to install the package php-soap. On your Ubuntu this should be:
sudo apt-get install php-soap
If your PHP was compiled on your machine you will have to compile it again passing in the switch --enable-soap .This switch could differ depending on your PHP verison. Check the documentation of make in PHP's source if this is the case.

PHP 5.3.29 on Ubuntu 16.04 in order to run Joomla 1.5 locally

I'm working on a Joomla 1.5 website, which was developed with PHP 5.3. Now I'm having some incompatibilities issues with some components.
My machine runs Ubuntu 16.04.
The version of Joomla is 1.5.
PHP versions are 5.6 and 7.0 (apache is configured to run PHP 5.6)
I can't find a way to download and install it. The apt command only shows 5.5, 5.6, 7.0 and 7.1 PHP versions.
Can anyone help me?
I have joomla 1.5 on a website running. My config shows that PHP 5.4.16 is in use. Therefore, why dont you try it with PHP 5.4 and get it from the download page:
http://php.net/releases/
If you have troubles to install it on your computer. Take a look here:
https://serverfault.com/questions/353550/how-to-install-old-php-version
The link explains how you install a old php version on linux. Btw.: in the link it is only explained how to replace a PHP version. But it is possible to run different versions on a server.

Is there any compatibility issues with magento 1.5 and PHP 5.4

I have a Magento 1.5 site and PHP 5.3 version.I want to upgrade the PHP version to 5.4.Is there any compatibility issues will occur with magento 1.5? Is magento 1.5 support PHP version 5.4 ?
I don't think that Magento 1.5 is compatible with PHP 5.4.
According to http://www.magentocommerce.com/knowledge-base/entry/php54-patch, there is a Patch solving problems with Magento 1.6.0.0–1.8.1.0.
If you want to use PHP 5.4, you should consider about updating the Magento-Code or try to test it in another enviroment.
Cheers,
Chris
Magento is still patching in PHP 5.4 support. If you want the best experience in this regard, always got with the very latest version. Right now this should be 1.9.1.0.
You can easily test your own shop by enabling magento developer mode. It should display all sort of errors incl. strict warnings which you most likely will trigger with PHP 5.4 (and later on 5.5).
But as others have written, it's better you move up to a more recent version of magento.