Moodle 2.9.x and PHP 7.0.x

Moodle 2.9.x and PHP 7.0.x

by Ken Task -
Number of replies: 3
Picture of Particularly helpful Moodlers

Found
https://docs.moodle.org/dev/Moodle_and_PHP7#Can_I_use_PHP7_yet.3F

which suggest 'test,test,test' but like all, am seeking if anyone
has 'tested, tested, tested' (do hate re-invention of wheel).

So, the bottom line questions:
1. Has anyone upgraded PHP to PHP 7.0.x running Moodle 2.9?
2. IF so, what, if anything, broke that was core?
(I do understand addons might have issues).

Thanks, in advance, for any such experiences shared.

'spirit of sharing', Ken


Average of ratings: -
In reply to Ken Task

Re: Moodle 2.9.x and PHP 7.0.x

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

That's easy... I have a 2.9 site sitting on my Ubuntu 16.04 dev box. 

Login page...


Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; auth_plugin_manual has a deprecated constructor in /var/www/moodle29/auth/manual/auth.php on line 38
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; auth_plugin_nologin has a deprecated constructor in /var/www/moodle29/auth/nologin/auth.php on line 32
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; auth_plugin_email has a deprecated constructor in /var/www/moodle29/auth/email/auth.php on line 32
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; auth_plugin_ldap has a deprecated constructor in /var/www/moodle29/auth/ldap/auth.php on line 86
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; auth_plugin_mnet has a deprecated constructor in /var/www/moodle29/auth/mnet/auth.php on line 33
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; mnet_encxml_parser has a deprecated constructor in /var/www/moodle29/mnet/xmlrpc/xmlparser.php on line 14
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; mnet_peer has a deprecated constructor in /var/www/moodle29/mnet/peer.php on line 13
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; mnet_environment has a deprecated constructor in /var/www/moodle29/mnet/environment.php on line 8


Dashboard...


Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; moodleform has a deprecated constructor in /var/www/moodle29/lib/formslib.php on line 124
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; MoodleQuickForm has a deprecated constructor in /var/www/moodle29/lib/formslib.php on line 1370
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; MoodleQuickForm_Renderer has a deprecated constructor in /var/www/moodle29/lib/formslib.php on line 2538
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; HTML_QuickForm has a deprecated constructor in /var/www/moodle29/lib/pear/HTML/QuickForm.php on line 97
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; HTML_QuickForm_Error has a deprecated constructor in /var/www/moodle29/lib/pear/HTML/QuickForm.php on line 1965
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; PEAR has a deprecated constructor in /var/www/moodle29/lib/pear/PEAR.php on line 87
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; PEAR_Error has a deprecated constructor in /var/www/moodle29/lib/pear/PEAR.php on line 796
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; HTML_Common has a deprecated constructor in /var/www/moodle29/lib/pear/HTML/Common.php on line 39
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; HTML_QuickForm_Renderer_Tableless has a deprecated constructor in /var/www/moodle29/lib/pear/HTML/QuickForm/Renderer/Tableless.php on line 45
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; HTML_QuickForm_Renderer_Default has a deprecated constructor in /var/www/moodle29/lib/pear/HTML/QuickForm/Renderer/Default.php on line 31
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; HTML_QuickForm_Renderer has a deprecated constructor in /var/www/moodle29/lib/pear/HTML/QuickForm/Renderer.php on line 29
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; grade_plugin_return has a deprecated constructor in /var/www/moodle29/grade/lib.php on line 1090
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; grade_seq has a deprecated constructor in /var/www/moodle29/grade/lib.php on line 2035
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; grade_tree has a deprecated constructor in /var/www/moodle29/grade/lib.php on line 2172
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; grade_export_update_buffer has a deprecated constructor in /var/www/moodle29/grade/export/lib.php on line 621
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; moodleform_mod has a deprecated constructor in /var/www/moodle29/course/moodleform_mod.php on line 9
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; table_default_export_format_parent has a deprecated constructor in /var/www/moodle29/lib/tablelib.php on line 1553

Course page... No Errors!!

Assignment...


Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; fpdi_pdf_parser has a deprecated constructor in /var/www/moodle29/mod/assign/feedback/editpdf/fpdi/fpdi_pdf_parser.php on line 22
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; pdf_parser has a deprecated constructor in /var/www/moodle29/mod/assign/feedback/editpdf/fpdi/pdf_parser.php on line 51
Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; pdf_context has a deprecated constructor in /var/www/moodle29/mod/assign/feedback/editpdf/fpdi/pdf_context.php on line 22

...and so on...

So, at a very quick glance it seems to work but throws Deprecated notices all over the place. I suspect it'll be more or less ok with debugging off but how do you know for sure?

Average of ratings: Useful (2)
In reply to Howard Miller

Re: Moodle 2.9.x and PHP 7.0.x

by Ken Task -
Picture of Particularly helpful Moodlers

Thanks, Howard.   Yep, kinda suspected there would be some strategy involved.   Don't care 'not to know'.   

So this info has led to the strategic plan of upgrading to Moodle 3.0.highest first, then upgrading PHP to 7+ - if one can find repo for PHP 7 for chosen 'poison'.    And just so others know, the item not shared previously has to do with CentOS boxen ... a CentOS 5 box, not worth doing.   A CentOS 6 box, worth doing, but it too will soon be 'eligible' for data bit obliteration.  A CentOS 7 now the 'smart' initial install and path for moving onwards/upwards with Moodle (if staying with that platform 'poison').

Dust to dust .. but where do data bits go?   Obliterated me thinks - cept for WayBack. ;)

'spirit of sharing', Ken


In reply to Ken Task

Re: Moodle 2.9.x and PHP 7.0.x

by Marina Glancy -
Picture of Core developers Picture of Moodle HQ Picture of Moodle Workplace team Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

You basically need to backport all changes from MDL-50565 epic to make Moodle 2.9 work on PHP 7.0 (please note, due to jira "bug/feature" you can only see issues in the epics when you are logged in)

Some issues were already integrated in 2.9, I think the most important for you will be MDL-52284, MDL-52333, MDL-52451, MDL-52471

I also found MDL-52410 - this was never fixed since it "only affected 2.9" - bad news for you


But honestly - I think it should be easier for you to upgrade to 3.x than to fix everything in 2.9