Support

Site Restoration

#38366 Following the ticket #38353: installation/framework/autoloader.php missing

Posted in ‘Site restoration’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

PHP version
8.1.12
CMS Type
Joomla!
CMS Version
3.10.11
Backup Tool Version
8.2.6
Kickstart version
latest

Latest post by guillenphoto on Monday, 23 January 2023 12:57 CST

guillenphoto

Hi,

following the ticket  #38353, I had the same issue today when trying to create a test website to migrate to Joomla 4.

I followed the advice to make a new backup. Then I was able to restore it correctly.

I have access to the backend.

But now when I want to access to the frontend, I have a 403 error.

It used to work correctly before. I did several restorations in the past.

Do you have any to solve my issue? I created a new .htaccess using Admin Tools but there is no effect.

Sincerely,

A. Guillen

guillenphoto

Hi,

I found a solution to solve my issue but I do not understand why it works.

In the .htaccess file at the line 36, I had: RewriteRule .* https://test.guillenphoto.com%{REQUEST_URI} [L,R=301]

(test is the name of the subdomain I use to create the website).

If I change by RewriteRule .* https://x.guillenphoto.com%{REQUEST_URI} [L,R=301], it works well.

Please would you let me know why?

Sincerely,

A. Guillen

nicholas
Akeeba Staff
Manager

I think the answer probably lies in the RewriteCond immediate before this RewriteRule.

That said, are you using Admin Tools' .htaccess Maker? If so, during restoration you are supposed to set .htaccess Handling to Use Default when transferring to a different domain / subdomain / subdirectory. On the restored site go to the administrator area, Components, Admin Tools, .htaccess Maker, scroll all the way down and edit the domain and path to match the new site, then Save & Create .htaccess.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

guillenphoto

Hi Nicholas,

thank you for your quick reply. I appreciate it.

I did what you mentionned. It is not working. I attached a screenshot of my Admin Tools settings.

To make the test website run, I have to change the line 36 with another website that does not exist.

I hope it will help you to figure out my issue.

 

Sincerely.

nicholas
Akeeba Staff
Manager

Can you please ZIP and attach your .htaccess file? The line itself does a redirection. I want to see what is the RewriteCond line which tells Apache when to do the redirection prescribed in the RewriteRule line.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

guillenphoto

Hi Nicholas,

 

Please find attached my .htaccess file.

Thanks for your help.

Sincerely,

A. Guillen

nicholas
Akeeba Staff
Manager

I will have to insist with my previous instructions.

On the restored site go to the administrator area, Components, Admin Tools, .htaccess Maker, scroll all the way down and edit the domain and path to match the new site (test.guillenphoto.com), then Save & Create .htaccess.

Lines 34 to 36 should now read

RewriteCond %{HTTPS} !=on [OR]
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule .* https://test.guillenphoto.com%{REQUEST_URI} [L,R=301]

These lines say that when your site is not being accessed over HTTPS it will redirect you to the HTTPS URL of the site.

You will definitely need to completely close down your browser and then restart it after making this change. Otherwise the browser "remembers" the previous (wrong) redirection.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

guillenphoto

Hi Nicholas,

thank you for your reply.

This is exactly what I do every time I do restoration. I did several of them.

But this time it is not working. I have attached the generated .htaccess one minute ago. You can check the test website: test.guillenphoto.com. There is a 403 error.

I should do something wrong but I do not know what.

Sincerely.

nicholas
Akeeba Staff
Manager

Well, your problem is not the line you are telling me you are modifying. Let's see what happens:

$ wget "test.guillenphoto.com" -O /dev/null
--2023-01-20 19:18:14--  http://test.guillenphoto.com/
Resolving test.guillenphoto.com (test.guillenphoto.com)... 128.65.195.87
Connecting to test.guillenphoto.com (test.guillenphoto.com)|128.65.195.87|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://test.guillenphoto.com/ [following]
--2023-01-20 19:18:15--  https://test.guillenphoto.com/
Connecting to test.guillenphoto.com (test.guillenphoto.com)|128.65.195.87|:443... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://test.guillenphoto.com/en/ [following]
--2023-01-20 19:18:15--  https://test.guillenphoto.com/en/
Reusing existing connection to test.guillenphoto.com:443.
HTTP request sent, awaiting response... 403 Forbidden
2023-01-20 19:18:15 ERROR 403: Forbidden.

The first bold part is what these lines do, they take you to the HTTPS site. This works.

The second bold part is Joomla itself redirecting the home page URL to the English language URL (/en).

This, leads to the 403 (third bold part) because the server does not honour the last six lines of the .htaccess file.

Try replacing the entire contents of the .htaccess file with those from Joomla's htaccess.txt file. If the problem persists, something's wrong with the server. If this, however, fixed the problem you have go to the .htaccess Maker and set “HSTS Header (for HTTPS-only sites)” to No and “Disable directory listings (recommended)” to No. Then regenerate the .htaccess file.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

guillenphoto

Hi Nicholas,

I did replace the .htaccess file with the one of Joomla. It worked fine. 

Then, I did what you wrote. I changed the two parameters to NO. I got the error 403.

I attached the new .htaccess file with the two changed parameters. I hope it will help.

I do not understand it used to work for years.

Sincerely,

A. Guillen

nicholas
Akeeba Staff
Manager

At this point you need to ask your host. This is not a problem I can reproduce locally with the settings you have used, and I'm out of educated guesses as to what may be going on.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

guillenphoto

Hi Nicholas,

thank you for your reply.

I am going to ask to my website host.

I will let you know his answer.

Please do not close the ticket. 

Sincerely,

A. Guillen

nicholas
Akeeba Staff
Manager

I am leaving your ticket in a pending state (meaning that it's not closed, just waiting feedback from you). It will remain like that for at least one calendar month so you can get back to it with more information if need be.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

guillenphoto

Thank you.

A. Guillen

guillenphoto

Hi Nicholas,

I do not understand what is going but now it works fine.

I wanted to create a ticket on my host and I made some tests to explain what was happening. But it works fine today.

So you can close the ticket. I have no clue. I did not change anything but it works.

Sorry about that.

 

Thanks for your precious help,

Sincerely,

A. Guillen

nicholas
Akeeba Staff
Manager

I have an inkling of what might be happening and your host can probably confirm it.

Normally, any change to the .htaccess file is applied immediately. That's how Apache and LiteSpeed, the two web servers which support .htaccess files, are supposed to work.

However, this also means that every time your server needs to serve any file —be it a .php file like Joomla itself, or a static file like CSS, JavaScript, or an image— the web server needs to look for .htaccess files from the file's path all the way to the web root, parse them, and decide what to do with the request. On crowded, cheap hosting this might lead to performance issue.

So, we've seen a small number of hosts actually having .htaccess files disabled but periodically run a script which reads these files and modifies the site's configuration. This happens anywhere from once ever 15 minutes to once every day. Any changes made between successive runs of the script are not taken into account.

If your host is doing this it would explain why your previous changes had zero effect (which made no sense to either of us!), but “magically” it all worked fine today. The changes we made did have the desired and expected effect, it's just that they did not take effect until several hours later.

Nicholas K. Dionysopoulos

Lead Developer and Director

🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

guillenphoto

Hi Nicholas,

thank you very much for having shared your thoughts.

It makes sense to me. I am going to contact them to confirm.

Thanks a lot for all.

Sincerel,

A. Guillen

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!