Error after updating PHP

Error after updating PHP

Napisane przez: Stuart Hoaen ()
Liczba odpowiedzi: 8

My Moodle site is running Moodle version 3.1.1 on IIS 8.5 with PHP 5.5.16 and MySQL 5.6.20.


I am trying to update PHP to version 5.6.26 but find when I do so, Moodle fails to load giving the following error:


"The page cannot be displayed because an internal server error has occurred."


I know that my PHP configuration on IIS is good as I also have a Wordpress site on the same server which is works fine on newer version of PHP.  If I revert PHP to the previous version (5.5.16) Moodle then works ok.


I have checked every log I can find but can't find the cause of the problem.  Does anyone have any clue what the issue might be please?


Many thanks

W odpowiedzi na Stuart Hoaen

Re: Error after updating PHP

Napisane przez: A. Obeid ()

Hi, did you restart the Server (IIS) after updating php?

W odpowiedzi na Stuart Hoaen

Re: Error after updating PHP

Napisane przez: Albert Ramsbottom ()

Is there a reason why you are upgrading PHP??


Albert

W odpowiedzi na Albert Ramsbottom

Re: Error after updating PHP

Napisane przez: Stuart Hoaen ()

To prepare for Moodle version 3.2 as it is required.



W odpowiedzi na Stuart Hoaen

Re: Error after updating PHP

Napisane przez: Usman Asar ()
Obraz Plugin developers Obraz Testers
Stuart, have you copied over the exact same php configuration file? that you've been using with PHP 5.5?
Server restarts are not required when upgrading PHP in IIS, just recycling application pools does the job.

There is a tutorial on setting up Moodle on IIS, where good time is spent on setting php for moodle, have a look here and see if that helps
http://blog.academictools.org/2015/12/installing-moodle-on-microsoft-windows.html

if you haven't already, and can, I recommend using PHPManager extension to install and setup PHP on IIS, it makes the job lot easier, so for that watch 2nd video on blog post.

W odpowiedzi na Usman Asar

Re: Error after updating PHP

Napisane przez: Stuart Hoaen ()

Hi Usman


Thanks for your post.  I have triple checked my PHP ini file and it is correct.


I tried installing PHP Manager as per your video (great site by the way) but it fails to install...



W odpowiedzi na Stuart Hoaen

Re: Error after updating PHP

Napisane przez: A. Obeid ()

Hi Stuart,

i am using "Web Platform Installer 5.0" for the Windows Server and there i get PHP 7 that work fine with moodle 3.

I also delete all old php versions.


W odpowiedzi na Stuart Hoaen

Re: Error after updating PHP

Napisane przez: Usman Asar ()
Obraz Plugin developers Obraz Testers

First thing, do not use Web Application Installer to install PHPmanager, it wont simply work, if base settings arent correct, also Web application installers have very old versions of scripts.

As there is PHP settings already in, just go to Handeler Mappings, and remove all PHP that is already there, in addition, removing the PHP config files from PHP folders. (liek you have just unzipped the PHP folder), reason could be, as you MAY have paths without double quotes, and in windows platforms, any path with blank spaces in between should always be included in double quotes.

Also, there are updated version for PHP Manager mentioned on site, for Server 2012 an Server 2016, you may as well want to download and use them.

This will install the PHP Manager for sure.


Just a tip, if you have more than one scripts running on server, like you mentioned WordPress and moodle, you may want to keep PHP in their respective folders (means separately) for PHP for moodle will have slightly different settings, like  Zend OpCache, where you may not need it for WordPress, and using WinCache for WordPress where you may not use it for moodle.