You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have written a bash script to quickly install and setup wordpress on my AlmaLinux 8.7 server.
When the mysql command is missing (by accident or by choice, when the DB is remote and not local), then executing wp-cli causes it to enter an infinite loop! I managed to replicate the same infinite loop even if the mysql is installed, but the remote DB can't be accessed due to authentication error.
$ ./install-script.sh
Downloading WordPress 6.1.1 (en)...
Using cached file '/home/user/.wp-cli/cache/core/wordpress-6.1.1.tar.gz'...
Success: WordPress downloaded.
/usr/bin/env: ‘mysql’: No such file or directory
Error: 'wp-config.php' not found.
Either create one manually or use `wp config create`.
Error: 'wp-config.php' not found.
Either create one manually or use `wp config create`.
Error: 'wp-config.php' not found.
Either create one manually or use `wp config create`.
Error: 'wp-config.php' not found.
Either create one manually or use `wp config create`.
Error: 'wp-config.php' not found.
Either create one manually or use `wp config create`.
Error: 'wp-config.php' not found.
Either create one manually or use `wp config create`.
Error: 'wp-config.php' not found.
Either create one manually or use `wp config create`.
Error: 'wp-config.php' not found.
Either create one manually or use `wp config create`.
Error: 'wp-config.php' not found.
Either create one manually or use `wp config create`.
Error: 'wp-config.php' not found.
Either create one manually or use `wp config create`.
Error: 'wp-config.php' not found.
Either create one manually or use `wp config create`.
Error: 'wp-config.php' not found.
(... to infinity and beyond ...)
Describe how other contributors can replicate this bug
Install a minimal AlmaLinux 8.7 system
Install PHP 8.0 packages
Create a user (useradd -m user)
Give shell access to the new user (usermod -s /bin/bash user)
Switch to the new user (su - user)
As the new user, download and install wp-cli under ~/bin
run wp-cli config create as above
watch it loop
Describe what you would expect as the correct outcome
No infinite loop! Maybe stop the config procedure with an error, or proceed and use an alternative to the mysql command.
Let us know what environment you are running this on
Bug Report
Describe the current, buggy behavior
I have written a bash script to quickly install and setup wordpress on my AlmaLinux 8.7 server.
When the
mysql
command is missing (by accident or by choice, when the DB is remote and not local), then executing wp-cli causes it to enter an infinite loop! I managed to replicate the same infinite loop even if themysql
is installed, but the remote DB can't be accessed due to authentication error.Here is how I call wp-cli from my bash script:
The console output looks like:
Describe how other contributors can replicate this bug
useradd -m user
)usermod -s /bin/bash user
)su - user
)Describe what you would expect as the correct outcome
No infinite loop! Maybe stop the config procedure with an error, or proceed and use an alternative to the
mysql
command.Let us know what environment you are running this on
Provide additional context/Screenshots
Not applicable.
The text was updated successfully, but these errors were encountered: