Closed Connor0308 closed 5 years ago
I'm also having the same exact issue, everything. Just wanted you to know that you're not alone ;)
@jamzth : Even though I like the thought of not being alone, any help would be highly appreciated :-D.
@jamzth @Connor0308 did both of you also did the setup in a shared hosting environment? As I've tried replicating it on a vps and its working fine.
@wcypierre yes, it was a shared environment for me. It looks like most of the database tables aren't being created. I only have migration and users tables in the db. Does that narrow anything down? I'm still looking around.
Also complete confirmation from my side. I am using a shared hosting environment with SSH access. @wcypierre : When you ask on whether we "oth of you also did the setup in a shared hosting environment" it sounds to me as if there was a special How To for this scenario - did I miss something?
@wcypierre @Connor0308 When I deleted the tables and tried to run php artisan migrate
I got the following:
Migrating: 2014_10_12_000000_create_users_table
In Connection.php line 664:
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`))
In PDOStatement.php line 119:
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes
In PDOStatement.php line 117:
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes
Makes me wonder if we are missing a step somewhere as well?
@jamzth And once again: same on my side.
@jamzth @Connor0308 I asked about it because it seems like both of you are using shared hosting. well, it narrows down to where the issue only happens on shared hosting environment as I've tested it on a vps.
I did some search on laravel on shared hosting and it seems like there's some quirks to it in which I'm not familiar with.
I don't have a shared hosting account so gotta wait for the maintainers to reply on it.
@wcypierre yes, it was a shared environment for me. It looks like most of the database tables aren't being created. [...].
Can we get a set on tables from somewhere? If the creation is the only issue, we could simply import them manually...
I think it would be best for you to specify the php, apache and mysql version used in the shared hosting for an easier troubleshoot for the maintainers
@wcypierre yes, it was a shared environment for me. It looks like most of the database tables aren't being created. [...].
Can we get a set on tables from somewhere? If the creation is the only issue, we could simply import them manually...
I could get you a copy from the one that I just created to get it running but you would still need to get the issue fixed though if you were to upgrade in the future
@wcypierre I'd like to have that for a quick up and running solution until the fix or workaround is known. Thanks!
php 7.2 mysql 10.1.37-MariaDB-cll-lve apache 2.4.38
@wcypierre Same from my side, the tables would be highly appreciated.
PHP: 7.2.14-nmml MySQL: 5.7.21 Apache: unknown
Here it is (I'm using MariaDB 10.1.38), try it out and see how it goes https://gist.github.com/wcypierre/82020218c31ca7659b949f9ca382afc9
ok, so I managed to get the database created by specifying the following in boot() at app/Providers/AppServiceProviders.php
Schema::defaultStringLength(191);
Found this gem here: https://laravel-news.com/laravel-5-4-key-too-long-error
Still working on the rest of the install as I have time.
I'll give it a try tonight. Thank you both
@jamzth : Thank you for your support - That did the trick for me. The tables are created and I can login without any issue. @wcypierre : Thank you as well for your efforts.
I also have this problem, but the solution is not working for me. I added Schema::defaultStringLength(191);
to the file and then run the migration script again, but the error is still there. What am I doing wrong?
(Edit)
/var/www/monica # php artisan migrate
**************************************
* Application In Production! *
**************************************
Do you really wish to run this command? (yes/no) [no]:
> yes
Migrating: 2018_12_22_200413_add_reminder_initial_date_to_reminders
In Connection.php line 664:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'monica.reminders' doesn'
t exist (SQL: alter table `reminders` add `initial_date` date not null after `conta
ct_id`, add `delible` tinyint(1) not null default '1' after `next_expected_date`)
In PDOStatement.php line 119:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'monica.reminders' doesn'
t exist
In PDOStatement.php line 117:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'monica.reminders' doesn'
t exist
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Dear,
I am trying to get Monica working on a shared hosting with SSH access. Since any installation step went smoothly, I do not believe that the hostind environment should be any issue.
After I wanted to populate the database (using php artisan setup:production) only two tables are created in the database, running on MySQL 5.7.21. Furthermore, it throws the following errors:
The migration script also errors with
The corresponding .env file looks like this:
So - what am I doing wrong? Best regards,
Philip