Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

timokfine's avatar

Cannot register user?

I've installed Spark successfully locally using Homestead, but when I try to register an account for the first time, I get the following error message:

"Something went wrong. Please try again or contact customer support."

Have I missed something?

Thanks.

0 likes
9 replies
cboxdk's avatar

Have you setup the database and run the php artisan migrate command?

timokfine's avatar

The issue was DB related.

My DB_HOST environment variable was set to an IP address by Homestead. I switched it over to localhost and it's all good now. It's weird as I had ran my migrations without any issues, so it slipped through the radar.

1 like
Shivers's avatar

Thanks for this timtreks. Same issue here. I ran the migration with no issue, but couldn't register until I changed the IP address to localhost.

1 like
Nmsr1976's avatar

Sorry for the question, but can someone post the steps? I'm new to Laravel and spark... so I'm a little lost ;)

Thanks in advance.

Ps: I've changed the file .env in the project root dir... but without sucess

SYPOMark's avatar

Hi, @Nmsr1976

Hopefully this answer will help, but I'm not sure what you've done already, so it may not. Anyway, here goes.

Within your .env file in your project root directory, there's a few lines you'll need to edit:

DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=my-database-name
DB_USERNAME=my-username
DB_PASSWORD=my-password

Change my-database-name to match YOUR database name, my-username to match YOUR username and, my-password to match YOUR password.

Once you've done that, using a Command Line Editor go to the project root directory. If you're setting up Spark in WAMP - so, on a Windows PC - to go to the project root folder, you might write

cd C:/wamp64/www/project-folder

replacing project-folder with the name of your project root directory.

The run the command:

php artisan migrate.

That will create all the necessary tables in your database.

Hope that helps,

With kind regards,

Mark

1 like
Kriptic's avatar

So I ran into this problem today I'm deep into a project so I was a little surprised as it was working before.

It's not the first time I get this error. Always frustrating. The error message says nothing.

Wait a minute!

I got the bright idea, this time, to look at the laravel error logs. Which canbe found in storage/logs folder. Here's what I found:

Next Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1364 Field 'age' doesn't have a default value (SQL: insert into users (name, email, password, last_read_announcements_at, trial_ends_at, updated_at, created_at)

I created a field 'age' while I was trying to learn how to customize it.

Look at the logs, Luke.

2 likes
Nmsr1976's avatar

Hi @ThisJoan and @SYPOMark With the logs I've been able to trace de error and find a solution With this change in my database.php file the problem was solved.

'host'=> env('DB_HOST', 'localhost').('homestead' == gethostname() ?null : ':33060'),

Thanks to all ! Best regards, Narciso

1 like
SYPOMark's avatar

Hi @Nmsr1976,

Thanks for letting me know you've got that fixed.

Happy to help!

With kind regards,

Mark

1 like

Please or to participate in this conversation.