PHP/Apache Error 500 issue with if statement
Using 'null' as one of the values of the select will lead to confusion. Is not the same a string with the value 'null' (as it may have the value 'Lorem Ipsum...' or 'John Doe') than null value.
Instead use any other value and things will be easy and clear. For instance:
<select name="reward" id="reward">
<option value="0">No Reward, save my points.</option>
<option value="1" data-type="percent" data-value="10">Option 1: 10% off [10 points]</option>
<option value="2" data-type="money" data-value="500">Option 2: £5.00 off [15 points]</option>
<option value="4" data-type="money" data-value="1500">Option 3: £15.00 off [45 points]</option>
<option value="5" data-type="percent" data-value="98">Option 4: 98% off [500 points]</option>
</select>
And then, from PHP you can check the value:
if ($_POST['reward'] != '0')
{
// your code here
}
Connection reset by peer after 8 minutes
Could be because you commented out FcgidBusyTimeout
thus falling back to the default value, 300 which is 5 minutes. More at https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidbusytimeout
Wordpress, Virtualmin & PHP7: mod_fcgid: error reading data from FastCGI server
This is a known issue with Jetpack's JSON API and PHP7 and it seems to be caused by opcache. Details on issue here.
I have disabled opcache by creating a .user.ini
file inside Wordpress's root dir containing the following line:opcache.enable=0
and no more errors, Wordpress Android App works :)
More on disabling opcache temporary here.
Related Topics
Highlight Multiple Keywords in Search
Best Way to Internationalize Simple PHP Website
How to Declare a Method Static and Nonstatic in PHP
Disable Csrf in Laravel for Specific Route
JSON Parse Error with Double Quotes
Basic Simplexml Working Example
Detecting File Upload Size on the Client Side
Walk Array Recursively and Print the Path of the Walk
Error 405 (Method Not Allowed) Laravel 5
How to Setup Docker + PHPstorm + Xdebug on Ubuntu 16.04
PHP Remove Elements from Associative Array
Can't Execute PHP Script Using PHP Exec
Rationale Behind Simplexmlelement's Handling of Text Values in Addchild and Addattribute
What Is the Postman-Token Header Attribute in Generated Code from Postman
PHP Type-Hinting to Primitive Values
How to Send a Bytearray (From Flash) and Some Form Data to PHP