Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

macfaninpdx

macrumors regular
Mar 6, 2007
198
0
Line 20 is:

Code:
      $result = mysqli_query( $link, $sql );

Change the line
PHP:
$mysqli = new mysqli("localhost","test","******","roger");
to
PHP:
$link = mysqli_connect("localhost", "test", "******", "roger");
Then change
PHP:
if (mysqli_connect_errno())
to
PHP:
if (!$link) {
 

barr08

macrumors 65816
Original poster
Aug 9, 2006
1,361
0
Boston, MA
Now I am getting this error:

Parse error: syntax error, unexpected $end in C:\xampp\htdocs\PHP\Parser2.php on line 26
 

macfaninpdx

macrumors regular
Mar 6, 2007
198
0
Now I am getting this error:

Parse error: syntax error, unexpected $end in C:\xampp\htdocs\PHP\Parser2.php on line 26

Well, first of all, it would be easiest if you were to show me line 26, and some lines before and after.

But parse errors mean your code won't parse, most like because of a typo. Check for semi-colons at the end of the lines - it is a common cause. Also, if you literally copied and pasted the change I suggested earlier, you may have two {'s on your if loop. Check the if (!$link) loop to make sure there is exactly one open bracket and one close bracket.
 

barr08

macrumors 65816
Original poster
Aug 9, 2006
1,361
0
Boston, MA
Well, first of all, it would be easiest if you were to show me line 26, and some lines before and after.

But parse errors mean your code won't parse, most like because of a typo. Check for semi-colons at the end of the lines - it is a common cause. Also, if you literally copied and pasted the change I suggested earlier, you may have two {'s on your if loop. Check the if (!$link) loop to make sure there is exactly one open bracket and one close bracket.

Thats the thing, there is no line 26. The whole thing is only 22 lines. I forgot to mention this initially. And I noticed the bracket thing, thats not it.
 

macfaninpdx

macrumors regular
Mar 6, 2007
198
0
Thats the thing, there is no line 26. The whole thing is only 22 lines. I forgot to mention this initially. And I noticed the bracket thing, thats not it.

Did you close your code with
PHP:
?>
? If so, I will need to see the whole Parser2.php file to be of assistance.
 

barr08

macrumors 65816
Original poster
Aug 9, 2006
1,361
0
Boston, MA
It isn't erroring any more, but I ran it, and it didn't send anything to the database, as far as I can tell.

Here is my code:

PHP:
<?php 

$link = mysqli_connect("localhost", "test", "xxxxxxx", "roger");  
if (!$link) 
{
  printf("Connection failed: %s\n", mysqli_connect_error());
  exit();
}

$logfile = file("C:\Documents and Settings\a407667\Desktop\Parser\sampleLogs"); 

foreach ($logfile AS $linenum => $val) {   
    preg_match ('/^(\d+)\/(\d+)\/(\d+)\s+(\d+):(\d+):(\d+)\.(\d+)\s+(.*?)\s+(Servlet.Engine.Transports : \d+)\s+(.*)$/i', $val, $myResult);   

     print_r ($myResult);     

      $datefield = "{$myResult[3]}-{$myResult[1]}-{$myResult[2]} {$myResult[4]}:{$myResult[5]}:{$myResult[6]}";  

      $sql = "INSERT INTO diamond (`DT`, `MS`, `LVL`, `DENT`, `MSG`) VALUES ('$datefield', '{$myResult[7]}', '{$myResult[8]}', '{$myResult[9]}', '{$myResult[10]}')"; 
      $result = mysqli_query( $link, $sql ); 
}  
  
?>

Thanks for sticking around and being so patient with me.
 

macfaninpdx

macrumors regular
Mar 6, 2007
198
0
It isn't erroring any more, but I ran it, and it didn't send anything to the database, as far as I can tell.
Put some debugging lines in your code:
PHP:
<?php 

$link = mysqli_connect("localhost", "test", "xxxxxxx", "roger");  
if (!$link) 
{
  printf("Connection failed: %s\n", mysqli_connect_error());
  exit();
}

$logfile = file("C:\Documents and Settings\a407667\Desktop\Parser\sampleLogs"); 

foreach ($logfile AS $linenum => $val) {   
    preg_match ('/^(\d+)\/(\d+)\/(\d+)\s+(\d+):(\d+):(\d+)\.(\d+)\s+(.*?)\s+(Servlet.Engine.Transports : \d+)\s+(.*)$/i', $val, $myResult);   

     print_r ($myResult);     

      $datefield = "{$myResult[3]}-{$myResult[1]}-{$myResult[2]} {$myResult[4]}:{$myResult[5]}:{$myResult[6]}";
      echo $datefield . "<br>"; //debug

      $sql = "INSERT INTO diamond (`DT`, `MS`, `LVL`, `DENT`, `MSG`) VALUES ('$datefield', '{$myResult[7]}', '{$myResult[8]}', '{$myResult[9]}', '{$myResult[10]}')"; 
      echo $sql . "<br>"; //debug
      $result = mysqli_query( $link, $sql );
      if ($result) { //debug
           printf("INSERTED %d rows.\n", mysqli_num_rows($result));
      } else {
           echo "mysqli_query returned false.<br>";
      }
      mysqli_free_result($result);
}  
  
?>

Also, I added the mysqli_free_result command, as I can't remember if you need that. Also, what does the print_r($myResult) display? Anything? If not, you may not be reading in the logfile correctly. View the source to see if there are a bunch of empty arrays being displayed.
 

barr08

macrumors 65816
Original poster
Aug 9, 2006
1,361
0
Boston, MA
OK the error from the debug is:


Code:
Array ( ) -- ::
INSERT INTO diamond (`DT`, `MS`, `LVL`, `DENT`, `MSG`) VALUES ('-- ::', '', '', '', '')
mysqli_query returned false.

and

Code:
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in C:\xampp\htdocs\PHP\Parse.php on line 28

before each array.
 

macfaninpdx

macrumors regular
Mar 6, 2007
198
0
This means the array is empty, so the logfile is not being read correctly (or the preg_match isn't working).
Code:
Array ( )
This means the array is empty - the result of the $datefield line.
Code:
 -- ::
This also means the array is empty, since there are empty values.
Code:
INSERT INTO diamond (`DT`, `MS`, `LVL`, `DENT`, `MSG`) VALUES ('-- ::', '', '', '', '')
This means that $result is false, which means that mysqli_query did not work.
Code:
mysqli_query returned false.

This is because the query did not work.
Code:
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in C:\xampp\htdocs\PHP\Parse.php on line 28

So I am thinking there may be a problem with the file path. When you specify "C:\Documents and Settings\a407667\Desktop\Parser\sampleLogs", the backslashes are treated as escape characters and hence the path is screwy. Try "C:\\Documents and Settings\\a407667\\Desktop\\Parser\\sampleLogs".
 

barr08

macrumors 65816
Original poster
Aug 9, 2006
1,361
0
Boston, MA
I tried changing the path, same result.

I think the array is being filled, you can see it here:

Code:
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in C:\xampp\htdocs\PHP\Parse.php on line 28
Array ( [0] => 06/07/07 02:44:16.516 INFO Servlet.Engine.Transports : 0 PortalMonitorHandler is initialised with 'alertableLevel' set to 15 and 'maxLevel' set to 40 [1] => 06 [2] => 07 [3] => 07 [4] => 02 [5] => 44 [6] => 16 [7] => 516 [8] => INFO [9] => Servlet.Engine.Transports : 0 [10] => PortalMonitorHandler is initialised with 'alertableLevel' set to 15 and 'maxLevel' set to 40 ) 07-06-07 02:44:16
INSERT INTO diamond (`DT`, `MS`, `LVL`, `DENT`, `MSG`) VALUES ('07-06-07 02:44:16', '516', 'INFO', 'Servlet.Engine.Transports : 0', 'PortalMonitorHandler is initialised with 'alertableLevel' set to 15 and 'maxLevel' set to 40 ')
mysqli_query returned false.

In this part specifically:

Code:
[1] => 06 [2] => 07 [3] => 07 [4] => 02 [5] => 44 [6] => 16 [7] => 516 [8] => INFO [9] => Servlet.Engine.Transports : 0 [10] => PortalMonitorHandler is initialised with 'alertableLevel' set to 15 and 'maxLevel' set to 40 ) 07-06-07 02:44:16

I tried changing the path with the extra backslash, it errored with the results above. The excerpt above is from the second result on the page. The first result is indeed an empty array, but it is the only one:

Code:
Array ( ) -- ::
INSERT INTO diamond (`DT`, `MS`, `LVL`, `DENT`, `MSG`) VALUES ('-- ::', '', '', '', '')
mysqli_query returned false.
 

macfaninpdx

macrumors regular
Mar 6, 2007
198
0
OK the error from the debug is:


Code:
Array ( ) -- ::
INSERT INTO diamond (`DT`, `MS`, `LVL`, `DENT`, `MSG`) VALUES ('-- ::', '', '', '', '')
mysqli_query returned false.

I think the array is being filled, you can see it here:

Code:
Warning: mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in C:\xampp\htdocs\PHP\Parse.php on line 28
Array ( [0] => 06/07/07 02:44:16.516 INFO Servlet.Engine.Transports : 0 PortalMonitorHandler is initialised with 'alertableLevel' set to 15 and 'maxLevel' set to 40 [1] => 06 [2] => 07 [3] => 07 [4] => 02 [5] => 44 [6] => 16 [7] => 516 [8] => INFO [9] => Servlet.Engine.Transports : 0 [10] => PortalMonitorHandler is initialised with 'alertableLevel' set to 15 and 'maxLevel' set to 40 ) 07-06-07 02:44:16
INSERT INTO diamond (`DT`, `MS`, `LVL`, `DENT`, `MSG`) VALUES ('07-06-07 02:44:16', '516', 'INFO', 'Servlet.Engine.Transports : 0', 'PortalMonitorHandler is initialised with 'alertableLevel' set to 15 and 'maxLevel' set to 40 ')
mysqli_query returned false.

In your previous post, the array was empty (or you did not post the entire results). In your recent post, the array is not empty. Did you post the entire results when you first posted the error you were getting?

It is very difficult to debug remotely, especially when we are not looking at the entire code, nor are we seeing the entire output. We don't need to see repeating portions of the output, but at least the entire piece between repeats. Repost the results of your current code so we can take a look.

Also, the mysqli_free_result warning is from a different file, Parse.php. I don't believe you have shown the code from that file, right? We were dealing with a file called Parser2.php, weren't we?
 

barr08

macrumors 65816
Original poster
Aug 9, 2006
1,361
0
Boston, MA
In your previous post, the array was empty (or you did not post the entire results). In your recent post, the array is not empty. Did you post the entire results when you first posted the error you were getting?

It is very difficult to debug remotely, especially when we are not looking at the entire code, nor are we seeing the entire output. We don't need to see repeating portions of the output, but at least the entire piece between repeats. Repost the results of your current code so we can take a look.

Also, the mysqli_free_result warning is from a different file, Parse.php. I don't believe you have shown the code from that file, right? We were dealing with a file called Parser2.php, weren't we?


Sorry, I changed the name, same code. The file is now Parse.php.

Here is a chunk of the result I get when I run the script, from the source (because it is formatted better):

Code:
Array
(
)
-- ::<br>INSERT INTO diamond (`DT`, `MS`, `LVL`, `DENT`, `MSG`) VALUES ('-- ::', '', '', '', '')<br>mysqli_query returned false.<br><br />
<b>Warning</b>:  mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in <b>C:\xampp\htdocs\PHP\Parse.php</b> on line <b>28</b><br />
Array
(
    [0] => 06/07/07 02:44:16.516 INFO Servlet.Engine.Transports : 0 PortalMonitorHandler is initialised with 'alertableLevel' set to 15 and 'maxLevel' set to 40
    [1] => 06
    [2] => 07
    [3] => 07
    [4] => 02
    [5] => 44
    [6] => 16
    [7] => 516
    [8] => INFO
    [9] => Servlet.Engine.Transports : 0
    [10] => PortalMonitorHandler is initialised with 'alertableLevel' set to 15 and 'maxLevel' set to 40
)
07-06-07 02:44:16<br>INSERT INTO diamond (`DT`, `MS`, `LVL`, `DENT`, `MSG`) VALUES ('07-06-07 02:44:16', '516', 'INFO', 'Servlet.Engine.Transports : 0', 'PortalMonitorHandler is initialised with 'alertableLevel' set to 15 and 'maxLevel' set to 40
')<br>mysqli_query returned false.<br><br />
<b>Warning</b>:  mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in <b>C:\xampp\htdocs\PHP\Parse.php</b> on line <b>28</b><br />
Array
(
    [0] => 06/07/07 02:44:21.798 INFO Servlet.Engine.Transports : 0 returning  cpsManager 
    [1] => 06
    [2] => 07
    [3] => 07
    [4] => 02
    [5] => 44
    [6] => 21
    [7] => 798
    [8] => INFO
    [9] => Servlet.Engine.Transports : 0
    [10] => returning  cpsManager 
)

This is the first 3 results from the source, the rest is just the same thing but with different data in the array items. Please let me know if you need more information.

This is the most current version of the code I am working with:


PHP:
<?php  

$link = mysqli_connect("localhost", "test", "thumper", "roger");   
if (!$link)  
{ 
  printf("Connection failed: %s\n", mysqli_connect_error()); 
  exit(); 
} 

$logfile = file("C:\\Documents and Settings\\a407667\\Desktop\\Parser\\sampleLogs");  

foreach ($logfile AS $linenum => $val) {    
    preg_match ('/^(\d+)\/(\d+)\/(\d+)\s+(\d+):(\d+):(\d+)\.(\d+)\s+(.*?)\s+(Servlet.Engine.Transports : \d+)\s+(.*)$/i', $val, $myResult);    

     print_r ($myResult);      

      $datefield = "{$myResult[3]}-{$myResult[1]}-{$myResult[2]} {$myResult[4]}:{$myResult[5]}:{$myResult[6]}"; 
      echo $datefield . "<br>"; //debug 

      $sql = "INSERT INTO diamond (`DT`, `MS`, `LVL`, `DENT`, `MSG`) VALUES ('$datefield', '{$myResult[7]}', '{$myResult[8]}', '{$myResult[9]}', '{$myResult[10]}')";  
      echo $sql . "<br>"; //debug 
      $result = mysqli_query( $link, $sql ); 
      if ($result) { //debug 
           printf("INSERTED %d rows.\n", mysqli_num_rows($result)); 
      } else { 
           echo "mysqli_query returned false.<br>"; 
      } 
      mysqli_free_result($result); 
}   
   
?>
 

macfaninpdx

macrumors regular
Mar 6, 2007
198
0
OK, now things are starting to make a little more sense. The first empty array is most likely because of a blank line in the log file. This would cause the INSERT statement to faile, and hence the initial warning.

The next line does not have an empty array, but there are single quotes in the last field og the array. These need to be escaped in PHP so mySQL will not get confused on your INSERT statement. And this is also most likely causing the rest of the warnings, since if the INSERT falils there will not be a $result fo free.

See changes below (I tried to make it easier to identify what I changed by wrapping them in comments):
PHP:
<?php   

$link = mysqli_connect("localhost", "test", "********", "roger");    
if (!$link)   
{  
  printf("Connection failed: %s\n", mysqli_connect_error());  
  exit();  
}  

$logfile = file("C:\\Documents and Settings\\a407667\\Desktop\\Parser\\sampleLogs");   

foreach ($logfile AS $linenum => $val) {     
    preg_match ('/^(\d+)\/(\d+)\/(\d+)\s+(\d+):(\d+):(\d+)\.(\d+)\s+(.*?)\s+(Servlet.Engine.Transports : \d+)\s+(.*)$/i', $val, $myResult);     

      print_r ($myResult); //debug

      //Begin Changed
      if (count ($myResult) > 0 ) { //Added if loop
      //End Changed
            $datefield = "{$myResult[3]}-{$myResult[1]}-{$myResult[2]} {$myResult[4]}:{$myResult[5]}:{$myResult[6]}";  
            echo $datefield . "<br>"; //debug  

            //Begin Changed
            $msg = addslashes (rtrim ($myResult[10]) ); //addslashes will escape the quotes, rtrim will get rid of the LF character.
            $sql = "INSERT INTO diamond (`DT`, `MS`, `LVL`, `DENT`, `MSG`) VALUES ('$datefield', '{$myResult[7]}', '{$myResult[8]}', '{$myResult[9]}', '$msg')"; //updated line
            //End Changed
            echo $sql . "<br>"; //debug  
            $result = mysqli_query( $link, $sql );  
            if ($result) { //debug  
                 printf("INSERTED %d rows.\n", mysqli_num_rows($result));  
                 //Begin Changed
                 mysqli_free_result($result);  //moved line
                 //End Changed
            } else {  
                 echo "mysqli_query returned false.<br>";  
            }  
      //Begin Changed
      } //Close if loop
      //End Changed
}    
    
?>
 

barr08

macrumors 65816
Original poster
Aug 9, 2006
1,361
0
Boston, MA
Well, it worked without an error, but it didn't add any info to the tables.

Maybe there is something wrong with my database. Here is a screenshot of the phpmyadmin page:
 

Attachments

  • shot.JPG
    shot.JPG
    96.3 KB · Views: 82

macfaninpdx

macrumors regular
Mar 6, 2007
198
0
Once again, you did not post any results from your ouput. It is difficult to determine what is happening without seeing what the code produces.
 

barr08

macrumors 65816
Original poster
Aug 9, 2006
1,361
0
Boston, MA
Sorry.

Code:
Array
(
)
Array
(
    [0] => 06/07/07 02:44:16.516 INFO Servlet.Engine.Transports : 0 PortalMonitorHandler is initialised with 'alertableLevel' set to 15 and 'maxLevel' set to 40
    [1] => 06
    [2] => 07
    [3] => 07
    [4] => 02
    [5] => 44
    [6] => 16
    [7] => 516
    [8] => INFO
    [9] => Servlet.Engine.Transports : 0
    [10] => PortalMonitorHandler is initialised with 'alertableLevel' set to 15 and 'maxLevel' set to 40
)
07-06-07 02:44:16<br>INSERT INTO diamond (`DT`, `MS`, `LVL`, `DENT`, `MSG`) VALUES ('07-06-07 02:44:16', '516', 'INFO', 'Servlet.Engine.Transports : 0', 'PortalMonitorHandler is initialised with \'alertableLevel\' set to 15 and \'maxLevel\' set to 40')<br>mysqli_query returned false.<br>Array
(
    [0] => 06/07/07 02:44:21.798 INFO Servlet.Engine.Transports : 0 returning  cpsManager 
    [1] => 06
    [2] => 07
    [3] => 07
    [4] => 02
    [5] => 44
    [6] => 21
    [7] => 798
    [8] => INFO
    [9] => Servlet.Engine.Transports : 0
    [10] => returning  cpsManager 
)
07-06-07 02:44:21<br>INSERT INTO diamond (`DT`, `MS`, `LVL`, `DENT`, `MSG`) VALUES ('07-06-07 02:44:21', '798', 'INFO', 'Servlet.Engine.Transports : 0', 'returning  cpsManager')<br>mysqli_query returned false.<br>Array
(
    [0] => 06/07/07 02:44:21.896 INFO Servlet.Engine.Transports : 0 Creating new connection to: cpsuat33.fmr.com:33443null  ok: true
    [1] => 06
    [2] => 07
    [3] => 07
    [4] => 02
    [5] => 44
    [6] => 21
    [7] => 896
    [8] => INFO
    [9] => Servlet.Engine.Transports : 0
    [10] => Creating new connection to: cpsuat33.fmr.com:33443null  ok: true
)
07-06-07 02:44:21<br>INSERT INTO diamond (`DT`, `MS`, `LVL`, `DENT`, `MSG`) VALUES ('07-06-07 02:44:21', '896', 'INFO', 'Servlet.Engine.Transports : 0', 'Creating new connection to: cpsuat33.fmr.com:33443null  ok: true')<br>mysqli_query returned false.<br>Array
(
)
 

macfaninpdx

macrumors regular
Mar 6, 2007
198
0
OK, the first thing I noticed is that in your INSERT statement, you are using a field name of LVL, but the actual field is LEVEL in the db. This will cause an error and will not execute the query correctly.

Also, to help catch these types of errors next time, change
PHP:
echo "mysqli_query returned false.<br>";
to
PHP:
printf("SQL Error: %s\n", mysqli_error($link));
 

barr08

macrumors 65816
Original poster
Aug 9, 2006
1,361
0
Boston, MA
Good catch on the LVL. I changed that and added that error catching line, here is what I got:

Code:
Array
(
)
Array
(
    [0] => 06/07/07 02:44:16.516 INFO Servlet.Engine.Transports : 0 PortalMonitorHandler is initialised with 'alertableLevel' set to 15 and 'maxLevel' set to 40
    [1] => 06
    [2] => 07
    [3] => 07
    [4] => 02
    [5] => 44
    [6] => 16
    [7] => 516
    [8] => INFO
    [9] => Servlet.Engine.Transports : 0
    [10] => PortalMonitorHandler is initialised with 'alertableLevel' set to 15 and 'maxLevel' set to 40
)
07-06-07 02:44:16<br>INSERT INTO diamond (`DT`, `MS`, `LVL`, `DENT`, `MSG`) VALUES ('07-06-07 02:44:16', '516', 'INFO', 'Servlet.Engine.Transports : 0', 'PortalMonitorHandler is initialised with \'alertableLevel\' set to 15 and \'maxLevel\' set to 40')<br><br />
<b>Warning</b>:  mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in <b>C:\xampp\htdocs\PHP\Parser2.php</b> on line <b>30</b><br />
INSERTED 0 rows.
<br />
<b>Warning</b>:  mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in <b>C:\xampp\htdocs\PHP\Parser2.php</b> on line <b>32</b><br />
Array
(
    [0] => 06/07/07 02:44:21.798 INFO Servlet.Engine.Transports : 0 returning  cpsManager 
    [1] => 06
    [2] => 07
    [3] => 07
    [4] => 02
    [5] => 44
    [6] => 21
    [7] => 798
    [8] => INFO
    [9] => Servlet.Engine.Transports : 0
    [10] => returning  cpsManager 
)
07-06-07 02:44:21<br>INSERT INTO diamond (`DT`, `MS`, `LVL`, `DENT`, `MSG`) VALUES ('07-06-07 02:44:21', '798', 'INFO', 'Servlet.Engine.Transports : 0', 'returning  cpsManager')<br><br />
<b>Warning</b>:  mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in <b>C:\xampp\htdocs\PHP\Parser2.php</b> on line <b>30</b><br />
INSERTED 0 rows.
<br />
<b>Warning</b>:  mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in <b>C:\xampp\htdocs\PHP\Parser2.php</b> on line <b>32</b><br />
Array
(
    [0] => 06/07/07 02:44:21.896 INFO Servlet.Engine.Transports : 0 Creating new connection to: cpsuat33.fmr.com:33443null  ok: true
    [1] => 06
    [2] => 07
    [3] => 07
    [4] => 02
    [5] => 44
    [6] => 21
    [7] => 896
    [8] => INFO
    [9] => Servlet.Engine.Transports : 0
    [10] => Creating new connection to: cpsuat33.fmr.com:33443null  ok: true
)
07-06-07 02:44:21<br>INSERT INTO diamond (`DT`, `MS`, `LVL`, `DENT`, `MSG`) VALUES ('07-06-07 02:44:21', '896', 'INFO', 'Servlet.Engine.Transports : 0', 'Creating new connection to: cpsuat33.fmr.com:33443null  ok: true')<br><br />
<b>Warning</b>:  mysqli_num_rows() expects parameter 1 to be mysqli_result, boolean given in <b>C:\xampp\htdocs\PHP\Parser2.php</b> on line <b>30</b><br />
INSERTED 0 rows.
<br />
<b>Warning</b>:  mysqli_free_result() expects parameter 1 to be mysqli_result, boolean given in <b>C:\xampp\htdocs\PHP\Parser2.php</b> on line <b>32</b><br />
Array
(
)
Array
(
)

Lines 30 - 32
Code:
                 printf("INSERTED %d rows.\n", mysqli_num_rows($result));   
                 //Begin Changed 
                 mysqli_free_result($result);  //moved line
 

macfaninpdx

macrumors regular
Mar 6, 2007
198
0
I don't know why the error is not outputting if the INSERT is failing. Copy the following line and try to paste it directly in phpmyadmin.
Code:
INSERT INTO diamond (`DT`, `MS`, `LVL`, `DENT`, `MSG`) VALUES ('07-06-07 02:44:16', '516', 'INFO', 'Servlet.Engine.Transports : 0', 'PortalMonitorHandler is initialised with \'alertableLevel\' set to 15 and \'maxLevel\' set to 40')
To do this, click on the SQL tab in phpMyAdmin and paste it into the SQL field. Post the results.
 

barr08

macrumors 65816
Original poster
Aug 9, 2006
1,361
0
Boston, MA
So I went to lunch, and when I came back, the table was full with my parsed data!

About 10 minutes ago I emptied it and tried parsing again to make sure it wasn't a fluke. I am still waiting for the table to re-populate. I'll keep you posted.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.