Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"The "--database" option does not exist" error when attempting to install #4515

Open
philam opened this issue Dec 6, 2022 · 3 comments
Open

Comments

@philam
Copy link

philam commented Dec 6, 2022

Describe the bug
I am trying to install Ushahidi 5.3.1 onto a shared web server.

I am following these official installation instructions here: https://docs.ushahidi.com/platform-developer-documentation/development-and-code/setup_alternatives/platform_release_install

I have extracted the files successfully as described and created a blank MySQL database with the appropriate permissions for the user.

When I populate the .env file and attempt to run php artisan migrate in a terminal in the appropriate folder (./platform), I get this error:

Database [] not configured.

To Reproduce
Steps to reproduce the behavior:

  1. Upload platform-release files to server.
  2. Populate .env file.
  3. Open terminal and navigate to /platform folder.
  4. Attempt to run php artisan migrate
  5. Error The "--database" option does not exist is displayed.

Expected behaviour
That php artisan migrate runs successfully and the installation can continue.

Hardware Details:

  • Apache 2.4.54
  • MySQL 10.3.37-MariaDB
  • Architecture x86_64
  • Linux
  • Perl version 5.16.3
  • PHP 7.4

Additional context
This is what the .env file looks like, with the appropriate private information snipped:

DB_HOST=localhost
DB_DATABASE=<databasename>
DB_USERNAME=<databasename>
DB_PASSWORD=<databasepassword>

APP_ENV=local
APP_DEBUG=false
APP_KEY=<32characterkey>
APP_TIMEZONE=UTC

CACHE_DRIVER=array
QUEUE_DRIVER=sync

I dug into the laravel.log file and this is the error message that comes up: https://pastebin.com/V0Qc8CZY

  • All modules listed in the installation docs confirmed as enabled
  • All privileges granted for the database user to the database

What I have tried

  • Recreating the username and database in phpMyAdmin
  • Trying different configurations of the .env file (e.g. changing the API key)
  • Clearing the cache of php artisan
  • Creating a new .env file
@tuxpiper
Copy link
Member

tuxpiper commented Dec 6, 2022

That's quite unexpected as it seems to go into running Laravel migrations, whereas the project is set up to use phinx.

I'm not sure if it helps, but PHP 7.4 is not something the project has certified as running... maybe that's the root of the problem? PHP 7.3 is better tested.

Have you tried running the phinx commands explicitly?

php artisan phinx:migrate

@philam
Copy link
Author

philam commented Dec 7, 2022

Thanks so much for the quick reply!

I just tried downgrading to PHP 7.3 but unfortunately with the same result.

When I tried running php artisan phinx:migrate I got the following error message (in both PHP 7.4 and 7.3):

There are no commands defined in the "phinx" namespace

To me this suggests that the module is not installed. I've contacted my web hosting provider for them to do so and I'll report back on what happens next.

@philam
Copy link
Author

philam commented Dec 7, 2022

An update: I've been able to install Phinx successfully. 

However, it's still coming up with the same error messages as before and I am unable to proceed with the installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants