You are here:  » Bad Gateway Error

Support Forum



Bad Gateway Error

Submitted by chrisst1 on Thu, 2008-02-28 11:19 in

Morning David

Since upgrading windows servers we seem to be getting random Bad Gateway Error messages when importing any large feed over 20mb through the admin area. I have looked at the php.ini settings and followed your posted advice on recommended settings but had no luck.
All feeds regarless of size imported fine into fresh new databases but reimporting the big ones seems to cause the problem.

Also if we try to run exec(php "../scripts/import.php" @MODIFIED) through a php custom script we get the message "cannot fork".

Any advice would be much appreciated.

Chris

Submitted by support on Thu, 2008-02-28 16:18

Hello Chris,

It sounds like PHP is running in quite a restrictive mode on your new server. The best method to use (if possible) is not to try and import via the web browser; but to run the import.php script manually from the command line.

Are you able to login to your server and get a command prompt (for example via telnet)? You could then perform an operation similar to this:

c:\>cd path/to/pricetapestry/scripts
c:\path\to\pricetapestry\scripts\>php import.php @MODIFIED

I've not come across "Bad Gateway" before so i'll look into that for you - it sounds like their may be some kind of proxy server in-between you and the main server that is timing out because of the lack of output from the import script...

Cheers,
David.

Submitted by chrisst1 on Mon, 2008-03-03 16:43

Hi David

Apologies for the slow reply. I've had a word with our server provider and he's indicated that the way PHP operates may be the cause and that changing it from a module to a CGI mode may help. So he is going to look in to it.

I'll get back to you with the results if any.

Chris

Submitted by chrisst1 on Fri, 2008-03-07 11:16

Morning David

Turns out the php needed restarting per domain from within plesk after altering the php.ini settings (have not had a bad gateway so far anyway) and large feeds are importing ok.

I noticed that the default charset in php.ini is set to iso-8859-1 would it be safe to change this to utf-8 or would it be better to change the config charset for PT.

Chris

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

Hello Chris,

You shouldn't need to change the default charset in php.ini as Price Tapestry uses the value in config.php wherever it is relevant - so it won't make any difference...

Cheers,
David.