Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Wordpress site "looses" $_GET

Posted on 2016-10-14
11
Medium Priority
?
58 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 2
11 Comments
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 41843680
0
 
LVL 59

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 84

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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 59

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 59

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
 
LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 2000 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 59

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 59

Author Comment

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

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 59

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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

715 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