Control HTTP, RTMP & RTSP access through external PHP

I’m trying to control access to streams via an external PHP script that checks the user/pass for the correct privileges for each video but I can’t get it to work with Wowza. I don’t know JAVA programming but I was able to piece together the following code, but it doesn’t even run. I’ve tried running it as stand-alone JAVA and it works fine, but whenever I try to integrate it with Wowza, it dies out with:

ERROR server comment - server core failure: java.net.BindException: Address already in use: bind
java.net.BindException: Address already in use: bind
	at sun.nio.ch.Net.bind0(Native Method)
	at sun.nio.ch.Net.bind(Unknown Source)
	at sun.nio.ch.Net.bind(Unknown Source)
	at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
	at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
	at org.apache.mina.transport.socket.nio.SocketAcceptor.registerNew(Unknown Source)
	at org.apache.mina.transport.socket.nio.SocketAcceptor.access$1100(Unknown Source)
	at org.apache.mina.transport.socket.nio.SocketAcceptor$Worker.run(Unknown Source)
	at org.apache.mina.util.NamePreservingRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

Here is the code I have in the Wowza IDE:

The error you show means Wowza is already running. If the service is running, turn it off first. Or Wowza is running in stand-alone mode (/bin/startup.bat) shut that down before running Wowza in the IDE.

Richard

Take a look at these examples:

https://www.wowza.com/docs/how-to-do-user-authentication-for-flash-rtmp-client-using-jdbc-connection-to-mysql-database

https://www.wowza.com/docs/how-to-do-file-based-rtmp-authentication-with-url-query-strings-onconnectauthenticate2

Richard