Updating environment information

Permalink
We attempted to install an add-on over a new install of Concrete5 5.7.5.9. We got an error message stating the add-on required PHP 5.4. Installed PHP 5.4, Still getting the error message despite clearing cache and rebooting. While writing a ticket I noticed the PHP still reads 5.3.3 though we actually removed that from the server.

Is there some delay in reporting environment information? Some kind of secret file we have to reset?

# concrete5 Version
Core Version - 5.7.5.9
Version Installed - 5.7.5.9
Database Version - 20160615000000
# concrete5 Packages
Debug Kit (0.9.5), Deluxe Customizable Twitter Feed (0.9.9), Highlight Links 1.5 (1.5.0), Stucco (1.1.3).
# concrete5 Overrides
languages/pt_BR/LC_MESSAGES/messages.mo, languages/pt_BR/LC_MESSAGES, languages/pt_BR, languages/fi_FI/LC_MESSAGES/messages.mo, languages/fi_FI/LC_MESSAGES, languages/fi_FI, languages/fr_FR/LC_MESSAGES/messages.mo, languages/fr_FR/LC_MESSAGES, languages/fr_FR, languages/nl_NL/LC_MESSAGES/messages.mo, languages/nl_NL/LC_MESSAGES, languages/nl_NL, languages/de_DE/LC_MESSAGES/messages.mo, languages/de_DE/LC_MESSAGES, languages/de_DE, languages/en_GB/LC_MESSAGES/messages.mo, languages/en_GB/LC_MESSAGES, languages/en_GB, languages/es_PY/LC_MESSAGES/messages.mo, languages/es_PY/LC_MESSAGES, languages/es_PY, languages/it_IT/LC_MESSAGES/messages.mo, languages/it_IT/LC_MESSAGES, languages/it_IT, languages/sv_SE/LC_MESSAGES/messages.mo, languages/sv_SE/LC_MESSAGES, languages/sv_SE, languages/ru_RU/LC_MESSAGES/messages.mo, languages/ru_RU/LC_MESSAGES, languages/ru_RU, languages/el_GR/LC_MESSAGES/messages.mo, languages/el_GR/LC_MESSAGES, languages/el_GR, languages/tr_TR/LC_MESSAGES/messages.mo, languages/tr_TR/LC_MESSAGES, languages/tr_TR, languages/cs_CZ/LC_MESSAGES/messages.mo, languages/cs_CZ/LC_MESSAGES, languages/cs_CZ, languages/da_DK/LC_MESSAGES/messages.mo, languages/da_DK/LC_MESSAGES, languages/da_DK, languages/ja_JP/LC_MESSAGES/messages.mo, languages/ja_JP/LC_MESSAGES, languages/ja_JP, languages/pt_BR/LC_MESSAGES/messages.mo, languages/pt_BR/LC_MESSAGES, languages/pt_BR, languages/fi_FI/LC_MESSAGES/messages.mo, languages/fi_FI/LC_MESSAGES, languages/fi_FI, languages/fr_FR/LC_MESSAGES/messages.mo, languages/fr_FR/LC_MESSAGES, languages/fr_FR, languages/nl_NL/LC_MESSAGES/messages.mo, languages/nl_NL/LC_MESSAGES, languages/nl_NL, languages/de_DE/LC_MESSAGES/messages.mo, languages/de_DE/LC_MESSAGES, languages/de_DE, languages/en_GB/LC_MESSAGES/messages.mo, languages/en_GB/LC_MESSAGES, languages/en_GB, languages/es_PY/LC_MESSAGES/messages.mo, languages/es_PY/LC_MESSAGES, languages/es_PY, languages/it_IT/LC_MESSAGES/messages.mo, languages/it_IT/LC_MESSAGES, languages/it_IT, languages/sv_SE/LC_MESSAGES/messages.mo, languages/sv_SE/LC_MESSAGES, languages/sv_SE, languages/ru_RU/LC_MESSAGES/messages.mo, languages/ru_RU/LC_MESSAGES, languages/ru_RU, languages/el_GR/LC_MESSAGES/messages.mo, languages/el_GR/LC_MESSAGES, languages/el_GR, languages/tr_TR/LC_MESSAGES/messages.mo, languages/tr_TR/LC_MESSAGES, languages/tr_TR, languages/cs_CZ/LC_MESSAGES/messages.mo, languages/cs_CZ/LC_MESSAGES, languages/cs_CZ, languages/da_DK/LC_MESSAGES/messages.mo, languages/da_DK/LC_MESSAGES, languages/da_DK, languages/ja_JP/LC_MESSAGES/messages.mo, languages/ja_JP/LC_MESSAGES, languages/ja_JP
# concrete5 Cache Settings
Block Cache - Off
Overrides Cache - Off
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).
# Server Software
Apache/2.2.15 (Red Hat)

ArmyIMCOM
 
ob7dev replied on at Permalink Reply
ob7dev
Sometimes even though a new version of a server binary has been installed, the old version is still linked to the command itself. Hence running the php command actually triggers php5.3 instead of the newest version installed.

I'm a shell user, so I do all my server maintenance from the command line. If you have shell access to your hosting, you can run the 'which' command to see where a binary is actually pointing:

which php

This might return something like this:

/usr/bin/php

Now that I know where php is being executed from, I can find out if its linked to a different file, by listing the details of the file:

ls -l /usr/bin/php

This command simply means:
ls = list files
-l list files long (we need this to see if file is actually a link to a another file)

This might return something like:

/usr/bin/php -> /etc/alternatives/php

the '->' above means the file is actually a link to a different file.
So since my php executable is actually a link to a different file somewhere else, I'll run the list command on that file next, to see where its pointing:

ls -l /etc/alternatives/php

The response for me is:
/etc/alternatives/php -> /usr/bin/php5

So now I know my php executable is actually linking to /usr/bin/php5

When I run ls -l on /usr/bin/php5, there is no '->' returned, thats because the file is not linking anywhere, but is whats being executed when the php command is ran.


So now I know I'm running php5 for sure. Sometimes server programs will be linked to a specific version. In my case dealing with php its just linked to php5. This is usually the case with php. Which means we're back to square one, so lets try another route:

Lets find out exactly what version of php our server is running. I simply type
php --version

This outputs the php version running on my server:
PHP 5.5.9-1

If php --version is returning the wrong version for you, that it means its still installed and being called by Concrete5 instead of the new version.

How did you install the new php version? What is your hosting platform? Do you use cpanel or some other type of way to manage your hosting, or can you shell into a command line and talk to the server directly?
ArmyIMCOM replied on at Permalink Reply
ArmyIMCOM
Ob7dev:
Thanks for the quick answer. I see a couple of interesting paths to follow.
The member of our team who has actual command-line access told me he did run a
php -v check and got 5.4. He also told me he removed 5.3.
VR,
Yfsneals (part of the armyimcom team)


-----Original Message-----
From: concrete5 Community [mailto:discussions@concretecms.com]
Sent: Friday, August 26, 2016 9:30 PM
To: armyimcom@gmail.com
Subject: [Non-DoD Source] Updating environment information : 5.7 Discussion


----
ob7dev replied on at Permalink Reply
ob7dev
Which add-on did you try installing that gave you this error? It could be your hosting environment is just fine but the block is returning the wrong information.
ArmyIMCOM replied on at Permalink Reply
ArmyIMCOM
Multiple Domains.
I posted a trouble ticket with the developer (I went ahead and finished the
ticket I mentioned in the first message) and they are pretty sure we're still
running 5.3.

OTOH, Here's what our server guy sent me:
php -v
PHP 5.4.45 (cli) (built: Oct 16 2015 11:24:58)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies


----
ob7dev replied on at Permalink Reply
ob7dev
I'm unsure how this add-on gets the php version from the server, whether it asks Concrete5 or it asks the server.

The add-on may be asking the server but then caching the response, I don't know. If you tried installing before upgrading PHP maybe this is the case.

If you are able, try doing a fresh install on Concrete5, now that php5 has been upgraded, then try to install the add-on. If it works, then we know it was a caching issue.'

You don't need to wipe your old site, just do a new install to test this theory.

If it works, then the issue may have to do with caching, if a brand new install doesn't work and you get the same error, perphaps the server is trying to run the wrong version still.

One other thing to keep in mind here, php5 has two configurations, a CLI configuration, and a server configuration. To narrow down the problem, lets have you check the PHP version from the browser, rather than the command line. We can do this by uploading a php file that outputs its configuration to a web page. Just be sure to remove the file from public view when your done, as its best security practice not to keep that live.

Upload a file containing the following to somewhere you can check from a browser:
<?php
phpinfo();


If you put that file in the root of your website (such as your Concrete5 installation) and called it phpinfo.php, then open a browser and navigate to your website domain with /phpinfo.php and see what it outputs. At the very top of the file should be the php version getting called. Remove the file when your done.
ArmyIMCOM replied on at Permalink Reply
ArmyIMCOM
Ob7dev:
This makes a lot of sense, though working on the server level is still new to
me personally. I'm including our server wrangler in this discussion -- he's
the one who will have to put the file in the root directory. He might have
already done something similar.
VR,
Neal S (of ArmyIMCOM)


----