Due to site hacker need to upgrade from 2.0.1 to any other version

Due to site hacker need to upgrade from 2.0.1 to any other version

by Christina T. -
Number of replies: 18

Hello, the server we are hosting got hijacked and our site talleresilam.org went down. The pages lost are the index.php / html. We have the version 2.0.1 and we either need that installation package (not available in the moodle downloads page) or to tell us which package we can upgrade too, WITHOUT looksing the content since we are in the middle of the courses... Or we just need the index.php files.

I appreciate your help.. it is really urgent..

Thank you,

Christina

Average of ratings: -
In reply to Christina T.

Re: Due to site hacker need to upgrade from 2.0.1 to any other version

by Mauno Korpelainen -

You can find the recent versions of moodle 2.0 from http://download.moodle.org/stable20/ but in your situation I would download the latest version of Moodle 2.0.4+ from http://download.moodle.org/ 

( http://download.moodle.org/download.php/stable20/moodle-latest-20.zip or http://download.moodle.org/download.php/stable20/moodle-latest-20.tgz )

You need the old config.php in addition to a fresh package ( & old moodledata & database ) - just make sure that there is no new injected code in config.php as well.

And before you get yours site up/down again check http://docs.moodle.org/20/en/Security_overview

In reply to Mauno Korpelainen

Re: Due to site hacker need to upgrade from 2.0.1 to any other version

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
In reply to Visvanath Ratnaweera

Re: Due to site hacker need to upgrade from 2.0.1 to any other version

by Christina T. -

Thank you all,

we are upgrading the version, the hacker entered in all the clients of our hosting company througn the cpanel and changed the index.php files of all the sites (joomla, pages, moodle, etc.) . We are urrently backing up the moodle data as sugested to ugrade to 2.0.4+

 

 

In reply to Christina T.

Re: Due to site hacker need to upgrade from 2.0.1 to any other version

by Christina T. -

During the update (we did a test with a 2.0.3 version that was empty) occured the error

Lo sentimos, el plugin "block/backup" es defectuoso o no actualizado: no se puede continuar. (WE ARE SORRY THE block/backup is defected or not updated: you cannot continue)

Más información sobre este error  (there is no information on the link)

Debug info: Missing version.php file.
Stack trace:
  • line 602 of /lib/upgradelib.php: plugin_defective_exception thrown
  • line 273 of /lib/upgradelib.php: call to upgrade_plugins_blocks()
  • line 1427 of /lib/upgradelib.php: call to upgrade_plugins()
  • line 311 of /admin/index.php: call to upgrade_noncore()

 

ALSO at the table of results we get the message:

blocks/backup backup

No estándar (a punto de ser instalado)

(NOT STANDARD at the point to be installed)

but the 204+ version does not have a folder of the blocks/backup in the zip file i downloaded..

Any ideas what to do?

Thank you,

Christina

In reply to Christina T.

Re: Due to site hacker need to upgrade from 2.0.1 to any other version

by Mauno Korpelainen -

I hope I am not wrong but in my opinion NO VERSION of moodle has such block. I suspect that somebody has accidentally moved or copied folder "backup" (from root of your moodle) to blocks folder.

There should be no such folder in blocks/ - you may delete folder blocks/backup and upgrading should continue (if other files of moodle 2.0.4+ are in such folders where they should be).

Did you overwrite old folder of moodle with new files (old files remained in the same folder) or did you rename the old folder to something else, uploaded a fresh version of moodle 2.0.4+ to original path and copied config.php to this new folder (fresh moodle) ?

If the backup folder has been accidentally moved to blocks folder it might have the following files and folders

backup

In reply to Mauno Korpelainen

Re: Due to site hacker need to upgrade from 2.0.1 to any other version

by Christina T. -

Yes!!.. you were right.. must have been an accident.. so many folders did not compare properly.. now it works smile..

We shall try now with the final version (overight the folders), hope it works well!

In reply to Christina T.

Re: Due to site hacker need to upgrade from 2.0.1 to any other version

by Christina T. -

Unfortunatelly the second moodle we cannot fix it yet..

We did the same steps replacing the folders from 201 to 204+, put the config.php (keep moodledata and database).

1) the main page: talleresilam.org is in white

2) the login page: http://www.talleresilam.org/login/index.php

gets the 2 errors of

  • record_exists() not available anymore
  • and not always the fatal error of allower memory size

I appreciate your help!

 

 

Attachment talleres.PNG
In reply to Christina T.

Re: Due to site hacker need to upgrade from 2.0.1 to any other version

by Mauno Korpelainen -

This fatal error is caused by too low memory limit in settings of php.ini - for some reason the value 128MB has not been enough and depending on your site configuration php memory_limit could be set for example to 512MB - see for example http://docs.moodle.org/20/en/Errors_FAQ#Fatal_error_allowed_memory_size_exhausted._How_do_I_increase_my_php_memory_limit.3F

 

I am not totally sure about this "record_exists() not available anymore" message - did you have some 3rd party activities/non core question types etc installed (you may need to add the upgraded versions of non core activities too)? Or it might be caused by the fact that upgrading is not yet finished and moodle could try to use partly old files and partly new files - so you should get that memeory limit higher first.

In reply to Mauno Korpelainen

Re: Due to site hacker need to upgrade from 2.0.1 to any other version

by Christina T. -

Oh, this is so complicated. The hacker must have left something somewhere and bad luck accumulates, its been 4 days now..

The memory limit, ok, fixed. BUT if we try to upload the old config.php we get a white page everywhere and there is no going further. If we do not put the config, and continue with the new installation we get en error about mysqli_native_moodle_database.php...

We are opting for a fresh installation to a new folder and then importing the data, following the instructions that we found on the forums.. Really I do not see the point in all this hacking..just sad.

In reply to Christina T.

Re: Due to site hacker need to upgrade from 2.0.1 to any other version

by Christina T. -

Now we get this error.. please what to do.. The files are uploaded correctly..

The version is 2.0.4+ (29/9/2009)

Warning: require(/home/fundac9/public_html/talleresilam.org/2011/lib/installlib.php) [function.require]: failed to open stream: No such file or directory in /home/fundac9/public_html/talleresilam.org/2011/install.php on line 85

Fatal error: require() [function.require]: Failed opening required '/home/fundac9/public_html/talleresilam.org/2011/lib/installlib.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/fundac9/php') in /home/fundac9/public_html/talleresilam.org/2011/install.php on line 85

In reply to Christina T.

Re: Due to site hacker need to upgrade from 2.0.1 to any other version

by Mauno Korpelainen -

I guess that you already solved this issue - but your 2011 folder is still showing the php memory_limit  error...

Did you remember to check all the paths in config.php?

You can move moodle from one folder to another as long as you remember to change paths according to new location of files in config.php - and if there are some absolute links in database (links in courses/resources to some other content in courses/resources) you can use admin/replace.php to change the old absolute paths to new ones.

In reply to Mauno Korpelainen

Re: Due to site hacker need to upgrade from 2.0.1 to any other version

by Bernhard Finger -

Hello Mauno Korpelainen. Thanks for your feedback!

Sorry I can not follow you -

- what do you mean with 2011 folder??

- what do you mean "move folder"? This?
-> $CFG->dataroot  = '/home/www/web69/files/moodledata';
  should I use  admin/replace.php to change the old absolute paths to new ones. How?


- where do you see this php memory_limit error??

 

Thanks 4 any feedback! Cheers

 

In reply to Bernhard Finger

Re: Due to site hacker need to upgrade from 2.0.1 to any other version

by Mauno Korpelainen -

Bernhard,

my answer was for Christina - http://moodle.org/mod/forum/discuss.php?d=186691#p814184

Their site has a subfolder /2011

I suppose you got email copy of posts to this forum and thought it was an answer to your post elsewhere... wink

In reply to Mauno Korpelainen

Re: Due to site hacker need to upgrade from 2.0.1 to any other version

by Doug Moody -

Have you considered that your server might have "accidentally" reverted to an earlier PHP version? Check that out, because it has happened to me on a couple of occasions. I went back to the right version, and all was well.

In reply to Doug Moody

Re: Due to site hacker need to upgrade from 2.0.1 to any other version

by Christina T. -

Honestly, at this point nothing surprises me from inmotionhosting..

At the moment we are trying the php.ini but I think it must go to every subfolder because the message pops up here and there. The .htaccess gave a blank / error page to all the site.

Also on top of it we get the error message Tha Files Do not Exist for some of the attachments (I guess somewhere there is a problem communicating with the moodledata?)

Some students cannot use their passwords

AND when uploading files we get the following combo errors:

ERROR: Invalid JSON string
{"nologin":true,"nosearch":true,"norefresh":true,"list":[],"dynload":false,"upload":{"label":"Attachment","id":"repo-form"},"repo_id":3}

Fatal error:  Allowed memory size of 134217728 bytes exhausted (tried to allocate 235428096 bytes) in Unknown on line 0   {I GUESS that would be the php.ini missing...}

This is the 6th moodle in the site .. but has been the most tricky as it the only one we try to import data from a previous version.. At least now we can see the courses..

I suppose somewhere there must be the attachments too... any suggestions mostly helpful as for the moment we try every single proposal we have found in the forums with similar problems..

In reply to Christina T.

Re: Due to site hacker need to upgrade from 2.0.1 to any other version

by Christina T. -

Finally, online. Once the hosting company finally changed the memory limit to 512 all problems just went away.

Thank you for your support all this time!

Christina

In reply to Mauno Korpelainen

Re: Due to site hacker need to upgrade from 2.0.1 to any other version

by Christina T. -

Aahh.. almost there!!..Thank you for all the tips..

the memory size.. in which folder do I put it?

It should be an .htaccess, but the content of it just says "Deny all.."

CFG->wwwroot   = 'http://www.talleresilam.org/2011';
$CFG->dataroot  = '/home/fundac9/public_html/moodledata2011';

The instructions in the forum say how to put it .. but not.. where wink

In reply to Christina T.

Re: Due to site hacker need to upgrade from 2.0.1 to any other version

by Mauno Korpelainen -

.htaccess file should be in that root where you want it to have effect - in this case in the same folder as your moodle (and config.php). If there is no .htaccess file you can copy one for example from moodledata folder or create one with text editor (without .txt) or most likely you can create one with CPanel too (I have never tried...)

Anyway once you have that file write there one line with (for example)

php_value memory_limit 512M

and check if it works. If the .htaccess file does not have any effect you may need to edit php.ini file and set to php.ini for example

memory_limit = 512M

or need to ask help from your host - different sites can have different settings...