Fetching database connection file error

Discussion in 'Databases' started by DP Most, Feb 22, 2007.

  1. #1
    I am getting this error when I am Installing site-sift script. I have try to drop all table again and again but still not sort out this problem Pleas can any one help me.
    thanks!

     
    DP Most, Feb 22, 2007 IP
  2. DaDMan

    DaDMan Guest

    Messages:
    566
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Not resolved? Still having issues?
    When you say you have tried to drop the table, what's the result? are they getting drop?

    What I would do ( me... )
    1) delete the db completely and try again.. if you still have the same problem.. well.. I would do it dirty.. Again.. I repeat this is what "I" would do ( me ) .. does'nt mean this is "the" way to go but it will work and do the same end result... and would'nt pass 3 days searching and waiting a reply for help.. so you could try this, if simply deleting the db and starting back with the install as failed...




    1) create your db. ( new one, no table nothing.. just your db )

    2) hand job...under the hood..

    the error occurs in the install3.php file between line 40 and 47
    
            print 'Creating Tables In Database...<br>';
    	$count = 1;
    	while( $count < 7 ){
    		mysql_select_db($database_myconn, $myconn);
    		$sql = trim(file_get_contents('db/table'.$count.'.txt'));
    		mysql_query($sql,$myconn) or die(mysql_error()."FILE#".$count);
    		$count ++;
    	}	
    
    PHP:

    which basically creates the tables in your db by reading the content of the files in the db folder...
    Open this file into any editor..comment this complete section (you'll do it manually instead) ( explained in step 3 ).. so open up install3.php , comment from line 40 to 47 you'll have
    
          //print 'Creating Tables In Database...<br>';
         //$count = 1;
    	//while( $count < 7 ){
    	//	mysql_select_db($database_myconn, $myconn);
    	//	$sql = trim(file_get_contents('db/table'.$count.'.txt'));
    	//	mysql_query($sql,$myconn) or die(mysql_error()."FILE#".$count);
    	//	$count ++;
    	//}
    
    PHP:
    or you could use
    
           /*
           print 'Creating Tables In Database...<br>';
    	$count = 1;
    	while( $count < 7 ){
    		mysql_select_db($database_myconn, $myconn);
    		$sql = trim(file_get_contents('db/table'.$count.'.txt'));
    		mysql_query($sql,$myconn) or die(mysql_error()."FILE#".$count);
    		$count ++;
    	}
           */
    
    PHP:
    .. whatever you prefer.. both ways are commenting..

    save the file and upload it back to your server.

    3) execute this slq into phpmyadmin ( this is the tables that you find into the db folder in file table1.txt to table6.txt

    
    CREATE TABLE `admin` (
      `id` int(11) NOT NULL auto_increment,
      `username` varchar(30) NOT NULL,
      `password` varchar(30) NOT NULL,
      `name` varchar(40) NOT NULL,
      PRIMARY KEY  (`id`)
    );
    
    CREATE TABLE `categories` (
      `id` int(11) NOT NULL auto_increment,
      `fatherID` int(11) NOT NULL default '0',
      `title` varchar(100) NOT NULL default '',
      `description` text,
      `active` char(3) NOT NULL default '',
      `frontpage` char(1) default '0',
      `lastUpdate` date NOT NULL default '0000-00-00',
      PRIMARY KEY  (`id`)
    );
    
    CREATE TABLE `pages` (
      `id` int(11) NOT NULL auto_increment,
      `url` varchar(255) NOT NULL default '',
      `title` varchar(100) NOT NULL default '',
      `description` text NOT NULL,
      `keywords` varchar(200) NOT NULL default '',
      `active` varchar(5) NOT NULL default 'No',
      `ip` varchar(15) NOT NULL default '',
      `catID` int(11) NOT NULL default '0',
      `pdate` date NOT NULL default '0000-00-00',
      `exp` int(11) NOT NULL default '0',
      `mid` tinyint(1) NOT NULL default '0',
      `completed` tinyint(1) NOT NULL default '0',
      `email` varchar(100) default NULL,
      `rLink` varchar(255) default NULL,
      `rLinkStatus` char(1) default '1',
      `reciprocalCheckText` text,
      `coupon` varchar(16) default NULL,
      `paymentData` text NOT NULL,
      `paymentProcessor` VARCHAR( 32 ) default NULL,
      `link_checked` int(11) NOT NULL default '0',
      `link_status` int(11) NOT NULL default '0',
      PRIMARY KEY  (`id`)
    );
    
    
    CREATE TABLE `settings` (
      `id` int(11) NOT NULL default '1',
      `title` varchar(100) NOT NULL default '',
      `keywords` varchar(100) NOT NULL default '',
      `description` varchar(200) NOT NULL default '',
      `email` varchar(100) NOT NULL default '',
      `currSign` varchar(10) NOT NULL default '',
      `domain` varchar(100) default NULL,
      `seoUrl` varchar(4) NOT NULL default '',
      `directLink` varchar(4) NOT NULL default '',
      `sortBy` varchar(12) NOT NULL default '',
      `stats` char(1) NOT NULL default '0',
      `perCollum` int(11) NOT NULL default '2',
      `perPage` mediumint(5) NOT NULL default '0',
      `scTable` char(1) NOT NULL default '0',
      `bcTitle` char(1) NOT NULL default '1',
      `catColor` varchar(15) NOT NULL default '',
      `ptColor` varchar(15) NOT NULL default '',
      `pdColor` varchar(15) NOT NULL default '',
      `bgColor` varchar(15) NOT NULL default '',
      `mtbgColor` varchar(15) NOT NULL default '',
      `tColor` varchar(15) NOT NULL default '',
      `tbColor` varchar(15) NOT NULL default '',
      `lineColor` varchar(15) NOT NULL default '',
      `Rlink` char(1) default NULL,
      `RlinkBox` char(1) default NULL,
      `Rtext` text NOT NULL,
      `base_path` varchar(64) NOT NULL default '/',
      `useTransSid` varchar(5) NOT NULL default 'true',
      `preventDuplicates` varchar(8) NOT NULL default '',
      `securityImage` varchar(8) NOT NULL default '',
      `descriptionMaxLength` int(11) NOT NULL default '0',
      `descriptionMinLength` int(11) NOT NULL default '0',
      `linkTypeFree` tinyint(1) NOT NULL default '1',
      `linkTypePaid` tinyint(1) NOT NULL default '0',
      `linkTypeSponsor` tinyint(1) NOT NULL default '0',
      `reciprocalCheck` tinyint(1) NOT NULL default '1',
      `reciprocalDomain` tinyint(1) NOT NULL default '1',
      `reciprocalCheckText` text NOT NULL,
      `sponsorPrice` decimal(9,2) NOT NULL default '0.00',
      `sponsorDays` int(11) NOT NULL default '0',
      `paidPrice` decimal(9,2) NOT NULL default '0.00',
      `paidDays` int(11) NOT NULL default '0',
      `usePaypal` tinyint(1) NOT NULL default '1',
      `paypalEmail` varchar(128) NOT NULL default '',
      `paypalNotify` varchar(255) NOT NULL default '',
      `paypalReturn` varchar(255) NOT NULL default '',
      `paypalCurrency` varchar(16) NOT NULL default '',
      `paypalLc` varchar(16) NOT NULL default '',
      `paypalPaidItemName` varchar(255) NOT NULL default '',
      `paypalPaidItemNumber` varchar(64) NOT NULL default '',
      `paypalSponsorItemName` varchar(255) NOT NULL default '',
      `paypalSponsorItemNumber` varchar(64) NOT NULL default '',
      `use2co` tinyint(1) NOT NULL default '0',
      `2coSID` varchar(16) NOT NULL default '',
      `2coPaidProductID` varchar(16) NOT NULL default '',
      `2coPaidItemName` varchar(255) NOT NULL default '',
      `2coPaidItemNumber` varchar(64) NOT NULL default '',
      `2coSponsorProductID` varchar(16) NOT NULL default '',
      `2coSponsorItemName` varchar(255) NOT NULL default '',
      `2coSponsorItemNumber` varchar(64) NOT NULL default ''
    );
    
    
    CREATE TABLE `coupons` (
    `id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
    `coupons_code` VARCHAR( 16 ) NOT NULL ,
    `coupons_start` DATE NOT NULL ,
    `coupons_end` DATE NOT NULL ,
    `coupons_linktype` VARCHAR( 12 ) NOT NULL ,
    `coupons_discountamount` DECIMAL( 9, 2 ) NOT NULL ,
    `coupons_discounttype` VARCHAR( 12 ) NOT NULL ,
    UNIQUE ( `coupons_code` ) 
    );
    
    
    CREATE TABLE `ban_domain` (
    `id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
    `domain` VARCHAR( 255 ) NOT NULL ,
    UNIQUE ( `domain` ) 
    );
    
    Code (markup):
    4) Start back the install by pointing to yourdomain/install.php

    5) should be working now.

    6) Important. have fun!

    Let me know
     
    DaDMan, Feb 24, 2007 IP
  3. DP Most

    DP Most Well-Known Member

    Messages:
    478
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    108
    #3
    thanks for your reply.
    Now it is working fine but one problem when I am making cetegories it got error. when I click on categories.
    see here http://www.linkbuildingdir.net/5/Arts/
    Please let me know what is the problem.
    thanks!
     
    DP Most, Feb 24, 2007 IP
  4. DaDMan

    DaDMan Guest

    Messages:
    566
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    0
    #4
    :D
    Glad to know it as worked out... as for me.. I dont know what's the problem with the categories.. In fact, I dont even know site sift... Yesterday I was in "Dev Mod" :) so I wanted to help a bit and went to dig into they're script... But I really dont know the application..
    Aren't they offering any support or knowledgebase or something?
     
    DaDMan, Feb 24, 2007 IP
  5. JEET

    JEET Notable Member

    Messages:
    3,832
    Likes Received:
    502
    Best Answers:
    19
    Trophy Points:
    265
    #5
    Haven't seen the script, but I think you have modified the ".htaccess" file, or your host is not allowing the htaccess redirection or something.
    I can be wrong though...

    Edit----
    I think I was right about the .htaccess.
    The category exists.
    http://www.linkbuildingdir.net/index.php?go=subcat&id=5

    BTW, have you uploaded the ".htaccess" file?
    Bye :)
     
    JEET, Feb 24, 2007 IP
  6. DP Most

    DP Most Well-Known Member

    Messages:
    478
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    108
    #6
    woh! great How Can I do that can u tell me what I do with .htaccess files.
    thanks!
     
    DP Most, Feb 24, 2007 IP
  7. JEET

    JEET Notable Member

    Messages:
    3,832
    Likes Received:
    502
    Best Answers:
    19
    Trophy Points:
    265
    #7
    You upload the .htaccess files like you do with other files...
    When you downloaded the script and unzipped the download, it must have a file nnamed ".htaccess".
    Make sure you uploaded it at the root level on your website.

    Also make your hosting supports .htaccess file redirection. You can confirm with your host about this.
    Bye :)
     
    JEET, Feb 25, 2007 IP
  8. DP Most

    DP Most Well-Known Member

    Messages:
    478
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    108
    #8
    Yes thanks working fine now Can I upload category of others sites in the same scripts.
     
    DP Most, Feb 25, 2007 IP