PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Paypal returning URL

  1. silverlight001
    Member

    Hi,

    Testing my user registration and paypal form when the paypal payment is completed it returns the user to an invalid URL - please note the :7080 - is this a gravity or paypal setting (I don't want it to redirect to a port)

    http://www.bhvs.org.uk:7080/membership?gf_paypal_return=aWRzPTF8MTcmaGFzaD1lMjljN2Q1YTQ2Y2RkMTdiY2FkYjgyMGRkOWFjNjE1MQ=&tx=3TR95976JX176973H&st=Completed&amt=0.01&cc=GBP&cm=17%7ceb165388f6d67ad93adacbc45a5ac68e&item_number=&sig=sJDIWeYPobm8AYVL2p8vfNCTQHsAVmcL0KKpBpf6bGdJfKWiL%2b9Y%2fSTK04Q%2fhpSMDmM1unzHFFip64sFM9TT20LtbEAdQ7c%2bDCmex7WG7djyUpvEpWO2e1MYFduLdulXs34ckVDY6giCUGWpk6c0TRN%2bvBa7itBgSv5NXWl2muI%3d

    Thanks for your help

    Posted 11 years ago on Monday September 3, 2012 | Permalink
  2. Looks like the port number is being added by the wp-content/plugins/gravityformspaypal/paypal.php plugin file, lines 2647 and 2648:

    [php]
            if ($_SERVER["SERVER_PORT"] != "80")
                $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];

    Is it possible your server does not return 80 for $_SERVER["SERVER_PORT"] ? That looks like the only way this should happen.

    This is the first report of this problem I have seen, so it's likely something unique to your server configuration.

    Can you create a page on the server to dump all the PHP Globals and $_SERVER variables, so we can take a look at the value of $_SERVER["SERVER_PORT"]? Thank you.

    Posted 11 years ago on Monday September 3, 2012 | Permalink
  3. silverlight001
    Member

    Hi,

    I've asked our server support to send the info you requested.

    The other thing is that if I remove the :7080 from the URL is then returns me to the page but the user is not registered so it appears that the User Reg + Paypal is not working config'd correctly

    Posted 11 years ago on Wednesday September 5, 2012 | Permalink
  4. I think we need to resolve the port issue first then work on getting everything to play nicely together. I will wait for the requested information.

    Posted 11 years ago on Thursday September 6, 2012 | Permalink
  5. silverlight001
    Member

    Hi Chris

    - what do we need to put on the page to dump all the PHP Globals and $_SERVER please?

    Thanks

    Posted 11 years ago on Thursday September 6, 2012 | Permalink
  6. You can add this to your page template file. It will print the $_SERVER variables as an HTML comment. View the source of the page to see them. We're looking for something like [SERVER_PORT] => 80.

    <?php
    $server_vars = print_r($_SERVER, true);
    echo "<!-- $server_vars -->";
    ?>

    Be sure to use the opening and closing <?php tags is you are not pasting the code into an existing PHP block.

    You can do the same for the $_GLOBALS, but that's a lot more data, and we need to know the PORT from the $_SERVER global first.

    Posted 11 years ago on Thursday September 6, 2012 | Permalink
  7. silverlight001
    Member

    Please find below:

    [SERVER_SOFTWARE] => Apache
    [REQUEST_URI] => /membership
    [PATH] => /usr/local/bin:/usr/bin:/bin
    [REDIRECT_STATUS] => 200
    [PP_CUSTOM_PHP_INI] => /var/www/vhosts/bhvs.org.uk/etc/php.ini
    [HTTP_HOST] => http://www.bhvs.org.uk
    [HTTP_X_REAL_IP] => 86.18.45.249
    [HTTP_X_FORWARDED_FOR] => 86.18.45.249
    [HTTP_X_ACCEL_INTERNAL] => /internal-nginx-static-location
    [HTTP_CONNECTION] => close
    [HTTP_CACHE_CONTROL] => max-age=0
    [HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.57 Safari/536.11
    [HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    [HTTP_REFERER] => http://www.bhvs.org.uk/
    [HTTP_ACCEPT_ENCODING] => gzip,deflate,sdch
    [HTTP_ACCEPT_LANGUAGE] => en-US,en;q=0.8
    [HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.3
    [HTTP_COOKIE] => BarExpanded=True; PHPSESSID=75b33e18b3a22e69423e8fd9e1c70342; locale=en-US; no_frames_root_page=%2Findex.php; phpMyAdmin=67107cdb2fd3c09b9542956dc9e3576884636238; psaContext=dashboard; wordpress_test_cookie=WP+Cookie+check; sforum_185d8cbf4cd5d8ac384f5cd5d7153305=titanium; wordpress_logged_in_185d8cbf4cd5d8ac384f5cd5d7153305=titanium%7C1347907827%7C15757b0af43af6470dc2b240bdfff7c3
    [HTTP_IF_MODIFIED_SINCE] => Fri, 07 Sep 2012 09:13:19 GMT
    [SERVER_NAME] => http://www.bhvs.org.uk
    [SERVER_ADDR] => 127.0.0.1
    [SERVER_PORT] => 7080
    [REMOTE_ADDR] => 86.18.45.249
    [DOCUMENT_ROOT] => /var/www/vhosts/bhvs.org.uk/httpdocs
    [SERVER_ADMIN] => eddie.mcknight@nshi.co.uk
    [SCRIPT_FILENAME] => /var/www/vhosts/bhvs.org.uk/httpdocs/index.php
    [REMOTE_PORT] => 42569
    [REDIRECT_URL] => /index.php
    [GATEWAY_INTERFACE] => CGI/1.1
    [SERVER_PROTOCOL] => HTTP/1.0
    [REQUEST_METHOD] => GET
    [QUERY_STRING] =>
    [SCRIPT_NAME] => /index.php
    [ORIG_SCRIPT_FILENAME] => /var/www/cgi-bin/cgi_wrapper/cgi_wrapper
    [ORIG_PATH_INFO] => /index.php
    [ORIG_PATH_TRANSLATED] => /var/www/vhosts/bhvs.org.uk/httpdocs/index.php
    [ORIG_SCRIPT_NAME] => /phppath/cgi_wrapper
    [PHP_SELF] => /index.php
    [REQUEST_TIME] => 1347009272
    )
    -->

    Posted 11 years ago on Friday September 7, 2012 | Permalink
  8. This is the problem right here:

    [SERVER_PORT] => 7080

    Can you check with your host to see why port 7080 is being set there? Because they are setting that, Gravity Forms is picking up on it and using it.

    Posted 11 years ago on Friday September 7, 2012 | Permalink
  9. silverlight001
    Member

    Hi Chris,

    Many thanks this appears to have resolved the issue

    Thanks

    Posted 11 years ago on Monday September 10, 2012 | Permalink
  10. What did you have to change to make this work?

    Posted 11 years ago on Tuesday September 11, 2012 | Permalink
  11. silverlight001
    Member

    There was an apache program called nginx using this port - I had the host turn the servi ce is off

    Posted 11 years ago on Wednesday September 12, 2012 | Permalink
  12. Very good. Thank you for the update.

    Posted 11 years ago on Thursday September 13, 2012 | Permalink

This topic has been resolved and has been closed to new replies.