Hello,

I have a fairly big table of 60K rows with 9 cols. 

I have a C++ app that connects to a PHP page. This PHP
page in turn connects to the above table and outputs
all the row in form of XML. I get all this data in my
C++ app, parse it with an XML parser and do my work.
My PHP source looks something like:

$numrows = mysql_num_rows ( $result );
echo "<r_i c=\"$numrows\">";
while ( $row = mysql_fetch_array ( $result ) )
{
 $lengths = mysql_fetch_lengths ( $result );
 echo "<r>";
 for ( $i=0; $i < $fieldcount; $i++ )  {
  echo "<c l=\"$lengths[$i]\">";
  if ( !isset($row[$i]) /*== NULL*/ )   {
   echo "(NULL)";  }
  else   {
   if ( mysql_field_type ( $result, $i ) == "blob" ) 
   {    if ( $lengths[$i] == 0 ) 
    {     echo "_";    }
    else    {
     echo convertxmlchars ( base64_encode ( $row[$i] )
);
    }   }   else
   {    if ( $lengths[$i] == 0 ) 
    {     echo "_";    }
    else    {
     echo convertxmlchars($row[$i]);     }  }  }
  echo "</c>"; } echo "</r>";}
echo "</r_i></xml>";

Now for this table the server is always throwing up
the above error. The server is running 4.1.2 on Linux.
Actually its my ISP configuration.

I have a replica of the same table in my localhost
machine running IIS/PHP 4.1.2. I never get this error.
It might because I am in the same machine but why the
error throwing up from my ISP machine?

I checked the memory_limit value of both my localhost
and ISP. They are both 8M, but the dump works from
localhost PHP but not ISP. Since I have full control
over my localhost PHP settings, i changed the
memory_limit to 1M in php.ini and reexecuted the
process from my C app. Bingo it still works. But not
unde 8m limit of my ISP. 

Also my ISP had max_execution_time of 30secs and my
localhost had 300secs. So I changed my local php.ini
and converted the value to 30sec. Still the process
gets over in my local machine.

So I went ahead and made the value to be 5sec. But now
in my local machine the script gets stopped after some
time and it echoes half the XML. Since the elements
start/end pair are not correct my XML parser throws up
the error.

Now both the system atleast throws up error but the
error are not same. With my ISP i get - Premature end
of script headers and on my local the server echoes
half the information and dies.

Sorry for the long post but I have tried to give as
much description as possible.

Regards,
Karam




                
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to