Premature end of script headers:
I am trying to populate my database using fgetcsv();
There are about 20-30 CSV files all in the same format. and all run
separately using the same function.
If I fgetcsv() one file i can view the contents on my site fine.
but after fgetcsv() a few files (maybe around 30,000 records) the fgetcsv()
finishes ok. but when i view on my website i get ...
-------------------------------
Server error!
The server encountered an internal error and was unable to complete your
request.
Error message:
Premature end of script headers: shopping.php
If you think this is a server error, please contact the webmaster.
Error 500
-----------------------------
If i then empty the table and start again with the CSV file that seemed to
cause this Server Error all works fine.
My question is what typically causes the Server Error message to be
generated. It doesn't seem to be the content of the table. and the
"shopping.php" script works upto about 30,000 records.
MySQL 4.1.11
Debian GNU/Linux
PHP Version 4.4.0
Re: Premature end of script headers:
"MS" <MS [at] nospam.com> wrote in message news:WqqdnRICvshuDZvbRVnyjQA [at] bt.com...
|I am trying to populate my database using fgetcsv();
|
| There are about 20-30 CSV files all in the same format. and all run
| separately using the same function.
|
| If I fgetcsv() one file i can view the contents on my site fine.
| but after fgetcsv() a few files (maybe around 30,000 records) the
fgetcsv()
| finishes ok. but when i view on my website i get ...
| -------------------------------
| Server error!
| The server encountered an internal error and was unable to complete your
| request.
|
| Error message:
| Premature end of script headers: shopping.php
|
| If you think this is a server error, please contact the webmaster.
|
| Error 500
| -----------------------------
|
| If i then empty the table and start again with the CSV file that seemed to
| cause this Server Error all works fine.
|
| My question is what typically causes the Server Error message to be
| generated. It doesn't seem to be the content of the table. and the
| "shopping.php" script works upto about 30,000 records.
|
| MySQL 4.1.11
| Debian GNU/Linux
| PHP Version 4.4.0
have you tried to adjust the max execution time and the memory limit?
Re: Premature end of script headers:
"Steve" <no.one [at] example.com> wrote in message
news:uAwNh.6$KN3.0 [at] newsfe03.lga...
> |
> | MySQL 4.1.11
> | Debian GNU/Linux
> | PHP Version 4.4.0
>
> have you tried to adjust the max execution time and the memory limit?
>
>
I have not tried those ideas, as when I get the server error it only takes
maybe 2 second to throw-up the error.
Can anyone tell me.... If your server limits the MBs that can be stored in
your MySQL database Say 40MB
and you are very close to that limit say 37MB full.
if when a query is used the size of the database is increased for the
internal sorting/selecting (temp tables) for the duration of the select
being run?? As this may account for the error!!
Re: Premature end of script headers:
"MS" <MS [at] nospam.com> wrote in message
news:cO6dnc_0dYs5nZrbnZ2dnUVZ8qminZ2d [at] bt.com...
|
| "Steve" <no.one [at] example.com> wrote in message
| news:uAwNh.6$KN3.0 [at] newsfe03.lga...
| > |
| > | MySQL 4.1.11
| > | Debian GNU/Linux
| > | PHP Version 4.4.0
| >
| > have you tried to adjust the max execution time and the memory limit?
| >
| >
|
| I have not tried those ideas, as when I get the server error it only takes
| maybe 2 second to throw-up the error.
|
| Can anyone tell me.... If your server limits the MBs that can be stored
in
| your MySQL database Say 40MB
|
| and you are very close to that limit say 37MB full.
|
| if when a query is used the size of the database is increased for the
| internal sorting/selecting (temp tables) for the duration of the select
| being run?? As this may account for the error!!
how did we go from processing a csv file to memory limits in mysql?
Re: Premature end of script headers:
"Steve" <no.one [at] example.com> wrote in message
news:qvENh.254$iF1.135 [at] newsfe04.lga...
>
> how did we go from processing a csv file to memory limits in mysql?
>
>
A Magical Mystery Tour !! :)
the processing of the CSV as far as i can tell is working fine, It is
retrieving the data from the tables where the server error occurs, which is
why i was wondering about the MySQL limits. If the database size is
increased temporarily while the query is being processed then reaching the
MySQL MB limit could account for the Server Error being produced.
Re: Premature end of script headers:
"MS" <MS [at] nospam.com> wrote in message
news:vvCdnfKSmfbjC5rbnZ2dnUVZ8vidnZ2d [at] bt.com...
|
| "Steve" <no.one [at] example.com> wrote in message
| news:qvENh.254$iF1.135 [at] newsfe04.lga...
|
| >
| > how did we go from processing a csv file to memory limits in mysql?
| >
| >
|
| A Magical Mystery Tour !! :)
|
| the processing of the CSV as far as i can tell is working fine, It is
| retrieving the data from the tables where the server error occurs, which
is
| why i was wondering about the MySQL limits. If the database size is
| increased temporarily while the query is being processed then reaching the
| MySQL MB limit could account for the Server Error being produced.
gotcha.