I had a moodle installation on my local machine with everything running smoothly.
After copying the moodle installation folder to a different server and importing the database (from the local machine) to that server, everything still appeared to be running well, except that the pictures were broken. The pictures could not be found in the moodledata folder on the local machine, so I believe that moodle somehow stores these pictures (internally) inside a database.
In which table in the database can I find the pictures so that I can remove them?
Is it by any means possible to repair the links to the pictures in the database so that the server will recognise them? Or do I need to fix them manually?
In the future, will it be easier to make use of a repository when copying installations across from one system to another?
I find it hard to understand the architecture that moodle uses to manage pictures.
The only useful information I could find on where the pictures could be stored, was encrypted by some series of number (see picture below).
Any help would be appreciated.
Links to images use full URL at the time they are linked (not relative addressing) - which gets recorded in the db. Thus, when moving a Moodle to a new host, the step most folks miss is editing the SQL dump to import with a global search and replace for 'http://oldserver/' to 'http://newhost/' before importing.
There is, however, a utility to recover:
Heed what it says (the warning). BACKUP your DB before using in case of error.
'spirit of sharing', Ken
I thank you for this expert advice. We are running a moodle test server and I tried to implement what you explained on the test server.
I used MySQL Administrator and created a backup file of the localhost Moodle version. Editing the backup file was easy to change the moodle installation to point to the right URL.
Your solution worked wonderful!