Cronwerks MCCode/MCCodes Forums

Please login or register.

Login with username, password and session length

News:

Make some extra cash by selling Cronwerks mods with our affiliate system.


AuthorTopic: Installing error  (Read 400 times)

TiF

  • Basic Member
  • *
  • Reputation Power: 1
  • TiF has no influence.
  • Offline Offline
  • Posts: 3
    • View Profile
Installing error
« on: October 31, 2009, 08:19:08 PM »
Write Config...

Warning: fopen(config.php) [function.fopen]: failed to open stream: Permission denied in D:\Hosting\5153121\html\installer.php on line 427

Warning: fwrite(): supplied argument is not a valid stream resource in D:\Hosting\5153121\html\installer.php on line 438

Warning: fclose(): supplied argument is not a valid stream resource in D:\Hosting\5153121\html\installer.php on line 439
Config written.
Attempting DB connection

Warning: require(class/class_db_mysql.php) [function.require]: failed to open stream: No such file or directory in D:\Hosting\5153121\html\installer.php on line 443

Fatal error: require() [function.require]: Failed opening required 'class/class_db_mysql.php' (include_path='.;C:\php5\pear') in D:\Hosting\5153121\html\installer.php on line 443

I keep getting this everytime I try to install version 1.

Please help,

Thanks.
Logged

dominion

  • Basic Member
  • *
  • Reputation Power: 69
  • dominion has no influence.
  • Offline Offline
  • Posts: 88
    • View Profile
    • Email
Re: Installing error
« Reply #1 on: November 01, 2009, 07:18:10 AM »
i think your trying to use a v2 installer.php on a v1 game ???
here is the installer that comes with lite should work the same as v1 try it after you rename the file with the sql data in to dbdata
Code: [Select]
<?php
/*
MCCodes Lite
installer.php Rev 1.0.0
Copyright (C) 2006 Dabomstew

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/
?>

<html>
<head>
<title>MCCodes Lite</title>
<style>
body { font-family:helvetica, arial, geneva, sans-serif;font-size:12;color: black;
   scrollbar-base-color: #005B70;
   scrollbar-arrow-color: #F3960B;
   scrollbar-DarkShadow-Color: #000000; }
a:visited,a:active,a:hover,a:link { color: black;text-decoration: none; }
table,tr,td { font-family:helvetica, arial, geneva, sans-serif;font-size: 12; }
img { border:none; }
textarea { font-family:helvetica, arial, geneva, sans-serif;font-size:12;color: black; }
</style>
</head>
<body bgcolor='#C3C3C3'>
<table width=100%><tr><th><img src='logo.png'></th></tr></table><hr />
<h3>MCCodes Installation</h3><hr />
<?php
switch($_GET['step'])
{
  case 
'install':
  
doDoInstall();
  break;
  default:
  
doStartInstall();
  break;
}
function 
doDoInstall()
{
  print 
"1. Config -> <b>2. Install</b><hr />";
  if(!
is_writable('mysql.php'))
  {
    print 
"<font color='red'><b>INSTALLATION ERROR:</b> The file <b>mysql.php</b> 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 
"<font color='red'><b>ERROR:</b> You did not fill in one or more elements of the form. Please go <a href='installer.php'>back</a> and try again.</font>";
  }
  else if(
$_POST['adPassword'] != $_POST['adCPassword'])
  {
    print 
"<font color='red'><b>ERROR:</b> The passwords you entered did not match. Please go <a href='installer.php'>back</a> and try again.</font>";
  }
  else
  {
    
$c mysql_connect($_POST['dbHostName'], $_POST['dbUserName'], $_POST['dbPassword']) or die("<font color='red'><b>INSTALLATION ERROR:</b> ".mysql_error()."<br />&gt; <a href='installer.php'>Back</a></font>");
    
mysql_select_db($_POST['dbDatabase'], $c) or die("<font color='red'><b>INSTALLATION ERROR:</b> ".mysql_error()."<br />&gt; <a href='installer.php'>Back</a></font>");
    
$l=fopen("mysql.php","w");
    
$mykey=rand(1,2147483647);
    
fwrite($l,"<?php
    \$c = mysql_connect('{$_POST['dbHostName']}', '{$_POST['dbUserName']}', '{$_POST['dbPassword']}');
    mysql_select_db('{$_POST['dbDatabase']}', \$c);
    \$mykey={$mykey};
    ?>
");
    fclose($l);
    print "Wrote mysql.php file...<br />";
    $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("<font color='red'><b>INSTALLATION ERROR:</b> ".mysql_error()."<br />&gt; <a href='installer.php'>Back</a></font>");
       $query="";
      }
     }
    }
    print "Wrote mysql data into database...<br />";
    $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 "<hr />
    <b>Done!</b><hr />
    <b>DO NOT CLOSE THIS WINDOW.</b><br />
    You need to install these crons into cPanel or whatever interface you have using the instructions in the Installation Manual.<br />
    <pre>
    */5 * * * * curl {$cj1}
    0 0 * * * curl {$cj2}
    </pre>
    After that, you're done! Enjoy MCcodes Lite.";
  }
}

function doStartInstall()
{
  print "<b>1. Config</b> -> 2. Install<hr />";
  if(!is_writable('mysql.php'))
  {
    print "<font color='red'><b>INSTALLATION ERROR:</b> The file <b>mysql.php</b> is not writable. Please use FTP or any other means to CHMOD this file to 0777.";
  }
  else
  {
    print "<b>Database Details:</b><br />
    <form action='installer.php?step=install' method='post'>
    <table width='70%' border='1'>
    <tr>
    <td>MySQL Hostname:<br />
    <small>If unsure, <b>localhost</b> is the default on most servers</small></td>
    <td><input type='text' name='dbHostName' /></td>
    </tr>
    <tr>
    <td>MySQL Username:</td>
    <td><input type='text' name='dbUserName' /></td>
    </tr>
    <tr>
    <td>MySQL Password:</td>
    <td><input type='password' name='dbPassword' /></td>
    </tr>
    <tr>
    <td>MySQL Database:<br />
    <small>Please make sure the user has access to the database.</small></td>
    <td><input type='text' name='dbDatabase' /></td>
    </tr>
    </table>
    <hr />
    <b>Admin Details</b><br />
    <table width='70%' border='1'>
    <tr>
    <td>Admin Username:</td>
    <td><input type='text' name='adUsername' /></td>
    </tr>
    <tr>
    <td>Admin Password:</td>
    <td><input type='password' name='adPassword' /></td>
    </tr>
    <tr>
    <td>Confirm Password:</td>
    <td><input type='password' name='adCPassword' /></td>
    </tr>
    <tr>
    <td>Admin Email Address:</td>
    <td><input type='text' name='adEmail' /></td>
    </tr>
    </table>
    <input type='submit' value='Install' />
    </form>";
  }
}
?>
</body>
</html>
    </tr>
Logged

Danny696

  • Excellent Member
  • ***
  • Reputation Power: 284
  • Danny696 has a powerful will.Danny696 has a powerful will.Danny696 has a powerful will.Danny696 has a powerful will.Danny696 has a powerful will.Danny696 has a powerful will.Danny696 has a powerful will.
  • Offline Offline
  • Posts: 473
    • View Profile
Re: Installing error
« Reply #2 on: November 01, 2009, 02:01:01 PM »
WTF MAN are you ok. why give away a 'mod' from something that has been paid for, cronus, please remove
Logged
My Game: GraveYard; Madness || Projects; N/A -  Available for work. Please IM/PM me.

Cronus

  • Administrator
  • Excellent Member
  • *****
  • Reputation Power: 1952
  • Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!Cronus is awe-inspiring!
  • Offline Offline
  • Posts: 479
    • View Profile
    • WWW
Re: Installing error
« Reply #3 on: November 02, 2009, 07:56:49 AM »
Danny, this is simply the installation file.
Nothing of real value is lost with this script being given, its just helpful.
Logged

dominion

  • Basic Member
  • *
  • Reputation Power: 69
  • dominion has no influence.
  • Offline Offline
  • Posts: 88
    • View Profile
    • Email
Re: Installing error
« Reply #4 on: November 02, 2009, 10:30:20 AM »
WTF MAN are you ok. why give away a 'mod' from something that has been paid for, cronus, please remove

ok i know why you said this but its the installer from mccodes lite not v1(if v1 has an installer) its not paid for its free and can be passed around with copyright at the top (the one thats still there)
Logged

TiF

  • Basic Member
  • *
  • Reputation Power: 1
  • TiF has no influence.
  • Offline Offline
  • Posts: 3
    • View Profile
Re: Installing error
« Reply #5 on: November 02, 2009, 01:37:08 PM »
Okay I put that code into the installer.php file, I didn't see the other file you were talking about to rename, I already have that file :S
Logged

TiF

  • Basic Member
  • *
  • Reputation Power: 1
  • TiF has no influence.
  • Offline Offline
  • Posts: 3
    • View Profile
Re: Installing error
« Reply #6 on: November 04, 2009, 10:39:15 PM »
MCCodes Installation

--------------------------------------------------------------------------------
1. Config -> 2. Install
--------------------------------------------------------------------------------
INSTALLATION ERROR: The file mysql.php is not writable. Please use FTP or any other means to CHMOD this file to 0777.

This is my error now, after putting that code into the installer.php file and saving it. I can't find this myspl.php file anywhere
Logged

FrankWiccan

  • Basic Member
  • *
  • Reputation Power: 25
  • FrankWiccan has no influence.
  • Offline Offline
  • Posts: 40
    • View Profile
Re: Installing error
« Reply #7 on: November 04, 2009, 11:39:57 PM »
I think you can have Cronwreks install it for you for free or for $5
both are worth far more then that perhaps you should ask them too.
Logged