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

Auth.php threw uncaught DB error at refresh install #92

Closed
vauntmag opened this issue Apr 17, 2018 · 7 comments
Closed

Auth.php threw uncaught DB error at refresh install #92

vauntmag opened this issue Apr 17, 2018 · 7 comments
Labels

Comments

@vauntmag
Copy link

Hi,

Got this great library working locally on MAMP and now experiencing very strange errors on hosting server...fresh install, var_dump shows $db and $auth working...but the moment I try to register a user, the following Fatal error was thrown...this did not happen on my local dev server before...

Any ideas? Any help would be greatly appreciated!

Fatal error: Uncaught exception 'Delight\Auth\DatabaseError' in /home/vhosts/{hostname}/{hostname}/vendor/delight-im/auth/src/Auth.php:1695 Stack trace: #0 /home/vhosts/{hostname}/{hostname}/vendor/delight-im/auth/src/Auth.php(230): Delight\Auth\Auth->throttle(Array, 1, 3600, 75) #1 /home/vhosts/{hostname}/{hostname}/test3.php(17): Delight\Auth\Auth->register('test@test.com', 'test123', Object(Closure)) #2 {main} thrown in /home/vhosts/{hostname}/{hostname}/vendor/delight-im/auth/src/Auth.php on line 1695

@ocram ocram added the question label Apr 17, 2018
@ocram
Copy link
Contributor

ocram commented Apr 17, 2018

What database software are you using on the server? Is it the same that you also used locally?

Please make sure that your database schema is set up correctly and is up to date as well. The problem here occurs when the library tries to access the users_throttling table.

Finally, if you need to debug this, see #91. For you, the line in question is Auth.php:1695. You could add the $e argument there.

@vauntmag
Copy link
Author

vauntmag commented Apr 17, 2018 via email

@vauntmag
Copy link
Author

Ok...I must have offended the SQL gods somehow...I did a fresh install on a server with the same MySQL version and PHP version as my local dev environment...a similar error has thrown...this time Delight\Auth\Administration->createUser('test@test.com', 'test123', NULL) #2 {main} thrown in /home/stamppro/public_html/vendor/delight-im/auth/src/UserManager.php on line 175

Any help would be deeply appreciated! I am at my wits end at the moment...

@vauntmag
Copy link
Author

Ok...did exactly what you proposed with the extended error messages. Turns out that it was the hosting servers' problem :):) of course. Thank you so much for all your help!

@ocram
Copy link
Contributor

ocram commented Apr 17, 2018

Thank you very much for your appreciation and for the further details on this issue!

It seems we should probably enable those extended error messages by default. This problem having come up just a few days ago and then now again is certainly no coincidence. This is now tracked in #93.

Does this mean the library is now working for you with both MySQL and MariaDB? Or haven’t you tried again with MariaDB?

Can you explain what was wrong with the server? Was it a misconfiguration that could affect others as well?

@vauntmag
Copy link
Author

vauntmag commented Apr 18, 2018 via email

@ocram
Copy link
Contributor

ocram commented Apr 20, 2018

Thanks!

By the way, if you’re looking for a better hosting provider, we had a list of several good providers in another issue a while back: #18 (comment)

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

No branches or pull requests

2 participants