php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #14686 erorr in import data
Submitted: 2001-12-24 10:14 UTC Modified: 2001-12-24 10:17 UTC
From: tom dot p at sf dot cz Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.0.6 OS: Windows 2000
Private report: No CVE-ID: None
 [2001-12-24 10:14 UTC] tom dot p at sf dot cz
Hi,

 I'm satisfied user of PHPmyAdmin 2.2.2, but I found it 2 bugs in file
'read_dump.php'. I'dont very well english. :-(

Bug 1:

 On the line 218 change "if ($sql_file != 'none')" to "if (($sql_file !=
'none')&&($sql_file != "")) {"

 Reason: Some browser return "" (nullstring) instead "none", where file not selected.

 This bug is again on the line 264.

Bug 2:

On the line 286 is this code:

    // Runs multiple queries
    else if (mysql_select_db($db)) {
        for ($i = 0; $i < $pieces_count; $i++) {
            $a_sql_query = $pieces[$i];
            $result = mysql_query($a_sql_query);
            if ($result == FALSE) { // readdump failed
                $my_die = $a_sql_query;
                break;
            }
            if (!isset($reload) && eregi('^(DROP|CREATE)[[:space:]]+(IF
EXISTS[[:space:]]+)?(TABLE|DATABASE)[[:space:]]+(.+)', $a_sql_query)) {
                $reload = 1;
            }
        } // end for
    } // end else if

 In this code isn't condition for treatment line with char '#' in begin of the line
or blank line.
 This condition was in last versions of PHPmyAdmin.
 This is code for some last version:

    // Runs multiple queries
    else if (mysql_select_db($db)) {
        for ($i = 0; $i < $pieces_count; $i++) {
            $a_sql_query = trim($pieces[$i]);
            ******************************************************
            if (!empty($a_sql_query) && $a_sql_query[0] != '#') {
            ******************************************************
                $result = mysql_query($a_sql_query);
                if ($result == FALSE) { // readdump failed
                    $my_die = $a_sql_query;
                    break;
                }
            }
            if (!isset($reload) && eregi('^(DROP|CREATE)[[:space:]]+(IF
EXISTS[[:space:]]+)?(TABLE|DATABASE)[[:space:]]+(.+)', $a_sql_query)) {
                $reload = 'true';
            }
        } // end for
    } // end else if

  
  Bye !

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-12-24 10:17 UTC] sander@php.net
This is not a bug-forum for phpMyAdmin. This is for bugs in PHP. See http://phpmyadmin.sf.net for more information on phpMyAdmin.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed May 07 10:01:28 2025 UTC