Page 1 of 1

ZM on Ubuntu Server --- Different Web Directory

Posted: Fri Jun 06, 2008 3:35 am
by amerdsp
Greetings,
Before one of my drives crashed, I had ZM 1.22 installed with 7 Axis IP cameras working well on a Fedora 5 machine. Now I am trying to use Ubuntu Server 8.04 with ZM 1.23.3. However, I want to change the location of the web directory to /web instead of /var/www which is what defaults after a Ububtu server install.

I followed the instructions on http://www.howtoforge.com/video_surveil ... der_ubuntu

Then I did the following:
- Moved zoneminders web directory to /web/zm from /var/www
- Created link from /var/www -> /web
- Edit the /etc/zm/apache.conf to reflect the directory change as well.

So /etc/zm/apache.conf looks like this:

Code: Select all

Alias /zm /var/www/zm

<Directory /var/www/zm>
  php_flag register_globals off
  Options Indexes FollowSymLinks
  <IfModule mod_dir.c>
    DirectoryIndex index.php
  </IfModule>
</Directory>
and the paths in zm.conf are

Code: Select all

# Path to ZoneMinder configuration (this file only at present)
ZM_PATH_CONF=/etc/zm

# Path to ZoneMinder web files
ZM_PATH_WEB=/var/www/zm

# Path to ZoneMinder cgi files
ZM_PATH_CGI=/usr/lib/cgi-bin
- Removed the links to image, temp, event directories and created real directories with the same name instead.
- changed the cgi-bin link to /usr/lib/cgi-bin

I also updated apaches sites-available with a new zm site pointing to

Now when I add a monitor in zm, the ip shows in orange. I click to see the still images from the camera, there is no image. Looking at apache's error log, I find the /var/www/favicon.ico file does not exist error. It should be /var/www/zm/favicon.ico

What am I missing, what other files do I need to change?

Thank you for all your help.

Amer[/code]

PS.

I just realized that when I delete a monitor I get the following warnings:
Warning: unlink(events/Register) [function.unlink]: No such file or directory in /web/zm/zm_actions.php on line 1222

Warning: Cannot modify header information - headers already sent by (output started at /web/zm/zm_actions.php:1222) in /web/zm/zm_funcs.php on line 90

Warning: Cannot modify header information - headers already sent by (output started at /web/zm/zm_actions.php:1222) in /web/zm/zm_funcs.php on line 91

Warning: Cannot modify header information - headers already sent by (output started at /web/zm/zm_actions.php:1222) in /web/zm/zm_funcs.php on line 92

Warning: Cannot modify header information - headers already sent by (output started at /web/zm/zm_actions.php:1222) in /web/zm/zm_funcs.php on line 93

Warning: Cannot modify header information - headers already sent by (output started at /web/zm/zm_actions.php:1222) in /web/zm/zm_funcs.php on line 94
and when I try to restart ZM I get
$Stopping ZoneMinder: Warning, overriding installed ./zm.conf file with local copy
followed by many other compilation fail errors

Re: ZM on Ubuntu Server --- Different Web Directory

Posted: Sun Jun 08, 2008 4:11 am
by PeterHoward
amerdsp wrote:Greetings,
Before one of my drives crashed, I had ZM 1.22 installed with 7 Axis IP cameras working well on a Fedora 5 machine. Now I am trying to use Ubuntu Server 8.04 with ZM 1.23.3. However, I want to change the location of the web directory to /web instead of /var/www which is what defaults after a Ububtu server install.

I followed the instructions on http://www.howtoforge.com/video_surveil ... der_ubuntu

Then I did the following:
- Moved zoneminders web directory to /web/zm from /var/www
- Created link from /var/www -> /web
- Edit the /etc/zm/apache.conf to reflect the directory change as well.
I'm not sure why you're bothering with the link - you can use the config below to point directly at /web.

So /etc/zm/apache.conf looks like this:

Code: Select all

Alias /zm /var/www/zm

<Directory /var/www/zm>
  php_flag register_globals off
  Options Indexes FollowSymLinks
  <IfModule mod_dir.c>
    DirectoryIndex index.php
  </IfModule>
</Directory>
Try

Code: Select all

Alias /zm /web/zm

<Directory /web/zm>
  php_flag register_globals off
  Options Indexes FollowSymLinks
  <IfModule mod_dir.c>
    DirectoryIndex index.php
  </IfModule>
</Directory>
and the paths in zm.conf are

Code: Select all

# Path to ZoneMinder configuration (this file only at present)
ZM_PATH_CONF=/etc/zm

# Path to ZoneMinder web files
ZM_PATH_WEB=/var/www/zm

# Path to ZoneMinder cgi files
ZM_PATH_CGI=/usr/lib/cgi-bin
Again, try:

Code: Select all

# Path to ZoneMinder configuration (this file only at present)
ZM_PATH_CONF=/etc/zm

# Path to ZoneMinder web files
ZM_PATH_WEB=/web/zm

# Path to ZoneMinder cgi files
ZM_PATH_CGI=/usr/lib/cgi-bin
- Removed the links to image, temp, event directories and created real directories with the same name instead.
- changed the cgi-bin link to /usr/lib/cgi-bin

I also updated apaches sites-available with a new zm site pointing to
Hmmm. Try removing the sites-available entry. IIRC the sites-available/site-enabled setup supersedes the use of the conf.d directory for sites; I've just stuck with the "old" way.
Now when I add a monitor in zm, the ip shows in orange. I click to see the still images from the camera, there is no image. Looking at apache's error log, I find the /var/www/favicon.ico file does not exist error. It should be /var/www/zm/favicon.ico

What am I missing, what other files do I need to change?

Thank you for all your help.

Amer

PS.

I just realized that when I delete a monitor I get the following warnings:
Warning: unlink(events/Register) [function.unlink]: No such file or directory in /web/zm/zm_actions.php on line 1222

Warning: Cannot modify header information - headers already sent by (output started at /web/zm/zm_actions.php:1222) in /web/zm/zm_funcs.php on line 90

Warning: Cannot modify header information - headers already sent by (output started at /web/zm/zm_actions.php:1222) in /web/zm/zm_funcs.php on line 91

Warning: Cannot modify header information - headers already sent by (output started at /web/zm/zm_actions.php:1222) in /web/zm/zm_funcs.php on line 92

Warning: Cannot modify header information - headers already sent by (output started at /web/zm/zm_actions.php:1222) in /web/zm/zm_funcs.php on line 93

Warning: Cannot modify header information - headers already sent by (output started at /web/zm/zm_actions.php:1222) in /web/zm/zm_funcs.php on line 94
and when I try to restart ZM I get
$Stopping ZoneMinder: Warning, overriding installed ./zm.conf file with local copy
followed by many other compilation fail errors
The obvious question: are those files under /web/zm ?

Fixed a cause for "overriding installed ./zm.conf"

Posted: Mon Jun 30, 2008 5:18 am
by Jared Oberhaus
While trying to get ZoneMinder going, I first tried the build from the Ubuntu 7.10 packages (via apt-get), but that didn't work. So instead I built from source.

I had it working for a while, until during one of the restarts I kept getting this:

Code: Select all

Starting ZoneMinder: Warning, overriding installed ./zm.conf file with local copy
DBI connect('database=zm;host=localhost','zmuser',...) failed: Access denied for user 'zmuser'@'localhost' (using password: YES) at /usr/local/share/perl/5.8.8/ZoneMinder/Config.pm line 89
Can't call method "prepare_cached" on an undefined value at /usr/local/share/perl/5.8.8/ZoneMinder/Config.pm line 91.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.8.8/ZoneMinder/Config.pm line 100.
Compilation failed in require at /usr/local/share/perl/5.8.8/ZoneMinder.pm line 33.
BEGIN failed--compilation aborted at /usr/local/share/perl/5.8.8/ZoneMinder.pm line 33.
Compilation failed in require at /usr/local/zm/bin/zmpkg.pl line 45.
BEGIN failed--compilation aborted at /usr/local/zm/bin/zmpkg.pl line 45.
failure

I finally figured out why: my old Ubuntu package still had /etc/zm/zm.conf, which was being read by /usr/local/share/perl/5.8.8/ZoneMinder/Config.pm. I removed that so that it had not choice but to read the /etc/zm/zm.conf that I now have configured to live somewhere else...

[/code]