PHP & 406 Not Acceptable

Reply

Join Date: Sep 2008
Posts: 1
Reputation: merianos is an unknown quantity at this point 
Solved Threads: 0
merianos merianos is offline Offline
Newbie Poster

PHP & 406 Not Acceptable

 
0
  #1
Jan 3rd, 2009
Hello all ! ! !

I have a litle problem with a script that I have create.

This script selecting from the database all the records (in total 2) and then print out a XML file.

I have enter this code to change the header to XML :

header('Content-type: application/xml; charset="utf-8"');

and then i print out hte records of the MySQL query :

  1. echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
  2.  
  3. echo "<languages>";
  4.  
  5. while($rows = @mysql_fetch_array($resLNGS, MYSQL_ASSOC))
  6. {
  7.  
  8. echo "<lngs>";
  9.  
  10. if((isset($_POST['lngs_id']) && strlen($_POST['lngs_id'])>0) && ($_POST['lngs_id'] == $rows['ID']))
  11. {
  12. echo "<id default=\"" . $rows['ID'] . "\">" . $rows['ID'] . "</id>";
  13. }
  14. else
  15. {
  16. echo "<id>" . $rows['ID'] . "</id>";
  17. }
  18. echo "<name>" . $rows['NAME'] . "</name>";
  19.  
  20. echo "</lngs>";
  21.  
  22. }
  23.  
  24. echo "</languages>";

That's all my code and then I'm getting from the server the following headers :

http://xx.x.xxx.xx/~babis08/CPanel/xml/languages.php

  1. POST /~babis08/CPanel/xml/languages.php HTTP/1.1
  2. Host: 62.1.216.81
  3. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; el; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5 FirePHP/0.2.1
  4. Accept: application/xml, text/xml, */*
  5. Accept-Language: el
  6. Accept-Encoding: gzip,deflate
  7. Accept-Charset: ISO-8859-7,utf-8;q=0.7,*;q=0.7
  8. Keep-Alive: 300
  9. Connection: keep-alive
  10. X-Requested-With: XMLHttpRequest
  11. Referer: <a rel="nofollow" class="t" href="http://xx.x.xxx.xx/~babis08/CPanel/prop" target="_blank">http://xx.x.xxx.xx/~babis08/CPanel/prop</a> ... insert.php
  12. Cookie: PHPSESSID=4181110c8e9c2f68d7f758030aa2bbe4
  13. Pragma: no-cache
  14. Cache-Control: no-cache
  15.  
  16. HTTP/1.x 406 Not Acceptable
  17. Date: Sat, 03 Jan 2009 08:22:17 GMT
  18. Server: Apache/2.2.10 (Unix) mod_ssl/2.2.10 OpenSSL/0.9.8b mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_perl/2.0.4 Perl/v5.8.8
  19. Content-Length: 599
  20. Keep-Alive: timeout=5, max=63
  21. Connection: Keep-Alive
  22. Content-Type: text/html; charset=iso-8859-1
  23.  

What can i do for ? ? ?

thanks a lot
Last edited by peter_budo; Jan 6th, 2009 at 1:55 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC