Jump to content


Photo

PHP 4.3/Apache 2.0.44/PDFLIB Problem with POST vs. Get


  • Please log in to reply
4 replies to this topic

#1 wmkconn

wmkconn
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 14 March 2003 - 09:52 PM

I have recently had a very strange problem with POST not working but GET working fine. I had developed some script for printing out Bill of Ladings. The first screen was a pull down where the user selects which BOL he wants to print then the subsequent page (after hitting submit) was the dynamically created PDF file. This worked great on Apache 1.3 but not on Apache 2.0 until I switched my Form submit from POST to GET after that, everything worked fine.

I even tried using the superglobal to access the POST vars but this didn\'t work. The rest of the script saw the variables fine (verified with DIE($variable);) However, none of the variables send via POST were accessible within the PDF page. Trust me, I tried everything and nothing worked until I changed the method to GET then everything worked fine.

What the heck could be the problem. I don\'t need to use POST here, but down the road I may need to on some other script.

Please do not send any newbie responses.

#2 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 15 March 2003 - 03:00 AM

- check in the httpd.conf configuration file for a restrictive POST setting
- crank up your php error reporting to see if gives you an error when you use POST
- check apache\'s error_log for anything regarding POST
- try $_POST[\'var_name\'] and $HTTP_POST_VARS[\'var_name\']

- were these compiled or pre-packaged?
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#3 wmkconn

wmkconn
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 15 March 2003 - 02:45 PM

I can access POST variables fine except within my PDF functions. I do not have problems when using Apache 1.3 but I do with Apache 2.0.44.

The weird thing is that any new variable that is dependent upon the POST variable will not work either although my IF conditional statements work fine based on the POST variable.

I did use the Superglobals as stated earlier (i.e. _POST and HTTP_POST_VARS) didn\'t change a thing.

Why would this only cause a problem withing the PDF functions and only when using APACHE 2.0

I have review my conf file but didn\'t see anything. Any suggestions on where to look?

All programs were precompiled Win32 binaries.

#4 effigy

effigy
  • Staff Alumni
  • Advanced Member
  • 3,600 posts
  • LocationIL

Posted 15 March 2003 - 03:42 PM

i suggest checking the bugs on www.apache.org or www.php.net ... search and see if something is reported, if not give them as much information as possible and see if they can assist you.
Regexp | Unicode Article | Letter Database
/\A(e)?((1)?ff(?:(?:ig)?y)?|f(?:ig)?)\z/

#5 ystrigathe

ystrigathe
  • Members
  • Pip
  • Newbie
  • 5 posts
  • LocationCologne / Germany

Posted 17 March 2003 - 05:48 PM

Netscape & Post worked, but on IE I had the same problems...

Thanks for this article - after hours of searching (and giving up all hope) - I got it.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users