Jump to content

Permissions vs User Creating the database

- - - - -

  • Please log in to reply
4 replies to this topic

#1
zeroradius

zeroradius

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,406 posts
I need a forum for a site that I want to build and decided to build my own forum software and make it install able. I have two options: 1)Have the user add permissions for my script to create a database. 2)Have the user create the database and user and then have them fill out a form with the name of the database, username, and password and then have the script create the tables.

Option 1 may not be available to the user depending on the EUA of some shared hosting and not all users will know how to give permissions. The second option requires the user to take a few additional steps and seems kind of lame but would be easier than option 1.

My question is which do you think would be the better choice? any other options?
Posted Image

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
Option 3) create an executable file that will do the work for the user.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
zeroradius

zeroradius

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,406 posts
option 3 would still require permissions thou. Not all shared hosting permit the user to change permissions so that the script can create the databases. I guess I could make two separate downloads and people could choose the one that works for them. I'm mainly trying to decide if i should go for ease of use or more people being able to use it. I'm mainly looking for help making the decision because I can't make up my mind (>.<). oh well i'll just flip a coin

edit: also I looked into it and it seems you need permissions to run an exe on most shared hosting.
Posted Image

#4
amrosama

amrosama

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 8,674 posts
I would do the following:
when the user runs the install file, I check if I have permissions to create the database by creating a dummy database and deleting it, if it worked then I would give him 2 options; automatically let the script create the database or manually specifying database name that is already created.
of course if the script is not allowed to create the database I would ask the user to do it.

Not to mention that you must ask the user for username and password for the database access...
yo homie i heard you like one-line codes so i put a one line code that evals a decrypted one line code that prints "i love one line codes"
eval(base64_decode("cHJpbnQgJ2kgbG92ZSBvbmUtbGluZSBjb2Rlcyc7"));
www.amrosama.com | the unholy methods of javascript

#5
zeroradius

zeroradius

    Speaks fluent binary

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,406 posts
That's a good idea Amrosama thank you. I think I will do that.
Posted Image




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users