I have installed fresh magento 2.41 in windows with xamp. I have followed this tutorial to install.
After installation I am receiving this error An error has happened during application run. See exception log for details.
while I am accessing either homepage or admin page.
I am accessing the magento site from this url http://mystore.magento.com/. If I access from localhost/magento241 it’s showing 404 not found.
I tried to clear cache but it didn’t worked.
Log Files are here :
1 exception(s):
Exception #0 (Exception): Warning: Use of undefined constant SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES - assumed 'SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES' (this will throw an Error in a future version of PHP) in C:xampphtdocsmagento241vendormagentoframeworkEncryptionAdapterSodiumChachaIetf.php on line 40
Exception #0 (Exception): Warning: Use of undefined constant SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES - assumed 'SODIUM_CRYPTO_AEAD_CHACHA20POLY1305_IETF_NPUBBYTES' (this will throw an Error in a future version of PHP) in C:xampphtdocsmagento241vendormagentoframeworkEncryptionAdapterSodiumChachaIetf.php on line 40
<pre>#1 MagentoFrameworkEncryptionAdapterSodiumChachaIetf->encrypt() called at [vendormagentoframeworkEncryptionEncryptor.php:399]
#2 MagentoFrameworkEncryptionEncryptor->encryptWithFastestAvailableAlgorithm() called at [vendormagentomodule-configAppConfigTypeSystem.php:339]
#3 MagentoConfigAppConfigTypeSystem->cacheData() called at [vendormagentoframeworkCacheLockGuardedCacheLoader.php:137]
#4 MagentoFrameworkCacheLockGuardedCacheLoader->lockedLoadData() called at [vendormagentomodule-configAppConfigTypeSystem.php:281]
#5 MagentoConfigAppConfigTypeSystem->loadDefaultScopeData() called at [vendormagentomodule-configAppConfigTypeSystem.php:207]
#6 MagentoConfigAppConfigTypeSystem->getWithParts() called at [vendormagentomodule-configAppConfigTypeSystem.php:181]
#7 MagentoConfigAppConfigTypeSystem->get() called at [vendormagentoframeworkAppConfig.php:132]
#8 MagentoFrameworkAppConfig->get() called at [vendormagentomodule-backendAppConfig.php:51]
#9 MagentoBackendAppConfig->getValue() called at [vendormagentomodule-backendAppAreaFrontNameResolver.php:109]
#10 MagentoBackendAppAreaFrontNameResolver->getFrontName() called at [vendormagentomodule-backendHelperData.php:209]
#11 MagentoBackendHelperData->getAreaFrontName() called at [vendormagentomodule-backendAppRequestPathInfoProcessor.php:50]
#12 MagentoBackendAppRequestPathInfoProcessor->process() called at [generatedcodeMagentoBackendAppRequestPathInfoProcessorProxy.php:95]
#13 MagentoBackendAppRequestPathInfoProcessorProxy->process() called at [vendormagentoframeworkAppRequestHttp.php:148]
#14 MagentoFrameworkAppRequestHttp->getOriginalPathInfo() called at [vendormagentoframeworkAppRequestHttp.php:163]
#15 MagentoFrameworkAppRequestHttp->getPathInfo() called at [vendormagentoframeworkAppRequestHttp.php:213]
#16 MagentoFrameworkAppRequestHttp->getFrontName() called at [vendormagentoframeworkAppHttp.php:111]
#17 MagentoFrameworkAppHttp->launch() called at [generatedcodeMagentoFrameworkAppHttpInterceptor.php:23]
#18 MagentoFrameworkAppHttpInterceptor->launch() called at [vendormagentoframeworkAppBootstrap.php:264]
#19 MagentoFrameworkAppBootstrap->run() called at [pubindex.php:30]
</pre>
https://drive.google.com/drive/folders/1OJaik33qhQL-X3X26LhFJBtUrk4bU5Cm?usp=sharing
2
Answers
Please make sure you have installed the sodium PHP extension.
You can check that with
php -i | grep -i sodium
On Windows
Add "
extension=sodium
" to php.ini (no quotes)Copy php/libsodium.dll to apache/bin/
Restart Apache
This works for me works on Windows.
I changed my php version from 8.0 to 8.1 on my linux (centOS) web hosting and had to add the following line to the relevant
php.ini
showing inphpinfo()
:Once I did this the problem was solved!