Bharath-Salokye / simple-android-instant-messaging-application

Automatically exported from code.google.com/p/simple-android-instant-messaging-application
1 stars 0 forks source link

php file error #16

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

running index.php shows only 0 in output screen...

the mysql.class file shows "mysql_close() expects parameter 1" error..

thanks for ur previous helps..

Original issue reported on code.google.com by raviprab...@gmail.com on 21 May 2013 at 8:32

GoogleCodeExporter commented 8 years ago
yeah calling the index.php file with no parameters result will be "0"

caused by the first few lines in the index.php 
"if ($username == NULL || $password == NULL)     
{
    echo FAILED;
    exit;
}"

the "FAILED" is defined in the very beginning of the index.php like 
"define("FAILED", 0);"

so that means if your calling the index.php without the expectet parameters 
"username" OR "password" it would give you the output "0".

if you want to try the web service in a browser you have to call your url like
"http://<webservice-IP>/android_im/index.php?username=<Your 
Username>&password=<Your Password>&action=authenticateUser"

then the response header should look like:
"<data>
<user userKey='1' />
<friend  username = 'User1'  status='offline' IP='192.168.0.54' userKey = '1'/>
<friend  username = 'User2'  status='online' IP='192.168.0.55' userKey = '2'/>
</data>"

nice regards ;)

Original comment by d.pirngruber@gmail.com on 24 May 2013 at 6:28

GoogleCodeExporter commented 8 years ago
You can check the DB with the "Android_IM u1" Source package and the following 
url
http://<webservice-IP>/android_im/index.php?action=testWebAPI

Original comment by d.pirngruber@gmail.com on 29 Jun 2013 at 2:22