Wowza Community

Get connectioncounts with PHP

Hello,

i have a problem with the Authorization for admin pages (/connectionscount, /serverinfo, etc.) in PHP and/or with standard curl in linux…

when i do:

curl -v "http://MyUser:MyPass@MyIP:8086/connectioncounts"

or

curl -v -u "MyUser:MyPass" "http://MyIP:8086/connectioncounts"

i just get ths back:

* About to connect() to MyIP port 8086 (#0)
*   Trying MyIP... connected
* Connected to MyIP (MyIP) port 8086 (#0)
* Server auth using Basic with user 'admin'
> GET /connectioncounts HTTP/1.1
> Authorization: Basic YWRtaW46a2lsbG9w
> User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.6
> Host: MyIP:8086
> Accept: */*
> 
< HTTP/1.1 401 Unauthorized
< WWW-Authenticate: Digest realm="Wowza Media Systems",  nonce="9bef1d28eebf8d1378824e65872XXXX", algorithm=MD5, qop="auth"
< Content-Type: text/html
< Connection: Keep-Alive
< Server: FlashCom/3.5.2
< Cache-Control: no-cache
< Content-Length: 0
< 
* Connection #0 to host MyIP left intact
* Closing connection #0

Its strange, username and password ist 100% OK, have tested it 100 times at browser… what im doing wrong that curl and php (file_get_contents/curl and fsockopen) can not auth in there?

Thanks

Best regards,

Chris

You probably need to change the AuthenticationMethod of the HTTPProvider in /conf/VHost.xml from “admin-digest” to “admin-basic”

Richard

Cool, welcome, thanks for update.

Richard

Thank You Richard, again :slight_smile:

It works!

Best regards,

Chris