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

2 REPLIES 2

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

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.