mirror of
https://github.com/ushahidi/SMSSync.git
synced 2026-04-25 15:55:57 +03:00
[GH-ISSUE #147] fail to get data through http post #112
Labels
No labels
Bug report
Code improvement
Concern
Feature request
Feature request
Good first issue to work on
In progress
Needs info
Question
Ready
Translation
User Experience
User Experience
Website
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SMSSync#112
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @emollusion on GitHub (Mar 3, 2014).
Original GitHub issue: https://github.com/ushahidi/SMSSync/issues/147
I have been working back and forth with the log in smssync for a while now but seems to get stuck at the same place.
I cant get any data when using post.
Example of line:
if(isset($_POST['secret'])){$secret = $_POST['secret'];}
And in the smssync config it has the same spelling, use of POST and JSON.
PHP error is undefined variable, and in the JSON output error message is 'no secret'.
I am lost...
Phone is Fairphone 1, android 4.2.2
Smssync is latest fr play store.
Server is Lighttp and php under android, so running the server locally on the phone.
Smssync still needs to be connected to the internet to try to sync locally, which is sad but not really a problem.
Any help?
@eyedol commented on GitHub (Mar 3, 2014):
On the server side, the way you're getting the post value is wrong. It should be
if(isset($_POST['secret'])){$secret = $_POST['secret'];}SMSSync doesn't need to be connected to the internet to access the local web service. It has to be on the same network as the local web service.
@emollusion commented on GitHub (Mar 3, 2014):
I might have done to much programming last few nights but I can't see any diffrence between the two lines.
And smssync appears to need a dataconnwction, the log says No Active Data Connection while connecting to the local server without data connection (wan).
@eyedol commented on GitHub (Mar 4, 2014):
@markusm there is difference between
if(isset($_POST['secret'])){$secret = $_POST['secret'];}andif(isset($POST['secret'])){$secret = $POST['secret'];}Look at the two carefully.You don't need internet to post locally.
@emollusion commented on GitHub (Mar 4, 2014):
Ok. I see the difference now.
But according to both the manual on smssync and php.net
http://smssync.ushahidi.com/developers/
http://www.php.net/manual/en/reserved.variables.post.php
To get form data through post method use &_POST.
In other words, your tip didnt work.
And yes, I need wan connection for smssync to sync. Otherwise the log doesnt say anything, and the app doesnt even give me fail or success.
@emollusion commented on GitHub (Mar 6, 2014):
Why did this get closed?
@kizomanizo commented on GitHub (Sep 18, 2018):
You were quite a bully
@jesseperexc commented on GitHub (Sep 18, 2018):
What
On Sep 18, 2018 1:32 AM, "Bwana Kizito" notifications@github.com wrote:
@kizomanizo commented on GitHub (Sep 18, 2018):
I commented on a 4 year old thread. Landed on it as I was looking on a proper JSON schema to test get_messace method.