5000marios Posted May 1, 2011 Share Posted May 1, 2011 So.. I have downloaded this McCodes Lite version, and when I try to register, it says: Notice: Undefined index: HTTP_X_FORWARDED_FOR in C:\xampp\htdocs\register.php on line 37 Warning: mysql_connect() [function.mysql-connect]: [2002] No connection could be made because the target machine actively (trying to connect via tcp://localhost:3306) in C:\xampp\htdocs\mysql.php on line 2 Warning: mysql_connect() [function.mysql-connect]: No connection could be made because the target machine actively refused it. in C:\xampp\htdocs\mysql.php on line 2 Warning: mysql_select_db() expects parameter 2 to be resource, boolean given in C:\xampp\htdocs\mysql.php on line 3 Warning: mysql_query() expects parameter 2 to be resource, boolean given in C:\xampp\htdocs\register.php on line 55 Warning: mysql_num_rows() expects parameter 1 to be resource, null given in C:\xampp\htdocs\register.php on line 56 The passwords did not match, go back and try again. What does that mean? :/ ( does that mean that I don't have a connection?, if yes, how do I solve it? :P I mean, I just buy a domain, and upload the files? ) Quote Link to comment Share on other sites More sharing options...
Dominion Posted May 1, 2011 Share Posted May 1, 2011 Did you run installer.php? Quote Link to comment Share on other sites More sharing options...
5000marios Posted May 1, 2011 Author Share Posted May 1, 2011 MySQL Username: where do I create a mysql account? Quote Link to comment Share on other sites More sharing options...
Dominion Posted May 1, 2011 Share Posted May 1, 2011 MySQL Username: where do I create a mysql account? In phpmyadmin? Quote Link to comment Share on other sites More sharing options...
5000marios Posted May 1, 2011 Author Share Posted May 1, 2011 <?php $c = mysql_connect('localhost', 'root', 'p1kap1ka'); mysql_select_db('lite2', $c); $mykey=256573440; ?> what do I put instead of "root", "p1kap1ka" and "lite2" ? ( this is mysql.php) Quote Link to comment Share on other sites More sharing options...
Dominion Posted May 1, 2011 Share Posted May 1, 2011 http://php.net/mysql_connect Have a look here. I did mean phpmyadmin... " localhost/phpmyadmin " into your browser to get it up (xampp should have it) Quote Link to comment Share on other sites More sharing options...
5000marios Posted May 1, 2011 Author Share Posted May 1, 2011 So.. I have created my mysql database.. ( it's blank right now ) sorry for being annoying.. but I am an amature :/ Quote Link to comment Share on other sites More sharing options...
Dominion Posted May 1, 2011 Share Posted May 1, 2011 so run installer.php... Quote Link to comment Share on other sites More sharing options...
5000marios Posted May 1, 2011 Author Share Posted May 1, 2011 so again.. <?php $c = mysql_connect('localhost', 'root', 'p1kap1ka'); mysql_select_db('lite2', $c); $mykey=256573440; ?> what do I put instead of "root", "p1kap1ka" and "lite2" ? ( this is mysql.php) :P Quote Link to comment Share on other sites More sharing options...
5000marios Posted May 1, 2011 Author Share Posted May 1, 2011 also.. I DO NOT have an account for mysql....................... Quote Link to comment Share on other sites More sharing options...
Dominion Posted May 1, 2011 Share Posted May 1, 2011 also.. I DO NOT have an account for mysql....................... "root" is always there. no password, + you have the database name since you just made it. Quote Link to comment Share on other sites More sharing options...
5000marios Posted May 1, 2011 Author Share Posted May 1, 2011 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 Quote Link to comment Share on other sites More sharing options...
Dominion Posted May 1, 2011 Share Posted May 1, 2011 I don’t understand... you get a html form asking you to fill out your details why would you have done something wrong? Here watch this - Quote Link to comment Share on other sites More sharing options...
5000marios Posted May 1, 2011 Author Share Posted May 1, 2011 thank you super moderator :) I am going to sleep now.. I may have more questions in some days ;) Quote Link to comment Share on other sites More sharing options...
Curt Posted May 1, 2011 Share Posted May 1, 2011 (edited) lol...opps i did not notice page 2...lol my post is pointless....:P Edited May 1, 2011 by Curt Quote Link to comment Share on other sites More sharing options...
Dave Posted May 2, 2011 Share Posted May 2, 2011 I don’t understand... you get a html form asking you to fill out your details why would you have done something wrong? Here watch this - My video again! and he got that error because I don't think he had PHP enabled. Quote Link to comment Share on other sites More sharing options...
5000marios Posted May 2, 2011 Author Share Posted May 2, 2011 Hey guys.. I am thinking of using this hoster.. http://www.hostmonster.com .. do you think it's good? ( I had found this hoster from youtube from thenewboston ) Quote Link to comment Share on other sites More sharing options...
sniko Posted May 2, 2011 Share Posted May 2, 2011 try w3theory. they are good. Quote Link to comment Share on other sites More sharing options...
Dominion Posted May 2, 2011 Share Posted May 2, 2011 My video again! Well yes, not going to do one when one is already there :p Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.