PHP Post-Redirect-Get failing in some specific Android devices -


i referred article(reference link provided @ bottom) implement post-redirect-get(prg) pattern(implementation link provided @ bottom) in php. works in of devices; does not work in specific devices. found after users reported unable register new account(i have used same implementation of prg there). issue limited specific android devices , not yet reported on other platforms.

the users face issue facing in all browsers in device.

initially, suspected issue related php session , thoroughly tested sessions in devices. however, working fine(session testing implementation link provided in prg implementation link).

i don't have device has issue , unable reproduce issue myself. tried debugging of friends faced issue, still able reproduce indirectly.

it possible you might unable reproduce issue well, in case, please have @ code , see if wrong.

out of 2000 users, 30-50 users faced issue.

list of devices of of users reported issue-

  • moto z play, android 7.0
  • moto m, android 7.0
  • xiaomi mi 4i, android 5.0.2
  • oneplus 5, android 7.0

note- haven't tested issue in multiple devices of above mentioned models, is, might possible same prg implementation works in oneplus 5 models, except 1 in issue reported.

reference prg pattern implementation-
http://wordsideasandthings.blogspot.in/2013/04/post-redirect-get-pattern-in-php.html
implementation demonstrates issue(in specific devices only)-
http://witch-hunt-crewmemb.000webhostapp.com/stackoverflow/prg/echochamber.php

prg implementation-

<?php session_start();  $echoedshout = "";  if(count($_post) > 0) {     $_session['shout'] = $_post['shout'];      header("http/1.1 303 see other");     header("location: http://witch-hunt-crewmemb.000webhostapp.com/stackoverflow/prg/echochamber.php");     die(); } else if (isset($_session['shout'])){     $echoedshout = $_session['shout'];      /*         put database-affecting code here.     */      session_unset();     session_destroy(); } ?> 

session testing implementation-

<?php session_start(); if(isset($_session['y'])){     $x=$_session['y'];     unset($_session['y']); } else{     $_session['y']='b';     $x='a'; } echo $x; ?> 


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -