Page 4 of 4

Posted: Thu Feb 04, 2010 3:37 am
by stimburg
I'm in that IRC room but I just got the call that I have to be at work an hour earlier in the morning. So I need to get to bed very soon.

Thanks for your help and I will be on tomorrow if you are around.

Posted: Thu Feb 04, 2010 4:55 am
by cordel
Okay no problem. Thank you for the heads up :)

Posted: Thu Feb 04, 2010 1:31 pm
by Paranoid
The PATH_ZMS you have set is a relative path. You need to change it to:

Code: Select all

/cgi-bin/zms
to make it an absolute path.

It should then work.

NOTE: trying to fetch anything from 192.168.1.1/zm/cgi-bin/.. will still attempt to download the file because apache doesn't know its a cgi-bin. To change this behavior add the following below your current ScriptAlias definition:

Code: Select all

ScriptAlias /zm/cgi-bin/ "/var/www/htdocs/zm/cgi-bin/"

Posted: Thu Feb 04, 2010 3:33 pm
by stimburg
Paranoid wrote:The PATH_ZMS you have set is a relative path. You need to change it to:

Code: Select all

/cgi-bin/zms
to make it an absolute path.

It should then work.

NOTE: trying to fetch anything from 192.168.1.1/zm/cgi-bin/.. will still attempt to download the file because apache doesn't know its a cgi-bin. To change this behavior add the following below your current ScriptAlias definition:

Code: Select all

ScriptAlias /zm/cgi-bin/ "/var/www/htdocs/zm/cgi-bin/"

I had a quick moment to try this and an interesting thing just happened. It runs the test file that doesn't have the file extension now. It displays the hello world message without a problem, but It still wants to download the ZMS file.

Posted: Thu Feb 04, 2010 3:41 pm
by stimburg
Success!

I just changed it to the non-parsing header zms file because it wouldn't download and now video is streaming.

Thank you for your help.

Posted: Fri Feb 05, 2010 3:29 pm
by BlankMan
Ran into something similar due to apcupsd so I thought I'd post this, might help others.

When I first installed apcupsd years ago it created it's cgi files with the .cgi extension and I had to add the "AddHandler cgi-script .cgi" to my apache conf. that broke every cgi in the cgi-bin directory that didn't have the .cgi extension. My solution was to rename every cgi script with the .cgi extension. Time cosuming, had to change a lot of my code but it worked. Didn't like that solution.

When I installed ZM of course ZM's cgi scripts would not run and changing them to .cgi did not appear to be a solution and I didn't want to do that. So I attacked apache's conf instead. I config'd apache to now run any script in the cgi-bin directory and removed the AddHandler, this is the conf to do that:

Code: Select all

ScriptAlias /cgi-bin/ /srv/www/cgi-bin/
<Directory>
        AllowOverride None
        Options +ExecCGI -Includes
        Order allow,deny
        Allow from all
</Directory>