DangerMouse

Argh  Applause

Just uploaded a site to a server running

PHP

  5 and

Apache

  1.3.37 and ap

pear

  to recieve a 406 error (until now I'd never heard of it!) that I don't get when running the script locally. The only difference that is obvious to me is that my local version of

Apache

  (WAMP setup) is 2.2.4, I've no idea if this could be causing it?

As a bit of background, the script is very simple and makes use of the Zend Framework REST server http://framework.zend.com/manual/en/zend.rest.server.html to create an API for a web app I'm building. The REST api has two functions associated with it, one works and one doesnt, which suggests to me that the Zend framework isnt producing any content that should throw up this 406 error, equally both methods(functions) work locally.

Any suggestions on how to debug this problem would be much appreciated? The error seems to provide very little feedback  Applause.

Cheers,

DM

perkiset

A 406 is an "ACCEPT" problem

(see here: http://www.checkupdown.com/status/E406.html)

Although I'm having a hard time wrapping my brain around it, it would seem that your local server doesn't serve up something that is OK with your browser and so you don't see the error... or the code is trying to shoot something back that the server is malforming on the way back... something rather weird.

That is one of the more obscure errors...

DangerMouse

Thanks for the reply Perk. I read that link earlier, but it was a bit like martian to me! Made limited sense in theory but didnt really help fix the problem, particularly as the content was ok for the browser under one environment, but not under another.

Just discovered what the problem was, on the plus side it wasnt my noob

php

  code - yay(!) - but it was my noob shared hosting lol. The paramater I was passing to the script was a URL, the server has some form of 'hack' protection filter that breaks URLs containing other URLs - undocumented ofcourse  :Applause Quick .htaccess line fixed it, but it was pure fluke that I happened to read about a similar problem in an ancient wordpress forum post.

Starting to think that despite being new to all this VPS may be the way forward, fixing all the little nuances is a pain in the ass.

Cheers,

DM

perkiset

Oh yeah... if you're at all serious about things other than Ks of spam sites, a VPS is the least way to go.

Personally I CoLo with my own boxes - then I have my own VPSs on them because I want to have segregation between a variety of entities. Keeps things nice and clean.

Nice work, BTW on catching the discrepancy...

/p


Perkiset's Place Home   Politics @ Perkiset's