Solved

Wordpress site "looses" $_GET

Posted on 2016-10-14
11
35 Views
Last Modified: 2016-10-21
I have two WordPress sites : one is misbehaving.
When I run the site locally on my dev machine with a hosts entry pointing the domain to the local version my payment gateway module works perfectly.
When I run the same site from its server (using the same domain name) - the $_GET array is empty - despite there being parameters in the URL.
Everything for the two installations is identical
This script works as expected - $_GET shows parameters

<pre>
<?php
print_r($_GET);
?>
</pre>

Open in new window


If I place the following code into the site
file_put_contents("getlog.log", print_r($_GET, true), FILE_APPEND);

Open in new window

On my local machine - it shows values
On hosting server - empty

Any known issues where some settings could result in WordPress not seeing the $_GET?
0
Comment
Question by:Julian Hansen
  • 7
  • 2
11 Comments
 
LVL 108

Expert Comment

by:Ray Paseur
ID: 41843680
0
 
LVL 52

Author Comment

by:Julian Hansen
ID: 41843707
Both sites use URL rewriting - .htaccess redirects everything to index.php

Just the one site (local) sees the $_GET the other looses it.

The only difference between the two is the server the site is hosted on.

Going to compare a phpinfo dump of the two sites to see if there is anything obvious there but thought I would put it out there in case someone has come across this one before.
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 41843862
For 'file_put_contents', you do have to have write permissions.  http://php.net/manual/en/function.file-put-contents.php
1
 
LVL 52

Author Comment

by:Julian Hansen
ID: 41843911
Yes - the file is being written just has
Array 
(
)

Open in new window

Whereas on the other site I get
Array
(
    [crypt] => @5fa02dd9f9018c3648c68daf12bb786a09741a6c9fd13f885c49dd7899412b3b832c4ff312edd0b96320bbc281ae64725517fca99c8b72a349f362ef381052e1870fcdf33cc6584a5ddc4c7c56d3005e205a1698308ad3eddb7d88490264ec66a30ca7c815b9f84611148e19eaaf0d373e3651182ffcfffcbda8ae147883b93712b3e59fb87b61ae265c7a8badf8f354ea01bcbca8a8f1e4fe5ef782a69494dd22d90e0af012e24123541b9a523dbb4b33a5576cb903d869bb600e04a1a88cbcba3b193dc511e809cca4fc15bbe1239496918938d0fc6b0a60b121216ae3665275b5daf5d66aedd565fd07b7d3affd0086ffa70bd755e8da9c48d3166e4248ea23b56544d3424c81d768645d2049be95a5a59514629a5641e3c88fca95a95531fc6760add04b7ecc83a7c19c92840cc46ac8f76601338b86781a2d6798bf3c0214b4b9c5e1eafe654974d8adb5346105c4e8d921278428b3a1d5210ce0add6ca08fe665f9618a417e395b4e3040dab2bd491624e4c4669a6b1819ac7851b90874888ebcdf1718d77ac1d0c09d883d24f
)

Open in new window

URL in both cases is identical - same domain same parameters - crypt value changes but that is because it is a different transaction.
0
 
LVL 52

Author Comment

by:Julian Hansen
ID: 41844945
Just moved the site to another hosting provider (1and1) - problem went away - so it looks like Crazy Domains is doing something odd on their side.

1and1 is where we are trying to move from
CrazyDomains was selected as an option

Any good recommendations for a hosting provider for a primarily UK based online business?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 500 total points
ID: 41844969
The standard recommendations would be those that support the PHP community, some of these offer hosting.
http://php.net/thanks.php

I've had good experiences with ChiHost, LiquidWeb, and HostGator.  I've had sub-optimal experiences with GoDaddy and 1and1.  Never heard of CrazyDomains before, but the name alone is enough to discourage.

BlueHost is well thought-of, but I have no direct experience with them.  Same with DreamHost.

Any cloud service is worth considering.  AWS might be a good answer.
0
 
LVL 52

Author Comment

by:Julian Hansen
ID: 41844984
Thanks Ray,

A smaller list to deal with - I will pass it on as I am not in the driving seat on this one.
0
 
LVL 52

Author Comment

by:Julian Hansen
ID: 41846214
Meant to give Ray points but seems it assigned him 0 - need to change that
0
 
LVL 52

Accepted Solution

by:
Julian Hansen earned 0 total points
ID: 41846215
Found the problem - ISP INI file did not allow for long requests
SuHoShin was the culprit - max_value_length was not long enough to accommodate the return
suhosin.simulation = On 
suhosin.post.max_vars = 4096 
suhosin.request.max_vars = 4096 
suhosin.get.max_value_length = 4096
suhosin.session.encrypt = Off 

Open in new window

0
 
LVL 52

Author Closing Comment

by:Julian Hansen
ID: 41853475
The actual solution to the problem was my post.

However, having resolved to move to a different ISP Ray provided good advice on where to go.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now