Upgrade to 1.9 on 1and1 host

Upgrade to 1.9 on 1and1 host

by David Hogg -
Number of replies: 5
I have recently attempted to upgrade from a fully functional 1.6.5 site to a 1.9.2 installation (via 1.8). The upgrade went well until finally accessing the 'notifications' page. I received this error:

Fatal error: Out of memory (allocated 30932992) (tried to allocate 35 bytes) in /homepages/0/d98950416/htdocs/vle_zone/admin/mnet/MethodTable.php on line 77



As it appears to be a memory problem I contacted 1and1 to try and get the memory limit for php increased - no joy unless we stump up £69 p/m for a dedicated server which won't happen!

I checked the php memory settings and it shows the following

local value master value
memory_limit 96M 40M

I have tried a workaround using .htaccess file including
 
                        
Average of ratings: -
In reply to David Hogg

Re: Upgrade to 1.9 on 1and1 host

by Carlos Chavez -
Same thing occurred with my installation on 1and1.com. I contacted tech support and the guy said that he lowered the max size permitted for file uploads. He told me it was a Moodle setting, but since he did it for me I don't know where exactly this setting is located.. He made the change and the installation worked perfectly...better than my previous 1.8 install.

The tech guy told me that even if I upgraded packages, it would not upgrade the amount of php 5 memory allocated to users.

Good luck!
In reply to David Hogg

Re: Upgrade to 1.9 on 1and1 host

by Richard Enison -
DH,

So CC asks 1and1 to change a PHP setting and they do it but refuse to say how; you ask them and they refuse to do it unless you pay an additional £69 p/m. Go figure. So let's do an end-run around tech. support.

First of all, all six 1and1 packages that support PHP are Linux systems, which means they almost certainly use Apache. Here's the list: http://faq.1and1.com/scripting_languages_supported/php/2.html

All six of them support the use of .htaccess: http://faq.1and1.com/scripting_languages_supported/configuring_apache_server_using_htaccess/1.html

Which makes me wonder why your use of .htaccess caused a 500 error. Maybe you had a typo in it or something. That's something you should be able to get help on from tech support.

According to this page, you should be able to use custom php.ini files as well as .htaccess to make the change you want to make. By referencing a list of PHP directives in the online PHP manual, it implies that they support all the settings on that list via either custom php.ini or .htaccess. But pay careful attention to the last paragraph, which says not all settings are changeable and to contact tech support if you make a change with php.ini and it doesn't seem to work.

BTW, your workaround, the one that causes the 500 error, looked OK to me except that it would have actually reduced your memory limit from 96M to 40M. Lets go the other way! Maybe 128M. I'm just puzzled because the error msg. said it had only allocated about 30M and couldn't even get another 35 bytes. Very strange.

EDIT: Since the page linked to above says the php.ini file needs to be in every directory where the changed setting might be used, this script might come in handy: http://tips-scripts.com/php_ini_copy.

RLE
Average of ratings: Useful (1)
In reply to Richard Enison

Re: Upgrade to 1.9 on 1and1 host

by David Hogg -
Hi Richard,
Thanks for your reply. have tried some of the solutions, but I must apologise as I didn't note that I was using the UK 1and1 hosts.

Things get stranger!
I had a look at another installation I put on the same server (to test the compatibility) and it doesn't suffer the same problem. It was...

Moodle 1.9 + (Build: 20080409)

It has some of the same courses but not all. Would that make a difference?

I will try taking out some of the modules and blocks that I don't need as this has made a difference in the past (with 1.6)

I'll let you know how I get on.

Many thanks
In reply to Richard Enison

Re: Upgrade to 1.9 on 1and1 host

by David Hogg -
Hooray!

I took out the workshop module and it finished the install fine (didn't realise that it hadn't finished all the steps sorry).

The site is working fine now

Thanks for all your help