I have developed a website that uses DXHTMLGrid and it’s working perfectly in Firefox. It’s also working fine in IE7 when I’m loading it from localhost. However when I upload the site to my online server, it’s still working fine under Firefox, but with IE7 I get the following error when trying to update a record:
Not an XML, probably incorrect content type specified (must be text/xml), or some text output was started before XML data
- long querystring -
You don’t have permission to access /cms/update.php on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8i DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/18.104.22.16835 Server at www.[mydomain].com Port 80
This is obviously returned when using the debug feature. This only happens on update, the grid populates just fine.
Apparenlty there’s a permission error with IE, but why is it working fine with Firefox.
Any thoughts what I should do?
In case when such error occurs for both IE and FF - it is the incorrect path or server settings.
In case of IE the next things may be the reason
a) IE may cache old response, you can try to change path used for dataprocessor , as cms/update.php?seed=some_random_value to double-check that problem not related to caching
b) The server setting - not quite sure what used in your case , and while it not common for php servers, it possible to cofigure server side so it will accept GET request and block POST data submit. Update operation may use POST data sending and be blocked because of it.
Here is the code I use to initialize the grid:
myDataProcessor = new dataProcessor(“update.php”);
myDataProcessor.setUpdateMode(“cell”);//available values: cell (default), row, off
So the transaction mode is set to GET. As I was saying, this is only happening with IE (tested both 6 and 7) and ONLY when running the site on my HostGator account. It’s working fine with Firefox, Safari and Opera.
When I’m running it locally it works fine with any browser, including IE, so I guess it’s got something to do with the permissions on the HostGator server. Beats me why it’s only happening with IE though.
I’ve added some logging to the update.php file and apparently it can’t be called by the code (getting the 403) but only when using Internet Explorer. Weird.
Ok, just in case anyone else will have this problem, I will post the solution here.
It was actually quite simple, all I had to do was change the TransactionMode from GET to POST and sha-wam it was working.
Why I got this error and why only with IE is however still a mystery to me.