Closed
Description
I got the error message "web setup wizard is not accessible" while accessing a magento 2 instance, before installing.
This error reproduces when I try to install Magento 2 in a folder of the document root.
Preconditions:
- Magento2 version 0.42.0-beta2
- Using Xampp on Windows 7 - not sure if this is important
- Document root of server is
D:/path/to/doc_root/
- base url http://example.com
Steps to reproduce:
- Create subfolder 'magento2' in the document root.
- cd 'D:/path/to/doc_root/magento2'
- git clone https://github.com/magento/magento2.git .
- composer install
- access http://example.com/magento2/ in browser
Expected result:
- I'm redirected to 'http://example.com/magento2/setup'
Actual result:
-
I get an error message
Application is not installed yet.
NOTE: web setup wizard is not accessible.
In order to install, use Magento Setup CLI or configure web access to the following directory: D:/path/to/doc_root/setup
I did some digging and found that the method Magento\Framework\App\SetupInfo::isAvailable
checks if setup
is a subfolder of the doc root like this:
$isSubDir = false !== strpos($setupDir . '/', $this->docRoot . '/');
But $this->docRoot
already has a slash at the end.
Removing the last slash solve the problem
$isSubDir = false !== strpos($setupDir . '/', $this->docRoot);