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

NC mistaken PHP-FPM version 5.4.16 as PHP version #8115

Closed
ghost opened this issue Jan 30, 2018 · 16 comments
Closed

NC mistaken PHP-FPM version 5.4.16 as PHP version #8115

ghost opened this issue Jan 30, 2018 · 16 comments

Comments

@ghost
Copy link

ghost commented Jan 30, 2018

Apache & Varnish Cache & Nginx Reverse Proxy
CentOS 7.4.1708 (Core) - Kernel 3.10.0-693.17.1.el7.x86_64
Apache/2.4.2
nginx/1.12.2
PHP 5.6.30
PHP-FPM 5.4.16 (fpm-fcgi)
suPHP 0.7.2
Zend Engine v2.6.0 with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured)
MySQL 10.1.30-MariaDB
SEL permitting
Mod Security disabled

NC 12.0.4

Apparently NC is mistaken the PHP-FPM version as actual PHP version. After the successful installation of NC this is being presented

This version of Nextcloud requires at least PHP 5.6.0
You are currently running 5.4.16. Please update your PHP version.

The output from

?php
echo 'Current PHP version: ' . phpversion();
?>

is

Current PHP version: 5.6.30

@rullzer
Copy link
Member

rullzer commented Jan 30, 2018

We use PHP_VERSION see https://secure.php.net/manual/en/reserved.constants.php#reserved.constants.core

So even php seems to think you are running 5.4.16. This seems like a setup issue.

@rullzer rullzer closed this as completed Jan 30, 2018
@ghost
Copy link
Author

ghost commented Jan 30, 2018

Thanks for the feedback. Checking with php -v returns however

PHP 5.6.30 (cli) (built: Jan 28 2017 14:24:05)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v6.0.8, Copyright (c) 2002-2016, by ionCube Ltd.

Suppose php -v is not a predefined constant and returns the actual value.
What I am wondering also is why this turns up only after the installation succeeded and not at the start of the installation, assuming that NC runs a routine to check whether the requirements are met prior installation

@rullzer
Copy link
Member

rullzer commented Jan 30, 2018

well php -v isn't going via fpm.

Did you install nextcloud via the command line?

@ghost
Copy link
Author

ghost commented Jan 30, 2018

the webinstaller setup-nextcloud.php

@rullzer
Copy link
Member

rullzer commented Jan 30, 2018

Mmm I should look into that then.

But back to the original issue. If you access a file with

<?php
echo 'Current PHP version: ' . phpversion();

from the web. Does it then tell you 5.6.30?

@rullzer
Copy link
Member

rullzer commented Jan 31, 2018

The site doesn't work for me. But as stated if your php-fpm even trick php into thinking it is a different version then this is a setup issue. Please use https://help.nextcloud.com maybe somebody there has a clue. But I don't consider this a nextcloud bug.

@ghost
Copy link
Author

ghost commented Jan 31, 2018

The site is up and running working fine in FF, Edge and Vivaldi.

PHP content is served through

upstream php-handler {
    server 127.0.0.1:9000;
}

The site would not display v5.6.0 if tricked by PHP-FPM. It is already posted on forum but there is no help and thus I came here.

So, basically you are saying that NC is not conducting a check of system requirements prior installation and just forges ahead with the installation in order to surprise the user afterwards?

Understand that you cannot be bothered to consider this an issue of NC. Perhaps until another user pops up with the same trouble. Leaving me to move on to another platform then. Thanks anyway

@rullzer
Copy link
Member

rullzer commented Jan 31, 2018

So, basically you are saying that NC is not conducting a check of system requirements prior installation and just forges ahead with the installation in order to surprise the user afterwards?

No that is a valid issue. And I have it on my todo to look into it and add a check in that setup as well.

I mean the issue with php-fpm lying about its php version :)

@rullzer
Copy link
Member

rullzer commented Jan 31, 2018

Mmmm I still don't get it... https://github.com/nextcloud/web-installer/blob/master/setup-nextcloud.php#L79-L81 looks like the same check...

@ghost
Copy link
Author

ghost commented Jan 31, 2018

Explains the why the pre-natal check and the installation went ok. What is calling the post installation check, the same code?

@ghost
Copy link
Author

ghost commented Jan 31, 2018

Thought to give a go with PHP7.1.0 and upgraded the server but no such luck and the same outcome as previously with PHP5..6.0

nc setup 1

nc setup 2

nc setup 3

nc setup 4

@rullzer
Copy link
Member

rullzer commented Jan 31, 2018

could you create an issue in https://github.com/nextcloud/web-installer ?Because the installer should fail as well here indeed.

@ghost
Copy link
Author

ghost commented Jan 31, 2018

@rullzer nextcloud/web-installer#22

or perhaps the other way around and the installer should not fail but rather the tail check to be straighten out.

@ghost
Copy link
Author

ghost commented Jan 31, 2018

not sure whether/how this potentially could cause the issue but might be worth noting that the cli bits producing different version output

php -v and php-cgi -v respectively would always produce the actual installed PHP version, e.g. 7.1.0, whilst php-fpm -v always producing its own version 5.4.16

@ghost
Copy link
Author

ghost commented Feb 1, 2018

Out of curiosity removed php-fpm from the server and the NC login page is showing.

After having completed the initial NC setup and logout I put the php-fpm parser/server back to work and the NC login is still showing, presumable no more check ups run by NC after setup completion.

@ghost
Copy link
Author

ghost commented Feb 5, 2018

after update to NC 12.0.5 it is not possible to log into NC. With the php-fpm server running it shows

This version of Nextcloud requires at least PHP 5.6.0
You are currently running 5.4.16. Please update your PHP version.

And with the php-fpm server stopped it gets

502 Bad Gateway

@rullzer since the issue been created nextcloud/web-installer#22 it seems not to have garnered any attention. Am I better off to move to another file-sharing platform?

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

No branches or pull requests

1 participant