php discrepancy

php discrepancy

by Peter Eckstein -
Number of replies: 9

After successfully upgrading my moodle from 2.5 to 2.7 on one hostgator server, (including upgrading the php version to 5.5 using the Hostgator cpanal PHP configuration plug in). I'm now about to do the same on a different Hostgator server. Here's the discrepancy, after upgrading the php version using the plugin, I went to the moodle 2.5 that I want to upgrade, and checked under server>PHP info. There it is indicating that it is using 5.3.28, even though the Hosgator cpanal is telling me that version 5.5 is being utilized.


Does this discrepancy make a difference?  Should I just go ahead with the upgrade to 2.7 and trust that if Hostgator is telling me that 5.5 is running, everything will be fine? 

Thanks in advance!


Peter

Average of ratings: -
In reply to Peter Eckstein

Re: php discrepancy

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I'm not familiar with Hostagator so I can't be much help. However, I can certainly suggest that you should resolve this before going ahead. My guess is that Moodle will pick up the lesser version and refuse to upgrade. If it's not critical, you can always try it. It'll either work fine or it won't do anything.

In reply to Peter Eckstein

Re: php discrepancy

by Ken Task -
Picture of Particularly helpful Moodlers

It's possible that a system could run more than one version of PHP and Moodle is **not finding** the same version as whatever you are using in HostGator to tell you that.

That's got to be a HostGator technical assistance question ... and only HostGator (or someone who is hosting with them and has had the same experience) could answer for sure.   So before you get 'brave' test HostGator support.   After all, you are paying them for that, right? ;)  Get your monies worth!

'spirit of sharing', Ken

In reply to Peter Eckstein

Re: php discrepancy

by Peter Eckstein -

So....I spoke to Hostgator and they confirmed that I am in fact running PHP 5.5....They suggested that I try to upgrade and see what happens.  IF there is an issue then, they will work on resolving it.

Let's see what happens.  I'll have everything backed up, so nothing will be lost (other then time).

onward and upward!

In reply to Peter Eckstein

Re: php discrepancy

by Ken Task -
Picture of Particularly helpful Moodlers

A little Googling rendered this link:

https://support.hostgator.com/articles/hosting-guide/hardware-software/articles/hosting-guide/hardware-software/what-version-of-php-are-you-using

So ... there are 5 offerings listed on the page/link above.   Which is yours?

The other ... you have Moodle 2.5.x.  Wonder if  their .htaccess trick or 'by plugin' set your PHP to certain version of PHP and that's why the check in the 2.5.x sees the version it sees.  

How are you attempting to upgrade? Same directory of code but over writing contents? (which one should not do) or do you plan to erase all that could be seen in the moodle code directory (that might not remove the hidden from normal viewing .htaccess file which contains the line for setting PHP version).

'spirit of sharing', Ken

In reply to Ken Task

Re: php discrepancy

by Peter Eckstein -

Hi Ken,


I saw this article earlier, when I was doing my own research.  To be honest...I'm not sure where I fit here.  I run another site with hostgator, with another moodle install, and had no issues with the php version or the upgrade from 2.5 to 2.7, which is why this issue is so weird.

Also,  I'm not sure what you mean by the htaccess trick.  

I plan on renaming my current moodle directory, and then extracting the new version in its place (not writing over anything) by creating a new moodle directory.

Peter



In reply to Peter Eckstein

Re: php discrepancy

by Ken Task -
Picture of Particularly helpful Moodlers

Chart is confusing, but would think one would know IF one is on:
shared hosting, VPS Hosting with cPanel, VPS Hosting with Plesk, or Linux Dedicated Servers, etc..
From their chart, PHP 5.4.x is default on Shared Hosing, but PHP 5.5x is by 'Configuration Plugin' ... whatever that means.

You say it works on another instance.   Well, is that one under the same environment/setup?  Shared, VPS, Linux Dedicated what?  The one working on a different plan, different server(s), different domain, etc.?

Ok, still using Google here and get this (which indicates users could shoot themselves in the foot):

http://support.hostgator.com/articles/cpanel/php-configuration-plugin

This is really turning into assistance on HostGator rather than Moodle.  Don't think the 'fault' is with Moodle but configuration of your HostGator setups.  In many years Moodle usage/installs, don't think I've ever run across Moodle not finding PHP (version that was installed), but that's because I don't use shared hosting, VPS with either cPanel/Plesk, etc. but, rather, dedicated servers.

Hmmmm ... anyone out here in Moodleland host on HostGator that would/could help Peter?

'spirit of sharing', Ken

In reply to Ken Task

Re: php discrepancy

by Peter Eckstein -

Ken,

The other working instance is identical set up as this - just different servers hosted by hostgator. Both use c-panal. Both have the php configuration plug in. Both were initial installations with moodle 2.5. Last week, with tech support assistance of Hostgator, I used the php configuration plug (the topic of the link you just shared) to change the version of the php to 5.5.  it worked. Then I upgraded moodle and that worked.

Now I'm doing the exact same thing, and there is this discrepancy. What is interesting is that the site I am working on now IS running php 5.5. (we checked that yesterday with hostgator). It's just that the moodle 2.5 install doesn't read it as such. Not sure if it's a moodle issue either....hostgator said that if i upgrade and there is an issue, they will work on it.

And yes, I already have backed up everything.

Onward and upward.

In reply to Peter Eckstein

Re: php discrepancy

by Peter Eckstein -

So I took a chance and upgraded.  It worked.  I still have no clue why the old install didn't read the correct php version, but the new one does. 


So.....Thanks for your help and input.


Peter