Debian/Mepis
Linux 2.4.22 Kernel
Pentium IV 2.6
786M ram
ZM 1.21.2
4 Cameras on a single bttv chip card
ffmpeg version 0.4.8
I have 2 web servers behind a firewall. One is running ZM, the other is not. The firewall listens on port 40 for traffic to ZM and forwards it to port 80 on the ZM server. Traffic hitting the firewall on port 80 is forwarded to port 80 on the non-ZM server.
http://xxx.xxx.xxx.xxx:40 forwarded to 192.168.0.101:80 on ZM web server.
http://xxx.xxx.xxx.xxx forwarded to 192.168.0.102:80 on non-ZM web server.
All the ZM functions worked. I could get the console, call up the events window etc, but I could not get any streaming video. When I tried to watch an event, I got the correct window but with a broken image icon.The url for the broken window showed as
http://xxx.xxx.xxx.xxx/cgi-bin/zmsmode= ... 1137384199. (The port number :40 is missing from url.)
I traced back to the function getStreamSrc in zm_funcs.php, where the url for the image is built. It showed:
$stream_src = "http://".$_SERVER['HTTP_HOST'].ZM_PATH_ZMS;
This parses to just as I have shown, the external IP address, without the port number.
My fix was to change the function slightly:
$parsedurl = parse_url( $_SERVER['HTTP_REFERER'] );
$stream_src="http://".$_SERVER['HTTP_HOST'].":".$parsedurl['port'].ZM_PATH_ZMS;
This may also apply to zm 1.22.x. It looks like the url is built in a similar fashion.
I don't know if this is due to thttpd, my particular setup, or is an actual bug.
thanks
tommy
Using non-standard port.
Thanks for the info. I'll take a look into this.
Normaly most people when they forward the port have the port number set the same on the server as the forwarded port ( Not that it's proper or anything, but it does work in this fashon and what I have done myself ) When I posted the code it was a quick fix to support ssl in streaming.
Thank you for letting us know and for the suggestion
If I can make it work in both cases then it will be added.
Cheers,
Corey
Normaly most people when they forward the port have the port number set the same on the server as the forwarded port ( Not that it's proper or anything, but it does work in this fashon and what I have done myself ) When I posted the code it was a quick fix to support ssl in streaming.
Thank you for letting us know and for the suggestion
If I can make it work in both cases then it will be added.
Cheers,
Corey