Activity Stream
48,167 MEMBERS
62812 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1.     
    #1
    Banned

    Default Sql Error:How To Fix

    i am installing a script on my website i have done everything but in the last step of setup i am getting this error please can anyone know how to fix it

    amerriaz Reviewed by amerriaz on . Sql Error:How To Fix i am installing a script on my website i have done everything but in the last step of setup i am getting this error please can anyone know how to fix it http://i.imgur.com/Z0vq0.png Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Banned
    check line 113,114 on the sql.php page...

    The error is printed right there...why not read it?

  4.     
    #3
    Banned
    i can read but there are 8 sections in sql .


  5.     
    #4
    Banned
    Website's:
    XmasPresent4Me.com
    The issue is resulting from the action occurring on line 114 of the php file named sql. This does not have to mean it is in your database.

    Find the file in the above error and read what line 114 does.

  6.     
    #5
    Banned
    from what i see,its just a typo.,
    it mostly will be on line 113 (there is an extra ",")

  7.     
    #6
    Banned
    here is the code of sql

    Code: 
    function sql( $db, &$template )
    {
        include( "product.php" );
        if ( $handle = opendir( "../sql/" ) )
        {
            $file_array = array( );
            while ( FALSE !== ( $file = readdir( $handle ) ) )
            {
                if ( !( $file != "." ) && !( $file != ".." ) && !preg_match( "/^[a-z0-9_]+\\.sql\$/i", $file ) )
                {
                    $file_array[] = "../sql/".$file;
                }
            }
            if ( !sort( &$file_array ) )
            {
                echo "Internal Error.  Couldnt sort filenames.<br>\n";
                return 1;
            }
            reset( &$file_array );
            $key_to_files = isset( $_REQUEST['key'] ) ? $_REQUEST['key'] : 0;
            $i = 0;
            for ( ; $i < $key_to_files; ++$i )
            {
                next( &$file_array );
            }
            if ( $key_to_files < count( $file_array ) )
            {
                if ( current( &$file_array ) )
                {
                    $contents = file( current( &$file_array ) );
                    if ( $contents )
                    {
                        reset( &$contents );
                        $i = 0;
                        foreach ( $contents as $individual_pieces )
                        {
                            splitfile( $pieces, $individual_pieces, $db );
                            ++$i;
                        }
                        $url_path = str_replace( INSTALL, "install_redirect.php", $_SERVER['PHP_SELF'] );
                        $redirect_url = ( "http://".$_SERVER['HTTP_HOST'].$url_path."?key=".( $key_to_files + 1 ) )."&install=".INSTALL."&total=".count( $file_array );
                        header( "Cache-Control: must-revalidate, post-check=0, pre-check=0" );
                        header( "Pragma: no-cache" );
                        header( "Location: ".$redirect_url );
                        echo $template;
                        exit( );
                    }
                    echo "could not open file: ".$install_files[$key_to_files]."<br>Installation aborted<Br>\n";
                }
            }
            else
            {
                return 1;
            }
            reset( &$file_array );
            return 0;
        }
        echo "Error opening sql directory.  Place Check your permissions on this directory and that it exists.<bR>\n";
        return 1;
    }
    
    function splitFile( &$ret, $sql, $db )
    {
        $sql = rtrim( $sql );
        $length_of_current_string = strlen( $sql );
        if ( substr( $sql, -1 ) == ";" )
        {
            $ret .= $sql;
            $result = $db->Execute( $ret );
            if ( !$result )
            {
                exit( "<span style=\"color:red; font-weight:bold;\">Critical Installation Error:</span> The SQL query below produced an error.  The setup cannot continue until the problem has been fixed.  Contact Geo Support if you require assistance.<br />\n<strong>Query:</strong> ".$ret."<br />\n<strong>DB Error Message: </strong>".$db->ErrorMsg( )."<br /><br />" );
            }
            $ret = "";
            return TRUE;
        }
        if ( substr( $sql, 0, 1 ) == "#" || substr( $sql, 0, 2 ) == "--" )
        {
            $ret = "";
            return TRUE;
        }
        $ret .= $sql;
        return TRUE;
    }
    
    function run_upgrade( $template, $filename )
    {
        include( "../config.php" );
        include( "product.php" );
        if ( isset( $product_type ) && $product_type == 3 && file_exists( "../".$install[$product_type]['upgrade'] ) && file_exists( "../upgrade/index.php" ) )
        {
            echo "Fatal Error: You must remove ../".$install[$product_type]['upgrade']." or ../upgrade";
            exit( );
        }
        $nextButton = "\r\n\t\t<form action=\"".INSTALL."?a=site\" method=\"POST\">\r\n\t\t\t<input type=\"submit\" name=\"continue\" value='Continue >>'>\r\n\t\t</form>";
        if ( file_exists( "../upgrade/index.php" ) )
        {
            $embedUpgrade = TRUE;
            include( "../upgrade/index.php" );
            $nextButton = "\r\n\t\t\t<form action=".INSTALL."?a=site method=post>\r\n\t\t\t\t<input type=submit name=continue value='Continue >>' id='nextButton' disabled>\r\n\t\t\t</form>";
            ( "../upgrade/", $nextButton );
            $upgrade = new Upgrade( );
            $upgrade->doToCAELatest( );
            $upgrade['body'] .= "\r\n\t\t\tUpdating software<br />\r\n\t\t\t<br />\r\n\t\t\t".$upgrade->addLoadingBar( "doToCAELatest", $upgrade->totalQueries ).$nextButton;
            $replace = array(
                "(!header!)" => $upgrade->header,
                "(!MAINBODY!)" => $upgrade->body
            );
            return str_replace( array_keys( $replace ), array_values( $replace ), $template );
        }
    }
    
    ?>

  8.     
    #7
    Member
    Website's:
    LulzCovers.com LulzTroll.com
    ^^ which one is line 114
    Contact me for Traffic, SEO, WCDDL, Wordpress, IPB related Services or queries.
    Template Designing, PSD to HTML, Wordpress


  9.     
    #8
    Banned
    find out with np++

  10.     
    #9
    Banned
    yea sure

    ---------- Post added at 09:48 AM ---------- Previous post was at 09:32 AM ----------

    this is line number 14

    Code: 
    $embedUpgrade = TRUE;

  11.     
    #10
    Member
    Website's:
    imdber.org justpaste.me
    it doesn't contain a , so that's definitely not line 114.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Error Detected in sitemap XML. How to remove error?
    By Bobby3711 in forum Web Application/Script Support
    Replies: 1
    Last Post: 21st Mar 2012, 03:51 PM
  2. Rapidleech error: Error openning rar process
    By tractor3231 in forum Server Management
    Replies: 13
    Last Post: 14th Dec 2011, 04:35 AM
  3. HTTP Error 500 (Internal Server Error):
    By joshmoore in forum Technical Help Desk Support
    Replies: 4
    Last Post: 25th Nov 2011, 03:59 AM
  4. wtf happened? (ipb 3.23 skin error causes fatal error)
    By mrHunt in forum Technical Help Desk Support
    Replies: 1
    Last Post: 25th Nov 2011, 03:55 AM
  5. Adding Domain Error in cPanel (Error from park wrapper:)
    By Ryza in forum General Discussion
    Replies: 0
    Last Post: 20th Feb 2011, 01:57 AM

Tags for this Thread

BE SOCIAL