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

Installer cannot verify php version - PHP 5.5.16-1+deb.sury.org~precise+1 #1066

Closed
mszterlingfsite opened this issue Feb 27, 2015 · 8 comments
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@mszterlingfsite
Copy link

I'm on ubuntu and my php version is

PHP 5.5.16-1+deb.sury.org~precise+1 (cli) (built: Aug 25 2014 10:23:41) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies

While using web installer - there is a ajax call to /setup/index.php/environment/php-version
and that is returning error 500

vendor/composer/composer/src/Composer/Package/Version/VersionParser.php:370

Could not parse version constraint 5.5.16-1+deb.sury.orgprecise+1: Invalid version string "5.5.16-1+deb.sury.orgprecise+1"

@mszterlingfsite
Copy link
Author

Just to add comment - installed should be able to deal with error 500 returned by those ajax requests so message can be passed to the user.

@devgas
Copy link

devgas commented Feb 27, 2015

I'm on ubntu too and have same issue. My php version is
"PHP 5.5.9-1ubuntu4.6".

For temporary solving issue I reverted changes to "MAGETWO-33385: Run static code tests in setup folder" commit.

@monkeysee
Copy link
Contributor

Thanks for reporting, we have created internal ticket MAGETWO-34667 for the problem.

@anupdugar anupdugar added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Feb 27, 2015
@mszterlingfsite
Copy link
Author

If I can suggest - same as Seldaek - change the way it is done in Magento\Setup\Controller\Environment
Example how they parse php version in Composer is
https://github.com/composer/composer/blob/master/src/Composer/Repository/PlatformRepository.php#L38-44

        try {
            $prettyVersion = PHP_VERSION;
            $version = $versionParser->normalize($prettyVersion);
        } catch (\UnexpectedValueException $e) {
            $prettyVersion = preg_replace('#^([^~+-]+).*$#', '$1', PHP_VERSION);
            $version = $versionParser->normalize($prettyVersion);
        }

@versedi
Copy link

versedi commented Mar 1, 2015

Same happening to me.

UnexpectedValueException

File:
 /var/www/html/magento2/vendor/composer/composer/src/Composer/Package/Version/VersionParser.php:370

Message:
 Could not parse version constraint 5.5.12-2ubuntu4.2: Invalid version string "5.5.12-2ubuntu4.2"

What's weird is that I've managed to remove disabled="disabled" from button and for once it got me on second screen in setup wizard....and I've finalized the installation.

@versedi versedi mentioned this issue Mar 1, 2015
@rorteg
Copy link

rorteg commented Mar 2, 2015

I agree with the @mszterlingfsite:
preg_replace('#^([^~+-]+).*$#', '$1', PHP_VERSION)

@safwkhan
Copy link
Contributor

safwkhan commented Mar 2, 2015

Thanks all for your suggestions as well! We are working on it (internal ticket# MAGETWO-34667).

@mazhalai
Copy link
Contributor

mazhalai commented Mar 6, 2015

This issue has been fixed in 0.42.0-beta11
Thank you for reporting the issue.

@mazhalai mazhalai closed this as completed Mar 6, 2015
magento-team pushed a commit that referenced this issue Apr 28, 2017
Fixed issues:
- MAGETWO-65525 Add support for PHP 7.1.x
- MAGETWO-63672 Upgrade outdated libraries w/composer (minor versions)
- MAGETWO-65715 Upgrade zend Framework 1 to 1.12.20
- MAGETWO-52770 Upgrade composer to stable version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

9 participants