Re[2]: [Xitami] Not seeing FORM POST fields

Neville Franks xitami@lists.xitami.org
Sun, 19 Aug 2001 08:33:43 +1000


Hello Thomas,

Sunday, August 19, 2001, 7:48:26 AM, you wrote:

TJH> At 07:17 AM 8/19/01 +1000, Neville Franks writeth:
>>I've installed Xitami and PHP4 on a Windows 2000 box and everything is
>>working fine except I can't see an FORM POST fields in the PHP script.
>>ie. When Submit is pressed the field values are all empty when the PHP
>>script processes it.

TJH> I never liked this about PHP (or at least I could never figure it out), but
TJH> the HTTP_POST_VARS hash is a bit strange.  Basically, your variables are
TJH> converted from the hash into normal variables:

TJH> phpinfo() shows something like this -
TJH> HTTP_POST_VARS["MyVariable"] = MyValue
TJH> MyVariable = MyValue

TJH> Referencing it like this doesn't work as expected:
TJH> if ($HTTP_POST_VARS["MyVariable"] == "MyValue")
TJH> {
TJH> }

TJH> However, referencing it like this does:
TJH> if ($MyVariable == "MyValue")
TJH> {
TJH> }

The PHP code I'm try to get working is w-agora www.w-agora.net and it
uses the if ($MyVariable == "MyValue")syntax. As you probably know
this is controlled by: register_globals=On in php.ini

I also tried: if (isSet($HTTP_POST_VARS["do_setup"])) which doesn't
work.

There was an earlier post to the mail list by "Richard Blazek"
<rwb@altavista.net> who indicated he had this problem on W2K, but W98
worked fine. I've not tried W98 yet.

I am an absolute newbie at PHP however, but I'm reasonably sure I have
everything setup correctly.

>>I've searched the archives and have seen a few other people mention
>>this problem but haven't seen any solutions posted. I've waisted best
>>part of a day on this and it is driving me nuts. Xitami looks good,
>>but if I can't get this resolved quickly I guess I'll move to Apache.

TJH> Apache is horribly unstable under Windows with PHP (especially with
TJH> mod-ssl).  I wasted an entire week re-building that piece of junk from
TJH> scratch using every option possible (I personally would write my own web
TJH> server if I had a choice between that and Apache - it's a good thing Xitami
TJH> exists).  Just thought you would like a heads-up.

I'm only using this on a PC for development. If its a little flaky I
can cope. The real thing runs on my Web server which is a Unix box
running Apache. 

>>On another note why haven't the Archived Mailing lists been updated
>>for many months?

TJH> Check the headers of this post for links to the new archives.

Can't work out what you mean here?

TJH> Hope this helps!

Nope, but I greatly appreciate your reply none the less.


TJH>            Thomas J. Hruska -- shinelight@crosswinds.net
TJH> Shining Light Productions -- "Meeting the needs of fellow programmers"
TJH>                   http://www.shininglightpro.com/

TJH> --
TJH> Xitami Users Mailing List -- For Xitami support
TJH> To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami



-- 
Best Regards,
  Neville Franks, Author of ED for Windows - the programmers editor, an indispensable tool for great software development.
  http://www.getsoft.com Version 4.01 just released, with a C++ Class View that actually works.
  mailto:readonly@getsoft.com