Problem with images after migration

Problem with images after migration

by Javier Pardo -
Number of replies: 6

Hello,

I had a Moodle installed on a VPS server with version 3.8.


Everything worked correctly but I had to migrate to a new VPS with more capacity. I have successfully migrated and the site seems to be working fine, but some images have stopped displaying. Course images or user images are not displayed or appear as broken.

All data has been recovered fine except for these images.

It seems like a permission issue but I don't know where to start looking.


Is there a way to check that it is failing?

Average of ratings: -
In reply to Javier Pardo

Re: Problem with images after migration

by Javier Pardo -
Looking at the server logs I find an error when trying to load an icon: 407 Proxy Authentication Required - GET /pluginfile.php/5/user/icon/adaptable/f1?rev=200 HTTP/2.0

Apparently it is an authentication problem but I cannot know that it may have changed from one server to another for this to be happening.

Any idea what parameter to look at to try and fix this problem?
In reply to Javier Pardo

Re: Problem with images after migration

by Javier Pardo -
I'm getting a lot of 206 responses on the server log.

I have searched for information on this answer and it appears to be: 206 Partial Content The server is successfully fulfilling a range request for the target resource by transferring one or more parts of the selected representation that correspond to the satisfiable ranges found in the request's Range header field

I suppose it may be a cause of my problem with the images, but I don't know what parameter to touch to solve this.

Any suggestions please?
In reply to Javier Pardo

Re: Problem with images after migration

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
I seem to recall a "find and replace" tool that changes URLs within Moodle's referencing for images. I have never experienced the problem that you describe, so I am a little vague about the tool. I am mentioning this to you and hope that it helps your exploration. Perhaps someone else might know more about this "find and replace" tool.
In reply to Rick Jerz

Re: Problem with images after migration

by Javier Pardo -
Hi Rick, thanks for your reply.

My question is: What to replace? The new server have the same configuration than older, same domain name but is running newer version of PHP and other services.

The strangest thing for me is that some images are loading and others are not.

I see that almost all the images that do not work are related to the theme that I am using. For example, it does not load the favicon well and neither do the user images.

I have also seen problems in some images on the front page related to the theme.

If I copy the url of an image that appears as broken and try to open it in a new tab, it stays loading for a long time and does not appear.

It is as if something is wrong in the response to the images. Some problem with permissions or similar, but I can't see anything in the logs that tells me what is happening.

It is very frustrating because this installation worked perfectly and I have never had a problem.

I have tried to enable debug mode in Moodle, but I don't see any error messages when browsing the platform. Do these messages appear on the screen or are they stored in a file?

In the previous VPS I also had two Wordpress installations. I have done exactly the same process to transfer them to the new VPS and both work perfectly.

I do not understand why with Moodle it is not like that.

I don't know where to start or what to try to try to fix the problem.

Please, I need your help. What can i prove?
In reply to Javier Pardo

Re: Problem with images after migration

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

Re: Problem with images after migration

by Javier Pardo -
HI all!!

Finally solved the problem deactivating the mod security on my server.

Now the campus works great!

Thank you all.
Average of ratings: Useful (1)