cancel
Showing results for 
Search instead for 
Did you mean: 

CE 2.4.2 "Archive (zip/tar)" doesn't contain a top-level index.php

SOLVED

CE 2.4.2 "Archive (zip/tar)" doesn't contain a top-level index.php

Previous versions of Magento have included a top-level index.php file but the most recent release, 2.4.2, does not. Is this intended?

 

I have checked the .tar.gz and .zip files from the "Archive (zip/tar)" section at: https://magento.com/tech-resources/download#archive-releases

 

And I've tried installing it on a couple of different servers using the steps at:

 

https://devdocs.magento.com/guides/v2.4/install-gde/composer.html#set-file-permissions

https://devdocs.magento.com/guides/v2.4/install-gde/composer.html#install-magento

 

The server requirements are met by both servers except that neither has ElasticSearch installed, though my understanding is that the lack of ES is not an install-breaker. It does add this error towards the end of the install process:

 

 

In SearchConfig.php line 81:

  Could not validate a connection to Elasticsearch. No alive nodes found in your cluster

 


But otherwise the install looks successful from the cli output. (I could post the full output here but it's very long and this post would look a bit obnoxious I think.)

 

And once the install is finished there's still no index.php. I'll then edit the .htaccess to give it a RewriteBase value since I'm installing into a subdir, and then finally load the website into a browser. It gives:

 

Not Found

The requested URL was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

-on one server and a similar 403 on the other.

 

I tried adding the 2.4.1 index.php file to the 2.4.2 install's main directory but it didn't work.

 

So am I missing something or are the 2.4.2 archives missing index.php?
Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: CE 2.4.2 "Archive (zip/tar)" doesn't contain a top-level index.php

Currently floundering about with the same issue

 

What has happened is that they have implemented the "route everything through pub for security" approach that you can find mentioned when you search around and it expects your site root to be the pub folder - so the .htaccess needs more modification than just adding this in order to work if pub is not the root but a subfolder

Adding a RewriteBase is not enough

I'm still at the trial and error stage to figure out how to make it work with the subfolder path visible, as it was on 2.4.1

View solution in original post

4 REPLIES 4

Re: CE 2.4.2 "Archive (zip/tar)" doesn't contain a top-level index.php

Currently floundering about with the same issue

 

What has happened is that they have implemented the "route everything through pub for security" approach that you can find mentioned when you search around and it expects your site root to be the pub folder - so the .htaccess needs more modification than just adding this in order to work if pub is not the root but a subfolder

Adding a RewriteBase is not enough

I'm still at the trial and error stage to figure out how to make it work with the subfolder path visible, as it was on 2.4.1

Re: CE 2.4.2 "Archive (zip/tar)" doesn't contain a top-level index.php

Thanks for the answer! I've accepted it as the solution since it does explain the problem I saw.

 

We'll have to find a way to forward http queries to the pub directory.

Re: CE 2.4.2 "Archive (zip/tar)" doesn't contain a top-level index.php

So this is marked as solved, but there isn't really a solution. Did anybody ever find one?

Re: CE 2.4.2 "Archive (zip/tar)" doesn't contain a top-level index.php

I marked the explanation as a solution since it seemed to remove the existence of an actual problem. Though we were never able figure out what Magento 2.4.2 intended to be doing and so weren't able to add it to Installatron. When the 2.4.1-p1 patch came out some time later we found we had no difficulty with that. And so now we're just waiting to see what direction 2.4.3 goes in.