Password problem – and solution

QuestionsPassword problem – and solution
Rob asked 8 years ago

Quick fix:
try changing the database password to use alphanumerics only.

Explanation:
In case anyone else has the same issue (or possibly a code fix needed?).
I'd installed the demo database & code. No grid was displayed using the demo/test database & code.

I installed some simpler PHP test programs to access the same database, that all worked.

I installed everything on a different hosting service, nothing worked including my simple test code.
On that host I stripped back my test code to the basics, that worked. One difference was that in the stripped back version I'd embedded the database connection parameters rather than read from an ini file.

I had been reading the .ini file using the PHP directive parse_ini_file so I looked that up and found that it expects alphanumerics only unless the data in the .ini file is in quotes. Of course a good password is likely to include some non-alphanumeric characters. Putting the password in quotes fixed the problem for my test code but not for PHPgrid.

Thinking it may still be the same problem I changed the password (removing a $) and the grid demos now work (the same may apply to the underscore some hosts routinely embed in database names).

Why the inconsistency between servers – no idea, both are on PHP 7.1.3, Connection type was mysqli (tried PDO too, that failed and I've not investigated further).

1 Answers
Gary answered 7 years ago

Thank you, thank you, thank you.  I have been struggling for a couple hours with what ended up being this problem!

Your Answer

12 + 12 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?