MCCodes Installation
2. Install"; if(!is_writable('mysql.php')) { print "INSTALLATION ERROR: The file mysql.php is not writable. Please use FTP or any other means to CHMOD this file to 0777."; } else if(!$_POST['dbHostName'] || !$_POST['dbUserName'] || !$_POST['dbDatabase'] || !$_POST['adUsername'] || !$_POST['adPassword'] || !$_POST['adCPassword'] || !$_POST['adEmail']) { print "ERROR: You did not fill in one or more elements of the form. Please go back and try again."; } else if($_POST['adPassword'] != $_POST['adCPassword']) { print "ERROR: The passwords you entered did not match. Please go back and try again."; } else { $c = mysql_connect($_POST['dbHostName'], $_POST['dbUserName'], $_POST['dbPassword']) or die("INSTALLATION ERROR: ".mysql_error()."
> Back"); mysql_select_db($_POST['dbDatabase'], $c) or die("INSTALLATION ERROR: ".mysql_error()."
> Back"); $l=fopen("mysql.php","w"); $mykey=rand(1,2147483647); fwrite($l,""); fclose($l); print "Wrote mysql.php file...
"; $fo=fopen("dbdata.sql","r"); $query=""; $lines=explode("\n",fread($fo,1024768)); fclose($fo); foreach($lines as $line) { if(!(strpos($line,"--") === 0) && $line != "") //check for commented lines or blankies { $query.=$line; if(!(strpos($line,";") === FALSE)) { $query=str_replace(array('adUsername', 'adPassword', 'adEmail'), array($_POST['adUsername'], $_POST['adPassword'], $_POST['adEmail']), $query); mysql_query($query,$c) or die("INSTALLATION ERROR: ".mysql_error()."
> Back"); $query=""; } } } print "Wrote mysql data into database...
"; $path=$_SERVER['HTTP_HOST'].str_replace('installer.php','',$_SERVER['SCRIPT_NAME']); $cj1="http://".$path."cron_fivemins.php?code=".md5($path.$mykey); $cj2="http://".$path."cron_day.php?code=".md5($path.$mykey); print " Done! DO NOT CLOSE THIS WINDOW.
You need to install these crons into cPanel or whatever interface you have using the instructions in the Installation Manual.
*/5 * * * * curl {$cj1}
0 0 * * * curl {$cj2}
After that, you're done! Enjoy MCcodes Lite."; } } function doStartInstall() { print "1. Config -> 2. Install"; if(!is_writable('mysql.php')) { print "INSTALLATION ERROR: The file mysql.php is not writable. Please use FTP or any other means to CHMOD this file to 0777."; } else { print "Database Details:
MySQL Hostname:
If unsure, localhost is the default on most servers
MySQL Username:
MySQL Password:
MySQL Database:
Please make sure the user has access to the database.
Admin Details
Admin Username:
Admin Password:
Confirm Password:
Admin Email Address:
"; } } ?>
THIS IS WHAT I GET.. AND I INSERT THIS DETAILS, AM I DOING SOMETHING WRONG?
--> MySQL Hostname:
If unsure, localhost is the default on most servers
MySQL Username: something random?
MySQL Password: something random?
MySQL Database: CyLand ( the blank database I have just created )
Please make sure the user has access to the database.
Admin Details
Admin Username: creating a new username here
Admin Password: creating a new password here
Confirm Password: creating a new password here
Admin Email Address: MY EMAIL