hi morten,
if i coding with PHP use CURL command. i still get the following error. and my json in attached file.
By the way, i use apache v8 and DHIS2 v2.20
1.json (860 Bytes)
···
On Fri, Sep 4, 2015 at 3:58 PM, channara rin rin.channara@gmail.com wrote:
If i tried use test with -u … that is work fine. but if i add more function like -X POST -d -v… it doesn’t work…
On Fri, Sep 4, 2015 at 3:55 PM, Bob Jolliffe bobjolliffe@gmail.com wrote:
Hi Channara
I just had a look at your original mail and I see that the user admin was recognized so it means the curl option was ok but some issue with the password. My guess is that you have some strange characters in the password which are being expanded/interpreted by the shell.
Try quoting like:
-u “admin:xxxxx”
or
-u ‘admin:xxxxx’
On 4 September 2015 at 09:46, channara rin rin.channara@gmail.com wrote:
Hi Morten,
Hi tried test with user:password first. but still error.
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp
On Thu, Sep 3, 2015 at 11:43 PM, channara rin rin.channara@gmail.com wrote:
yes, it work too.
On Thu, Sep 3, 2015 at 6:45 PM, Morten Olav Hansen mortenoh@gmail.com wrote:
Try to test with something simpler
curl -u user:pass http://server/api/dataElements
And see if it works
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp
–
Morten
On Thu, Sep 3, 2015 at 5:23 PM, Knut Staring knutst@gmail.com wrote:
Channara, are you using GOW?
On Thu, Sep 3, 2015 at 12:08 PM, Morten Olav Hansen mortenoh@gmail.com wrote:
I have also seen weird issues on window versions of cURL where -u user:pass is required to be FIRST (mac/linux should be fine)
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp
Knut Staring
Dept. of Informatics, University of Oslo
Norway: +4791880522
Skype: knutstar
–
–
Morten
On Thu, Sep 3, 2015 at 5:07 PM, Bob Jolliffe bobjolliffe@gmail.com wrote:
Hi Channara
The man page for curl indicates that the format of the command is:
curl
Try moving your url to the end of the line, after the options. Also you might want to add “http://localhost.…”
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp
On 3 September 2015 at 11:01, channara rin rin.channara@gmail.com wrote:
Hi DHIS2 friends,
i tried use curl command to import tracker, but i got error.
can you help me what is problem?
***THIS IS COMMAND RUNNING:
***THIS IS CONSOLE in APACHE
Mailing list: https://launchpad.net/~dhis2-devs
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help : https://help.launchpad.net/ListHelp