magento2: 2.3.2 installed and bin/magento setup:upgrade not working
Preconditions (*)
- Version 2.3.1 upgraded to Version 2.3.2
Steps to reproduce (*)
- I had 2.3.1 installed and working for last couple months
- I did composer update - all was still well
- I ran composer to update to version 2.3.2
composer require magento/product-community-edition:~2.3.2 --no-update
- I then tried to fun my flush.sh which does:
bin/magento setup:upgrade bin/magento setup:di:compile bin/magento setup:static-content:deploy -f bin/magento indexer:reindex bin/magento cache:flush
Expected result (*)
- I expected the above commands to run properly and for the site to be functioning on 2.3.2.
Actual result (*)
- The site is still running, but I get this warning on screen:
Warning: Use of undefined constant SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13 - assumed 'SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13' (this will throw an Error in a future version of PHP) in /var/www/html/vendor/magento/framework/Encryption/Encryptor.php on line 153
- When I ran my flush.sh script, I get the following errors:
bin/magento setup:upgrade
There are no commands defined in the "setup" namespace.
bin/magento setup:di:compile
There are no commands defined in the "setup:di" namespace.
bin/magento setup:static-content:deploy -f
There are no commands defined in the "setup:static-content" namespace.
bin/magento indexer:reindex
There are no commands defined in the "indexer" namespace.
bin/magento cache:flush
There are no commands defined in the "cache" namespace.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 6
- Comments: 28 (16 by maintainers)
Commits related to this issue
- Add sodium extension for PHP Based on this article: https://community.magento.com/t5/Magento-DevBlog/Required-libsodium-upgrade-for-latest-Magento-release/ba-p/134808 and this issue: https://github.c... — committed to osrecio/magento-cloud by osrecio 5 years ago
- Add sodium extension for PHP Based on: this article: https://community.magento.com/t5/Magento-DevBlog/Required-libsodium-upgrade-for-latest-Magento-release/ba-p/134808 this issue: https://github.c... — committed to osrecio/magento-cloud by osrecio 5 years ago
Cloud Users - You can use this patch on 2.3.2 to fix this issue without waiting on a support ticket.
Note that there is a more “official” way to get the updated
libsodium-dev
package on debian.Docker steps:
UPDATE: I noticed there is an issue with the PHP 7.1 docker image not working with the above. In this case, you can also use PECL to install the PHP extension and enable it manually with:
I had the following problem in a gitlab ci runner during deployment:
These 3 lines solved my problem (thank you @markshust):
see also https://github.com/markshust/docker-magento/blob/master/images/php/7.2/Dockerfile#L33-L38
I’ve prepared a PR, once 2.3-develop is updated with 2.3.2 I will submit it
Re-opening because @engcom-Charlie doesn’t seem to be reading all the comments 😃
@engcom-Charlie: try to run Magento 2.3.2 where php-sodium extension is installed but libsodium’s version is < 1.0.13
Hi @pmsteil. Thank you for your report. The issue has been fixed in magento/magento2#23866 by @matei in 2.3-develop branch Related commit(s):
The fix will be available with the upcoming 2.3.3 release.
The following docker snippet has worked for me:
hi @evs-xsarus thanks for help. Yesterday I talk with my hosting support, and then they gave me a new command line for running script. I don’t know if Magento script command was change for running setup upgrade and all command. And then, it works. This is the reply from my hosting, May be it will work for anyone who search and face a problem like I did.
Hi there, Instead of typing :
php scriptname
type:
/home/xxxxxxx/public_html/php scriptname
Please let us know if there is anything further we can do for you.
Best Regards
Note: xxxxxx is username your hosting. Example: command: php bin/magento setup:upgrade You have to type command: /home/myusername/public_html/php bin/magento setup:upgrade
It work for me. If still confuse, ask your hosting.
@cows-magento: according to the release notes I quoted above, you need at least version 1.0.13 of libsodium. So that might be the problem here.
Probably something like:
Demo:
Takeaways:
(Worked out in conjunction with MageMojo Fam ♥ your mileage may vary)
@pmsteil: you’ll probably need to install the sodium php extension
It’s a bit annoying they haven’t added it to the dependencies in the
composer.json
file.This is also mentioned in the release notes:
But apparently it is possible to install Magento 2.3.2 without libsodium? 😛
Didn’t try kanduvisla solution but this works for me with php 7.2
For those interested: none of the above solutions worked for me in my Docker setup. What eventually did work, was compiling libsodium manually:
Manual testing scenarios
Expected result: Magento DB should upgrade correctly Actual result: bin/magento fails with
@hostep I am running docker on latest php7.2.19 and it installs version 1.0.11 by default https://github.com/docker-library/php/blob/a9f19e9df5f7a5b74d72a97439ca5b77b87faa35/7.2/stretch/fpm/Dockerfile
do you have any idea how to force an update by default?
@hostep thanks! Any clues as to how to install these two from the command line on macos/linux? Thanks!