You are here:  » internal server error

Support Forum



internal server error

Submitted by rolli1 on Tue, 2008-11-04 22:40 in

Hi David,

I migrated to a new host and while I want to register the datafeeds I get the following error:

Servererror!
errormessage:
Premature end of script headers: feeds_import.php

Error 500

Is this a coding or hosting problem?

Regards

Roland

Submitted by support on Wed, 2008-11-05 11:19

Hi Roland,

This is a very obscure instance of a timeout problem; and only happens on very particular Apache / PHP configurations - and nobody is really sure exactly what causes it.

This has come up in the following thread:

http://www.pricetapestry.com/node/1162

There is a solution in there (link to a new version of feeds_import.php) that continuously generates output so that Apache does not timeout with the "Premature..." error...

This should help resolve any other timeout issues that you may have on this server - hope all goes well with your new host other than this...

Cheers,
David.

Submitted by rolli1 on Wed, 2008-11-05 17:03

Hi David,

I have changed the feeds_import.php and I see this one continuously outputs a count but it does not produce a link back to the admin page. Also no products are registered.

Regards

ROland

Submitted by support on Wed, 2008-11-05 17:16

Hi Roland,

Can you email me a link to the installation and we'll try and sort this one for you ASAP...

Cheers,
David.

Submitted by rolli1 on Thu, 2008-11-06 08:34

Hi David,

I have opened the admin for you. Please go to

{link saved}

smaller feeds are registered without problems.
Which other installation do you need? Ftp access?

The current php settings of my host are:

Current PHP settings for:
brand-fashion.com
PHP Version: 5.2.x
Zend Optimizer Version: 3.2.4
memory_limit: 128mb
max_execution_time: 180 seconds
upload_max_filesize: 16mb
Time Zone: GMT Change Time Zone
error_reporting: Show only serious errors
display_errors: On Not Recommended
asp_tags: Off
magic_quotes_runtime: Off
magic_quotes_gpc: Off
register_globals: Off
IonCube Loader: Disabled

Regards

Roland

Submitted by support on Thu, 2008-11-06 11:12

Hi Roland,

It looks like it is still timing out (just not saying "Premature end of script headers" now that content is being displayed).

As on all servers where timeout is an issue, have you been through the steps described in:

http://www.pricetapestry.com/node/582

...in particular try the php_value max_execution_time 0 in .htaccess in case this helps. Could you also check with your host to see if they can confirm a timeout at a specific number of seconds and see if they are willing to remove it on your account?

Cheers,
David.

Submitted by rolli1 on Thu, 2008-11-06 15:35

Hi David,

the max. execution time method does not work.

In the meantime I got answer from my host:

Dear Customer,

The maximum amount of time a script is permitted to run is 3
minutes.

That is not possible. You will have to use another method to put data
into the mysql
database. The time limit is there to protect all of our
customers.

Thank you,
Josh

What now? Would it be possible to cut the feeds into parts and then put it together again in the database? Looking for another host again?

Regards

Roland

Submitted by support on Thu, 2008-11-06 15:40

Hi Roland,

As you are using CSV feeds I will expedite my work on the phased import tool which will import in chunks (it's not so practical with XML). I'll email you something to try ASAP...

Cheers,
David.

Submitted by rolli1 on Thu, 2008-11-06 16:11

Thank you so much.

Roland

Submitted by rolli1 on Thu, 2008-11-06 20:42

Hi David,

I got this news from my host:
Dear Customer:

You will not be able to load data from a PHP script on your web site
if it takes longer than 180 seconds to run. No process is permitted
to run for more than 3 minutes.

The best way to import data is to connect to the MySQL server using
one of the client application available from MySQL. The MySQL Query
Brower allows you to connect to the MySQL and execute queries in an
application running on your PC>

What does this mean?

Regards

Roland

Submitted by support on Fri, 2008-11-07 07:11

Hi Roland,

That basically means the same as their previous email; they have a limit in place to avoid PHP scripts executing for more than 3 minutes; (presumably to avoid run-away scripts hogging the server); but they do allow other methods of MySQL connection to execute as long as required, and there are Windows based admin tools that connect directly to the MySQL port so I think this is what they mean. That doesn't really help i'm afraid in terms of importing large feeds as PHP is required to do that, but the phased import tool should solve the problem, and I hope to have it working by the end of this coming weekend...

Cheers,
David.

Submitted by rolli1 on Fri, 2008-11-07 14:42

Hi David,

I found a programm called bigdump with the following codeing:

{code saved}

Would it be possible to use this and which changes must be made for PT.

Regards

Roland

Submitted by support on Fri, 2008-11-07 16:40

Hi Roland,

The situation is just really down to script execution time, so no PHP solution is going to be allowed to run for the time required even if it was just executing the queries as this is what takes the time, not the parsing. The phased import tool which I'll get to you by the end of the weekend to try should solve the problem for you...

Cheers,
David.