Jump to content

Wondering how easy install-helper works


terryds

Recommended Posts

I'm wondering about how easy installer works... The installer will ask you to type the database name, username, password, and the host... Then, after i input them all, it will store the data (my dbname, username, pw, and host)...

I'm guessing now the way it store the data :

Maybe,

 

a. It uses OOP set-get function.

b. Or, it uses the database server to store the dbname, username,pw, host.

c. Or, it edit a php file containing the configuration for the CMS (But, i don't know how to do this)

 

So... Can you tell me the right way to make an easy-install helper ? And, if it's possible, Can you tell me how to do the point C ?

 

Sorry for my bad English :wub:

Link to comment
Share on other sites

I dont know how that specific appliction internally works but You could store the those data in config file. Config file can be in any format like ini,json,xml,yaml.

You need to just catch the data submite by user and manipulate the config file with simple form handling. When you will need the data for connecting database you will consult to the config file to get appropiate data.

I would not directly edit php file for configuration.

There is php.ini setting for storing database credential though that should not be used because it can expose the credential via phpinfo(). Also your config file should not be publicalyy accessible and should be kept on outside web root for security reason

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...