Note that there are some explanatory texts on larger screens.

plurals
  1. PO500 internal server error on iphone app php web services
    primarykey
    data
    text
    <p>We've iphone and android apps which are sharing the same php web services. We found the 500 internal server errors on several places on the iphone application.</p> <p>When we trying to access a web service for the very first time it gives the 500 error. If I tried again at the same time its working without the error. But if I try to access after around 10 minutes later, it'll give the 500 error again.</p> <p>FYI: We checked the DB connections and they've closed properly.</p> <p>Below is an sample service script which is giving the error.</p> <pre><code>&lt;?php include('JSON.php'); include 'Connection.php'; $handle = fopen('php://input','r'); $jsonInput = fgets($handle); $decoded = json_decode($jsonInput,true); $postData = file_get_contents("php://input"); $postData = str_replace('&amp;quot;', '"', $postData); $post = json_decode($postData,true); $email = $post['Email']; $password = $post['Password']; $sqlstr = mysql_query("SELECT admin_id, CONCAT(`first_name`, ' ', `last_name`) AS admin_name FROM admin where email='".$email."' AND password='".$password."'"); $ages = array(); if (mysql_numrows($sqlstr) != 0) { $row = mysql_fetch_array($sqlstr); $ages [0] = array("output"=&gt;"Success", "userid"=&gt;$row['admin_id'], "username"=&gt;$row['admin_name']); } else{ $ages [0] = array("output"=&gt;"Failed"); } echo json_encode($ages); mysql_close($link); ?&gt; </code></pre> <p>I'm not sure whether this is something like connection timeout or not.</p> <p><strong>Can it be a error on iphone app?</strong><br> <strong>or php web services?</strong><br> <strong>or the server side error?</strong></p> <p>We are checking for this more than a week and still unable to find the issue.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload