Jump to content

Making PHP secure for hosting


tecno40

Recommended Posts

So I'm about to open a hosting website, and will be letting the users use PHP and MySQL on my server. Since I will be allowing users to host their PHP code on this server I would like to make sure everyone's site is secure from hack attempts. Below is a list of what I've done so far to make it secure. Please tell me if this is enough to stop hacking, or if I need to add additional security.

 

 

1. Enabled disable_functions in php.ini with (NOTE: ini_set is not disabled)

disable_functions = "apache_child_terminate, apache_setenv,

define_syslog_variables, escapeshellarg, escapeshellcmd, eval, exec,

fp, fput, ftp_connect, ftp_exec, ftp_get, ftp_login, ftp_nb_fput,

ftp_put, ftp_raw, ftp_rawlist, highlight_file, ini_alter, ini_get_all,

ini_restore, inject_code, openlog, passthru, php_uname,

phpAds_remoteInfo, phpAds_XmlRpc, phpAds_xmlrpcDecode,

phpAds_xmlrpcEncode, popen, posix_getpwuid, posix_kill, posix_mkfifo,

posix_setpgid, posix_setsid, posix_setuid, posix_setuid, posix_uname,

proc_close, proc_get_status, proc_nice, proc_open, proc_terminate,

shell_exec, syslog, system, xmlrpc_entity_decode,mysql_select_db"

 

2. Used ini_set() in a header PHP code to set open_basedir to the user's website directory

 

3. Put a string of 7 random characters as the password for my MySQL database to protect it

 

4. I will create a new user account on MySQL for every user

Link to comment
Share on other sites

As mentioned, I would be careful going down this path.  It's really hard to setup your own hosting system.  It is do-able, but requires a great deal of work, and a server technician.  I would make sure you get consulting from an actual server tech, as well as make sure you have the start up capital for something like that. A friend of mine started his own hosting company and did quite well (Stealth Central) but it cost him an arm and a leg for the first year.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.