Skip to main content
Topic: PHP version reporting incorrectly... (Read 4493 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

PHP version reporting incorrectly...

This as the install completes:

You do not appear to have a version of PHP installed on your webserver that meets ElkArte's minimum installations requirements.

phpinfo reports:

PHP Version 5.4.45-1~dotdeb+7.1

command line reports:

php -v
PHP 5.4.45-1~dotdeb+7.1 (cli) (built: Sep  4 2015 23:38:46)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

Minimum requirements state > 5.2

So what's the deal guys? Can I run this please...

I've spent hours trying to find a self-hosted, responsive (yay - Bootstrap!), PHP/MySQL discussion forum that looks good, can can be easily skinned, only to hit the buffers. Where's this test carried out - can I obliterate it please???

I guess the dot deb build might be confusing your checks?

thanks
TSG



Re: PHP version reporting incorrectly...

Reply #1

The test is done comparing the required version with the native constant PHP_VERSION that is defined by PHP itself.
Out of curiosity, would you mind reporting the value of this constant?
For example:
Code: [Select]
php -r "echo PHP_VERSION;"
Bugs creator.
Features destroyer.
Template killer.

Re: PHP version reporting incorrectly...

Reply #2

~# php -r "echo PHP_VERSION;"
5.4.45-1~dotdeb+7.1<redacted as irrelevant>

;-)


Re: PHP version reporting incorrectly...

Reply #3

Incidentally, the host VM was due an upgrade so I cloned the container, and then while I was about it I removed the dot deb package, and the pinning etc. and did a dist-upgrade (to Jessie) on my new cloned container. I now have 5.6.36... (official Debian pkg) and it's producing exactly the same error on trying to load the forum... ???

Re: PHP version reporting incorrectly...

Reply #4

Can you 'echo PHP_VERSION' in an web page? I have it installed on debian using jessie and stretch along with sid, with no issues.

QuotePHP 7.0.27-0+deb9u1 (cli) (built: Jan  5 2018 13:51:52) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.27-0+deb9u1, Copyright (c) 1999-2017, by Zend Technologies

Re: PHP version reporting incorrectly...

Reply #5

& 5.4.45-1~dotdeb+7.1 comes right back at you...

I've checked php.ini to make sure none of the other dependencies are wrong - tons of headroom on all the size limits, the appropriate extensions (bcmath and gd) are there and running...

???

Re: PHP version reporting incorrectly...

Reply #6

If you can email me, I'll send you the URL so you can see for yourself... ;-)


Re: PHP version reporting incorrectly...

Reply #8

I was using Github master, but I'm now downloading this version 1.1.4 and will let you know what happens...

Re: PHP version reporting incorrectly...

Reply #9

OK, so now it doesn't complain about the PHP version, but instead tells me that my db user doesn't have ALTER, CREATE & DROP privileges.

The db user has database wide permissions for everything except GRANT. No global permissions of course, as is standard.

So what does this error message mean. Again, not what it says I think? Any ideas what is really going on here - this is a dead simple nginx / php5-fpm server that's running a load of PHP websites without issue... ???

I'm stumped.


Re: PHP version reporting incorrectly...

Reply #10

PS - the self-same db user accessed the empty db ( I dropped all the tables from previous attempts before starting this 1.1.4 install) without any complaint, and I can see all the tables etc. created by the installer, so I think CREATE works !!!

Re: PHP version reporting incorrectly...

Reply #11

Quote from: thesohogeek – So what does this error message mean.

It only throws this error if the ALTER command fails. Can you check the user privileges?

What database tables do you have in your database, if any, primarily this one is used to test the ALTER command against "log_digest"

Re: PHP version reporting incorrectly...

Reply #12

I'm afraid I'm giving up at this point. Needless to say, the privileges are all set correctly and have been throughout and yes, the log_digest table was correctly created on install, and so the worry for me is that the logic is clearly there but all these errors leave me with no confidence that we can use this live.

I asked earlier if you could tell me where these checks are being performed, because I'm perfectly prepared to get into the PHP and sort this out for myself if needs be... but without that info I've really not got time to go hunting through to find it.

Simply turning them off might even just result in a working solution - perhaps you're setting timeouts to short or something? I don't know, all I know is that a system that announces that the user cannot CREATE when they have just done so has to be a bit lame!!! Can I not get this running and then test it myself?

Re: PHP version reporting incorrectly...

Reply #13

OK, we're at line 1883 etc. in /install/upgrade.php - now to figure this out... stay tuned...

Re: PHP version reporting incorrectly...

Reply #14

OK, so all this is doing is upgrading the db from a previous schema to the required one for 1.1.4. So you can send me a clean, empty db at 1.1.4 which doesn't need upgrading and then we can bypass this completely?