Re: [PHP] Server Error : Premature end of script headers: php-engine
* Thus wrote Karam Chand: Hello, Connecting to the PHP using Windows WinInet APIs. Mine is a C++ app that connects to the PHP and gets data. The above probcess works like a cheese for tables upto 10-20K but when I put on more heavy load like the table described, WinInetAPI returns with the following error. ah.. this sounds like php is probably running out of memory. See php.ini setting 'memory_limit'. It could also be an issue with 'max_execution_time' as well. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Server Error : Premature end of script headers: php-engine
Hi, Thanks for your continued help. Even I was wondering the same problem. So I went ahead to look into the ini settings. My local memory limit is 8M as well as the ISP one. The timeout for my local PHP is 300 secs and timeout for my ISP is 30 secs. Even if I try to reduce my local timeout value to a very small value the script dosnt seem to break and the ouput comes correctly. The problem only happens when I connect to my ISP server i.e. a remote server. I think that this is a MEMORU overshoot problem as lot of other users also use the same ISP machine for their PHP work so I guess all combined work crosses the memory limit. Regards, Ritesh --- Curt Zirzow [EMAIL PROTECTED] wrote: * Thus wrote Karam Chand: Hello, Connecting to the PHP using Windows WinInet APIs. Mine is a C++ app that connects to the PHP and gets data. The above probcess works like a cheese for tables upto 10-20K but when I put on more heavy load like the table described, WinInetAPI returns with the following error. ah.. this sounds like php is probably running out of memory. See php.ini setting 'memory_limit'. It could also be an issue with 'max_execution_time' as well. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ___ Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. http://promotions.yahoo.com/goldrush -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Server Error : Premature end of script headers: php-engine
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
Re: [PHP] Server Error : Premature end of script headers: php-engine
* Thus wrote Karam Chand: 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: Connection to a PHP page how? The Premature end of script headers error is usually due to a cgi-script not sending the right headers which minimally is: HTTP/1.x 200 OK Content-Type: type/ofcontent ...data If you dont get that first line back (the status line) then you will most likely get that error. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Server Error : Premature end of script headers: php-engine
Hello, Connecting to the PHP using Windows WinInet APIs. Mine is a C++ app that connects to the PHP and gets data. The above probcess works like a cheese for tables upto 10-20K but when I put on more heavy load like the table described, WinInetAPI returns with the following error. Regards, Karam --- Curt Zirzow [EMAIL PROTECTED] wrote: * Thus wrote Karam Chand: 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: Connection to a PHP page how? The Premature end of script headers error is usually due to a cgi-script not sending the right headers which minimally is: HTTP/1.x 200 OK Content-Type: type/ofcontent ...data If you dont get that first line back (the status line) then you will most likely get that error. Curt -- First, let me assure you that this is not one of those shady pyramid schemes you've been hearing about. No, sir. Our model is the trapezoid! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php