• Hello,

    I have a site on 4.0.1 using php 5.2 and the site works wonderfully. When I migrate the same site to my new hosting plan which is on php 5.4 I have an issue with a form where it shows a blank white page after submitting a value of a full url (https://www.test.com). If the form doesn’t have a url in a field it submits perfectly.

    I have all plugins turned off and made sure all field names are completely custom as many other posts have mentioned. It is a form that is in a page template that is set to submit to another page template to parse the data.

    Also in testing I have set the form to submit to a completely separate custom page I created that is one line of <?php print_r($_POST); ?>. When I submit the form with a url in it I get a 404 page not found, and when it is sent without a url value the page prints fine.

    I have exhausted Google, this forum and many other sites and nothing has worked for me. I am lost at what could be causing this. Any help or pointers would be a life saver at this point. Thank you!

Viewing 11 replies - 1 through 11 (of 11 total)
  • sounds like the .php file in the action cannot be found if I understand correctly…

    Thread Starter astellhorn

    (@astellhorn)

    If I take the form down to one text input and put a value a “test” in it, the page submits fine. If I enter the text of “https://www.test.com&#8221; it shows me a blank white page. No errors on the server.

    Thread Starter astellhorn

    (@astellhorn)

    It seems to have something to do with submitting a url to a Page that is set to use a custom template.

    Thread Starter astellhorn

    (@astellhorn)

    But I’m thrown off because it works on the old host.

    figure it out? if not post the PHP code in the page template it is posting too..

    Thread Starter astellhorn

    (@astellhorn)

    Still no luck. I have striped down the page template to just:

    <? print_r($_POST);
    exit; ?>

    and I still get an empty post only when a value has https:// in it.

    Strange, you sure you have errors set to display in the config file? (WP_DEBUG set to true)

    Thread Starter astellhorn

    (@astellhorn)

    I am completely positive. Even changed my php settings to display errors. Godaddy did the same and could not get errors anywhere.

    I did do further testing last night, I’ll do my best to explain.

    test 1:
    I set up a test page outside of wordpress that I submit to the same custom Page and the $_POST works fine.

    test 2:
    I submit the form from a custom page template to the same custom Page and the $_POST is empty.

    and I assume this is basically what you template looks like?

    <?php get_header(); /* Template Name: MyTemplate */

    if(isset($_POST)) {
    print_r($_POST);
    }

    get_footer(); ?>

    That should work fine so I am not sure what is happening, be interesting to know what is causing it. Delete get_header() and see what happens

    Thread Starter astellhorn

    (@astellhorn)

    I have, i set it to only print out the $_POST and it still behaves the same. I’ve spent so much time searching and trying things, The only thing I cannot do is change the php version of the site that is working. That would be the definitive test to see if php version being different was the reason, but even then, I don’t see how that could be an issue.

    Got me stumpt.. at least you are at 5.4 now. WP is updated I guess. If you figure it out let us know..

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Form Submit $_POST empty when field value is a url’ is closed to new replies.