cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.3 main.ERROR: Notice: Undefined variable: _ENV

Magento 2.3 main.ERROR: Notice: Undefined variable: _ENV

Installing Magento 2.3 with php 7.1 or 7.2, on godaddy hosting.
Install with web install, goes fine.
frontend/backend appear fine.
saving configuration throws error.
Log will show:  
main.ERROR: Notice: Undefined variable: _ENV in */vendor/magento/module-config/Model/Config/Processor/EnvironmentPlaceholder.php on line 57 

php_info() in root magento directory shows ENV as being defined.
The .htaccess in root folder appears to have a fix specific to godaddy.
renaming php.ini to php5.ini appeared to fix the issue. 
....actually, that just makes it use the default php.ini that godaddy has lined up for php7.2. That will likely not be ideal because you likely created your own php.ini to increase memory limit. Using their php.ini as a template and adding your changes seems to work. 


1 REPLY 1

Re: Magento 2.3 main.ERROR: Notice: Undefined variable: _ENV

Hi @mayhem1,
I can suggest you the stack exchange solution which I have explored now so here I can share the link below
https://magento.stackexchange.com/questions/202669/admin-config-error-undefined-index-id-in-iterator...

Best regards