Check MySQL version
I'm new here, and haven't got much experience using php yet. Still I think I can be of assistance since I'm currently struggling to get my own installer script running.
With that said requesting the mySQL version requires you to connect to the database. There is no other way around it.
Think of it this way. You want to get €100 from your bank account to get yourself some fancy computer hardware, but you got no proper legitimation to prove who you say you are. Without these credentials you cannot request anything from your account, it doesn't matter if you got the full account ID.
So the only valid way around the problem is:
1. Display a form to receive the database credentials.
2. Connect to the database with the credentials.
3. Display the current version of mySQL on the server.
Now think about it this way. Your end-user has some very imporant data stored inside his database that he doesn't want anyone to get hold of. It can be client's email adresses and then some. These database credentials are there to prevent unauthorized usage of your database. Same goes with the bank to prevent unauthorized usage of your money. Same goes with the keys to your flat. They're there to prevent any thieves from stealing your commodities.
No identification / credentials = access denied.
Here is a script to check the version of mysql from my script:
I moved this post here since it doesn't need to resurrect the thread it was posted it, but it may still be useful to someone.
Sorry if I necro-posted. I'm quite good at that skill. With 10% sight on one eye I'm having a hard time locating the post date in most forums.
Anyways I'm glad you find this code useful enough to keep.
|All times are GMT +1. The time now is 11:39 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.