RE: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-07 Thread gvarosky
Thanks again everyone for your assistance.

I found an un-related bug in the PHP bugs database here:
http://bugs.php.net/bug.php?id=18648 (which was for an earlier version than
4.3.4, which I was running)

and applied that band-aid patch to some of the places where this was
happening, and it seemed to fix the problem. I also upgraded to php 4.3.5
and have not seen the problem since.

Thanks again everyone!

Regards,
Geoff Varosky

-Original Message-
From: Ben Ramsey [mailto:[EMAIL PROTECTED]
Sent: Monday, April 05, 2004 3:58 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Weird variable issue encountered... help needed!


Just don't use register globals and use if ($_POST) instead of 
if($action=='post') so you don't have to include that ?action=post in 
the query string of your action.

Dvdmandt wrote:
 Accutually, I intented ?action=post, and if($action=='post'), just forgot
to
 add method=post.. :p
 

-- 
Regards,
  Ben Ramsey
  http://benramsey.com
  http://www.phpcommunity.org/wiki/People/BenRamsey

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread gvarosky
Thank you all for your ideas so far, however, I ahve gone through all my
code, and cannot seem to find the culprit.

I did a var dump, and also a dump of the REQUEST, GET, and POST variables,
and here is an example of what I am seeing (submitting test):

string(7) testiU

_REQUEST: Array
(
[search] = testiU
[PHPSESSID] = 3aeab8d47f4a4383104e20a98963f608
)

_GET: Array
(
)

_POST: Array
(
[search] = testiU

and also removing just about everything, and even dropping all mysql table
indexes that are referenced in the headers, and it still seems to happen...
and even when going to just the search posting the code, sometimes it will
come up as:

string(7) test

_REQUEST: Array
(
[search] = test
[PHPSESSID] = 3aeab8d47f4a4383104e20a98963f608
)

_GET: Array
(
)

_POST: Array
(
[search] = test
)

again, any help is greatly appreciated! Is it possible that the sessions are
being corrupted somehow by apache/php? (the session here is leftover from
when I had some header files included)

Regards,
Geoff Varosky
Senior Systems Engineer
Conversent Communications
Phone: 888-885-4437 ext. 248 (Mon-Wed, Fri)
Phone: 508-480-4523 (Thursdays only)
[EMAIL PROTECTED] 
PGP Public Key - http://gvarosky.conversent.net/gvarosky.txt

-Original Message-
From: Kim Steinhaug [mailto:[EMAIL PROTECTED]
Sent: Monday, April 05, 2004 6:04 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Weird variable issue encountered... help needed!


My first thought is that some dynamic code on this page has an error.
Typical like this :

input type=var value=?=$var?'
 ^^

Or maby a quote is missing? Looking at your examples it looks like there are
different parts of the HTML code comming into your var, which would
typically
be the case with broken quotes.  On the other hand it looked like there was
a
session ID aswell in there, but mainly I would run my code through the W3
validator just to double check.

You could also, just in case check that the get_magic_quotes_gpc hasnt
changed.
There could also be some quotes in some variables messing up your code
again.
Going from magic_quotes to no_magic can be annoying - I did that experience
with my database application some weeks ago...

Hope this is of any help.

-- 
-- 
Kim Steinhaug
--
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
--
www.steinhaug.com - www.easywebshop.no - www.webkitpro.com
--


[EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 This problem only seems to be happening on one of the virtual hosts on
this
 system, and I cannot seem to figure out just what it is.

 I have a simple form posting to search.php, with a text input field, with
a
 name of 'search'. And since this site is an internal site, register
globals
 are on, as we are not worried about anyone misuing any of the variables in
 use.

 In any even, this problem was noticed about a week ago, and it did not
exist
 before.

 After inputting some text into the search box, in this example, 'var',
sans
 quotes, and i hit submit... on the next page, I am just having it return
 just $search for testing, and, it comes back sporadically with: 'var', but
 most of the time, it comes back with:

 var^!#ndda/form

 or

 var4194092d098240928d12ed

 or

 var#c0c0c0

 or

 varput type=text

 etc. etc. it seems soemthing is somehow corrupting the variables, and I
 cannot seem to figure out what it might be. This has been working fine
until
 about the past week, and I cannot think of any major changes that may have
 happened within the past week that could have caused this... and as I
 mentioned above, it only seems to be this one virtual host. And ai also
 compared with backups of all of y included files at the beginnings and
ends
 of each script from before this problem started happening, and I can see
no
 major changes in any of them. And, this is happening around all php
scripts
 on the site...

 I am running 4.3.4, with apache 2, FreeBSD 4.8, and the data is all stored
 on a vinum partition. The server has been rebooted, a fresh install of
 php... tried setting output buffering on and flushing it at the end of the
 script(s), however, they seem to get hacked up when doing that, so I stay
 away from that band-aid fix...I am using sessions as well, as a few
scripts
 within the site store session variables... and also using SMBAuth to do
 authentication from our domain controller...

 I've been pulling out my hair for 4 days straight on this issue, and I am
 all out of ideas, any help would be *GREATLY* appreciated!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: 

Re: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread Jason Wong
On Monday 05 April 2004 22:46, [EMAIL PROTECTED] wrote:
 Thank you all for your ideas so far, however, I ahve gone through all my
 code, and cannot seem to find the culprit.

I believe it is a known bug with a particular old version of PHP, try using 
the latest.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Please forgive me if, in the heat of battle, I sometimes forget which
side I'm on.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread John W. Holmes
From: Jason Wong [EMAIL PROTECTED]

 On Monday 05 April 2004 22:46, [EMAIL PROTECTED] wrote:
  Thank you all for your ideas so far, however, I ahve gone through all my
  code, and cannot seem to find the culprit.

 I believe it is a known bug with a particular old version of PHP, try
using
 the latest.

It may be the old bug that dealt with a specific version of PHP and Apache2,
also. Either upgrading PHP or downgrading Apache to a version compatible
with PHP would solve the problem.

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread Blake Schroeder
One problem
wrong
form action=wierd-var-test.php?action=post
right
form action=wierd-var-test.php method=post
?action is a variable with a value of post
-Blake

DvDmanDT wrote:

Hmm.. Are there any PHP settings that only applies to that vhost? Can you
please try to run PHP as CGI few tries.. If the input is corrupt, that
_could_ be caused by the Apache2 which accutually is marked as
experimental... Basicly, this would get currupt?
(wierd-var-test.php)
?
if($action=='post')
var_dump($_REQUEST);
else
{
?
form action=wierd-var-test.php?action=post
input type=text name=var
input type=submit
/form
?
}
?
Or are there some other details I've missed?
 

--

+-+-++
| Blake Schroeder | Owner/Developer |lhwd.net|
+--(http://www.lhwd.net)+--/3174026352\--+
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread Blake Schroeder
Is this what your are trying to do?
?php
$var = $_POST['var'];
   

if($var)
var_dump($_REQUEST);
else
{
?
form action=index.php method=post
input type=text name=var
input type=submit
/form
?
  }
?
DvDmanDT wrote:

Hmm.. Are there any PHP settings that only applies to that vhost? Can you
please try to run PHP as CGI few tries.. If the input is corrupt, that
_could_ be caused by the Apache2 which accutually is marked as
experimental... Basicly, this would get currupt?
(wierd-var-test.php)
?
if($action=='post')
var_dump($_REQUEST);
else
{
?
form action=wierd-var-test.php?action=post
input type=text name=var
input type=submit
/form
?
}
?
Or are there some other details I've missed?
 

--

+-+-++
| Blake Schroeder | Owner/Developer |lhwd.net|
+--(http://www.lhwd.net)+--/3174026352\--+
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread Daniel Clark
I agree.   I believe the default FORM METHOD is GET.

 One problem
 wrong
 form action=wierd-var-test.php?action=post
 right
 form action=wierd-var-test.php method=post
 ?action is a variable with a value of post

 -Blake


 DvDmanDT wrote:

Hmm.. Are there any PHP settings that only applies to that vhost? Can you
please try to run PHP as CGI few tries.. If the input is corrupt, that
_could_ be caused by the Apache2 which accutually is marked as
experimental... Basicly, this would get currupt?

(wierd-var-test.php)
?
if($action=='post')
var_dump($_REQUEST);
else
{
?
form action=wierd-var-test.php?action=post
input type=text name=var
input type=submit
/form

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread DvDmanDT
Accutually, I intented ?action=post, and if($action=='post'), just forgot to
add method=post.. :p

-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
Blake Schroeder [EMAIL PROTECTED] skrev i meddelandet
news:[EMAIL PROTECTED]
 One problem
 wrong
 form action=wierd-var-test.php?action=post
 right
 form action=wierd-var-test.php method=post
 ?action is a variable with a value of post

 -Blake


 DvDmanDT wrote:

 Hmm.. Are there any PHP settings that only applies to that vhost? Can you
 please try to run PHP as CGI few tries.. If the input is corrupt, that
 _could_ be caused by the Apache2 which accutually is marked as
 experimental... Basicly, this would get currupt?
 
 (wierd-var-test.php)
 ?
 if($action=='post')
 var_dump($_REQUEST);
 else
 {
 ?
 form action=wierd-var-test.php?action=post
 input type=text name=var
 input type=submit
 /form
 ?
 }
 ?
 
 Or are there some other details I've missed?
 
 

 -- 

 +-+-++
 | Blake Schroeder | Owner/Developer |lhwd.net|
 +--(http://www.lhwd.net)+--/3174026352\--+

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Weird variable issue encountered... help needed!

2004-04-05 Thread Ben Ramsey
Just don't use register globals and use if ($_POST) instead of 
if($action=='post') so you don't have to include that ?action=post in 
the query string of your action.

Dvdmandt wrote:
Accutually, I intented ?action=post, and if($action=='post'), just forgot to
add method=post.. :p
--
Regards,
 Ben Ramsey
 http://benramsey.com
 http://www.phpcommunity.org/wiki/People/BenRamsey
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php