SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Guru
    Join Date
    Dec 2001
    Location
    San Diego, CA
    Posts
    617
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Certain text causes $_POST to disappear

    I use the same code that I have used on every single site I've developed. However, for this one site (music reviews), anytime they include the text "CD sometext", it causes the POST variable to act as if it didn't exist. If they use "CD/DVD", it's fine. "CD." (at the end of a sentence) then it's fine. Its just any time they input " CD " with spaces around it.

    I've tested this by doing this in the code:

    Code:
    print_r($_POST);
    Anytime "CD sometext" is in one of the POST variables, nothing gets displayed. Simply take out the "CD" and it works with no problems.

    PHP 4.3.10

  2. #2
    Keep it simple, stupid! bokehman's Avatar
    Join Date
    Jul 2005
    Posts
    1,935
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is either a wind-up or there is another force in play.

  3. #3
    SitePoint Guru
    Join Date
    Dec 2001
    Location
    San Diego, CA
    Posts
    617
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I turned debugging as high as possible - it didn't cause any PHP errors. I imagine this has something to do with the CMS I created.

  4. #4
    Keep it simple, stupid! bokehman's Avatar
    Join Date
    Jul 2005
    Posts
    1,935
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Change this print_r($_POST); to var_dump($_POST);

  5. #5
    SitePoint Guru
    Join Date
    Dec 2001
    Location
    San Diego, CA
    Posts
    617
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    After a little more testing, it looks like it is causing a 404 error. It could possibly be the host doing some kind of filtering on POST variables to prevent attacks maybe?

  6. #6
    SitePoint Guru
    Join Date
    Dec 2001
    Location
    San Diego, CA
    Posts
    617
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK, that's what it is - a horrible hosting setup. Any time a POST var has a unix command in it, "rm", "cd", "ls", etc it poops out.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •