Hi,
I fixed this issue. Somehow when I install custom module It overwrites my app/etc/env.php file to
return 1
=> solution I copied the sample env.php then modify some info to match with the server including: admin url, database name, database username, password
then It worked.
@duytran21
Can you please help me with a bit more detail, I am running in the exact same error when I run magento setup:upgrade:
Notice: Undefined index: websites in /home/playsports/public_html/magento2/vendor/magento/module-config/App/Config/Type/System.php on line 248
after I did:
magento module:disable Dotdigitalgroup_Email
From your resolution I can't follow exactly how to fix my issue. Thank you.
I am also getting this when i compile:
Then I ran:
magento setup:di:compile
And now I am getting
Compilation was started.
Interceptors generation... 4/7 [================>-----------] 57% 6 secs 188.0 MiB
[Exception]
Warning: array_replace_recursive(): Argument #1 is not an array in /home/playsports/public_html/magento2/vendor/magento/framework/App/DeploymentConfig/Writer.php on line 135
setup:di:compile
hi @mikeguy,
Did you check your env.php in app/etc/ yet? How does it look like? Can you post it ?
Usually we messed up with module installation somehow magento overwrite it with without any configuration. IMO you should check env.php first. Are you able to run php bin/magento in your terminal?
@duytran21
/home/playsports/public_html/magento2/app/etc
env.php
this is all there is in it:
<?phpreturn 1;
Here is my solution:
yup that's mean it has wrong info. Here is sample:
copy it to env.php file and set the info match with your system.
<?php
return array (
'backend' =>
array (
'frontName' => 'admin_abc',
),
'crypt' =>
array (
'key' => '1e78289eec442c6b6afc044ac75a07e5',
),
'db' =>
array (
'table_prefix' => '',
'connection' =>
array (
'default' =>
array (
'host' => 'localhost',
'dbname' => 'magento',
'username' => 'magento',
'password' => '',
'active' => '1',
),
),
),
'resource' =>
array (
'default_setup' =>
array (
'connection' => 'default',
),
),
'x-frame-options' => 'SAMEORIGIN',
'MAGE_MODE' => 'developer',
'session' =>
array (
'save' => 'files',
),
'cache_types' =>
array (
'config' => 1,
'layout' => 1,
'block_html' => 1,
'collections' => 1,
'reflection' => 1,
'db_ddl' => 1,
'eav' => 1,
'customer_notification' => 1,
'config_integration' => 1,
'config_integration_api' => 1,
'full_page' => 1,
'translate' => 1,
'config_webservice' => 1,
),
'install' =>
array (
'date' => 'Thu, 08 Feb 2018 01:52:53 +0000',
),
);
@duytran21
thank you so much for the reply
I will try the above and let you know.
Username and password for your phpadmin database.
2018-03-20 18:13 GMT-07:00 Mike notifications@github.com:
@duytran21 https://github.com/duytran21
the username and password is for what ? the admin backend?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/magento/magento2/issues/14018#issuecomment-374809054,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKW6_LvarQCtofunvUqi5Coz-71I6mwuks5tgak0gaJpZM4SjPlS
.
--
Yours sincerely,
Duy Tran
@duytran21
yes it was the env.php file that was corrupted.
I have re-built it and now everything seems fine.
Somehow the env.php got corrupted when I disabled a module or added another one as I was building my store.
Thank you very much.
It's may by retailed with NewRelicReporting configuration, in my trace i see too NewRelicReporting:
Exception: Notice: Undefined index: websites in vendor/magento/module-config/App/Config/Type/System.php on line 248 in vendor/magento/framework/App/ErrorHandler.php:61
Stack trace:
#0 vendor/magento/module-config/App/Config/Type/System.php(248): Magento\Framework\App\ErrorHandler->handler(8, 'Undefined index...', '/home/veluvia/w...', 248, Array)
#1 vendor/magento/module-config/App/Config/Type/System.php(192): Magento\Config\App\Config\Type\System->cacheData(Array)
#2 vendor/magento/module-config/App/Config/Type/System.php(152): Magento\Config\App\Config\Type\System->loadDefaultScopeData('default')
#3 vendor/magento/framework/App/Config.php(131): Magento\Config\App\Config\Type\System->get('default/newreli...')
#4 vendor/magento/framework/App/Config.php(80): Magento\Framework\App\Config->get('system', 'default/newreli...')
#5 vendor/magento/module-new-relic-reporting/Model/Config.php(91): Magento\Framework\App\Config->getValue('newrelicreporti...')
#6 vendor/magento/module-new-relic-reporting/Plugin/HttpPlugin.php(49): Magento\**NewRelicReporting**\Model\Config->isNewRelicEnabled()
#7 vendor/magento/framework/Interception/Interceptor.php(121): Magento\NewRelicReporting\Plugin\HttpPlugin->beforeCatchException(Object(Magento\Framework\App\Http\Interceptor), Object(Magento\Framework\App\Bootstrap), Object(Exception))
#8 vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\Http\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Bootstrap), Object(Exception))
#9 generated/code/Magento/Framework/App/Http/Interceptor.php(39): Magento\Framework\App\Http\Interceptor->___callPlugins('catchException', Array, Array)
#10 vendor/magento/framework/App/Bootstrap.php(261): Magento\Framework\App\Http\Interceptor->(Object(Magento\Framework\App\Bootstrap), Object(Exception))
#11 index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#12 {main}
@chrom Unfortunately this stack trace doesn't seem to be indicating the problem. It would be great if you included steps to reproduce and preconditions as well.
It seems that this is not related to NewRelicReporting, I'm not sure I can reproduce this error now. But I guess there is a problem and the reason is not clear yet.
@duytran21, thank you for your report.
We were not able to reproduce this issue by following the steps you provided. If you'd like to update it, please reopen the issue.
Most helpful comment
Hi,
I fixed this issue. Somehow when I install custom module It overwrites my app/etc/env.php file to
return 1
=> solution I copied the sample env.php then modify some info to match with the server including: admin url, database name, database username, password
then It worked.