Moodle 1.9 and php5.3 ?

Moodle 1.9 and php5.3 ?

by Anne Sauvy -
Number of replies: 9

Hello,
I have a Moodle 1.9 with PHP5.2.
I would like to migrate PHP5.3
Is that the Moodle 1.9 will support the change of PHP before I did the update to Moodle 2.3

thanks,
sauvymer

Average of ratings: -
In reply to Anne Sauvy

Re: Moodle 1.9 and php5.3 ?

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Hi Sauvymer, this is actually the wrong question, or the right question asked around the wrong way. Will PHP 5.3 support Moodle v1.9 while I then upgrade to Moodle v2.3? Yes certainly, it will, you can even run your two Moodles parallel if you chose to, just have different cookie prefix's and they will both run properly. 

In reply to Colin Fraser

Re: Moodle 1.9 and php5.3 ?

by Anne Sauvy -

Thank you very much.

PHP 5.3 support Moodle v1.9

1 can move my php.

sauvymer

In reply to Anne Sauvy

Re: Moodle 1.9 and php5.3 ?

by Bret Miller -
Picture of Particularly helpful Moodlers

It depends on which 1.9.x version. Certainly the latest (1.9.19+) will run on php 5.3. However, some earlier 1.9 versions did not. 

In reply to Bret Miller

Re: Moodle 1.9 and php5.3 ?

by Timothy Takemoto -

Ah, thank you. perhaps I need to update my 1.9.10 to 1.19.19.

1.19.10 was the most advanced they had in the Fantastico (Simple Scripts) auto installer.

In reply to Colin Fraser

Re: Moodle 1.9 and php5.3 ?

by Timothy Takemoto -

I have a recent (2.3.9?) Moodle and 1.9.10 Moodle on a shared server (ipower - I had to change one bit of the 2.3.9 code to make it work on ipower).

But for some reason when I change to php 5.3 the 1.9.10 throws an "Internal server error", (whereas of course the 2.3.9 says it needs 5.3).

I guess it is probably the php.ini of the 5.2 that is at fault. I know I will move the 5.2 php.ini accross to php 5.3.

When I do that (use php 5.3 using the php 5.2 php.ini) I get Internal server error on my 2.3.9

And as above, when I use php 5.3 with its own php.ini I get internal server error on my 1.9.10

It will not hurt that much to swap between the two.

But it would be cool to have them both usable at once. I am using the 1.9.10 to create backups that the 2.3.9 can read. 2.3.9 can not read my 1.6.x backups and throws an error. Not surprisingly smile Fortunately 1.9.10 can restore my 1.6.x courses fine.

I used http://text-compare.com/ to compare the two php.ini's and get the following differences.  I would like to know how to change php 5.3's php.ini to make it compatible with 1.9.10 (assuming that it is 5.3's php.ini that is the problem)

php 5.2's php.ini
allow_call_time_pass_reference = On
php 5.3's php.ini
allow_call_time_pass_reference = Off
php 5.2's php.ini
;error_reporting = E_ALL & ~E_NOTICE
php 5.3's php.ini
error_reporting = E_ALL & ~E_NOTICE & ~E_DEPRECATED
php 5.2's php.ini

display_errors = On
php 5.3's php.ini
display_errors = On
php 5.2's php.ini
;html_errors = Off
php 5.3's php.ini
html_errors = Off

php 5.2's php.ini
magic_quotes_gpc = On (I can remember that this seting made a difference in the past. Yes. In the very old days it needed to be on but since Moodle 2.0 it must be off. See Tim Hunt's second post. This explains why moodle 5.3 throws an internal server error if I use the 5.2's php.ini but it does not explain why 1.9.10 needs 5.2)
php 5.3's php.ini
magic_quotes_gpc = Off
php 5.2's php.ini (nothing nada zip)
php 5.3's php.ini

max_file_uploads = 20
php 5.2's php.ini

session.save_path = /home/users/web/secret/ipw.secret/public_html/cgi-bin/tmp
php 5.3's php.ini (nothing nada zip) [This looks interesting. Perhaps if I add the above line to 5.3's php.ini?)
php 5.2's php.ini
2session.gc_divisor = 100
php 5.3's php.ini
2session.gc_divisor = 1000
php 5.2's php.ini
session.bug_compat_42 = 1
session.bug_compat_warn = 1
php 5.3's php.ini
session.bug_compat_42 = Off (perhaps 1.9.10 needs these? But they are only warnings)

session.bug_compat_warn = Off

There are nearly 2000 lines in the php 5.3's php.ini and a vast number of differences in the comments, so I may have missed other differences.

Of the 5.3 php.ini settings, does anything stand out as likely to prevent 1.9.10 from functioning?

TT

In reply to Timothy Takemoto

Re: Moodle 1.9 and php5.3 ?

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

There's a name I've not heard in a while tongueout

Timothy - I'm sceptical you should need to worry so much about php.ini. It *should* work - at least mostly - with the default one for any recent version of PHP. Have you checked your web server error log to see what the underlying problem is?

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

Re: Moodle 1.9 and php5.3 ?

by Timothy Takemoto -

Hi Howard
I hope it is not too cold up there. I am not sure I can check my server log on ipower. But I think that the problem may well be that as Bret Miller - Thank you - says, I need to move to 1.9.19. For some reason I assumed that Simple Scripts would be using the most up to date version of 1.9 but no. So it serves me right. In the old days I would not have touched the thing.

Tim
I

In reply to Timothy Takemoto

Re: Moodle 1.9 and php5.3 ?

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 know I go on about it a lot... but *this* is why you shouldn't use these scripts. There is almost no advantage and you now have no control over which version you run.

In reply to Timothy Takemoto

Re: Moodle 1.9 and php5.3 ?

by Bret Miller -
Picture of Particularly helpful Moodlers

You might try upgrading the 1.9.10 to 1.9.19+. I do remember having some issues with PHP 5.3 at some point in the 1.9.x series. Later versions fixes those issues. I don't remember exactly which release and it's hard to find it in the log because the fixes were backported from the 2.0 branch.

Average of ratings: Useful (1)