Cron / Calendar Integration

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.
ziopippo
Posts: 18
Joined: Tue Sep 05, 2006 10:43 am
Location: Italy

Post by ziopippo »

Hi,

My distro is Ubuntu 6.10 Edgy Eft with PHP Version 5.1.6-1ubuntu2.1, and MySql version 5.0.24a-9 and Apache version 2.0.55-4ubuntu4.

ZM runs in \var\www\zm\ directory, calendar is copy to \var\www\ and calendar config in to \var\www\config\.
The \var\www\html\ directory is empty.

The \var\www\config\ and \var\www\config\lang have 755 permision and the files into this directory have 644 permission.

I've read your ReadMe.txt but i haven't understood this:

4. : Then you need to copy the file dvos.cron to your cron.d directory, on FC4 based systems that will be in /etc/cron.d/
The next thing you need to do is to edit the cron job with Webmin (or your favorite cron job editor) and change the
path to where you put the php scripts in your apache root, you may also need to change the path to the php command.
The one in the job is for FC4.


Thanks.

Ettore
________
XR125L
Last edited by ziopippo on Sun Feb 13, 2011 12:40 pm, edited 1 time in total.
User avatar
voronwe
Posts: 193
Joined: Tue Jan 18, 2005 12:40 am
Location: Copenhagen Denmark

Post by voronwe »

Hi ziopippo

From what i can see, there might be a problem with where you have installed the frontend / ZM, i would suspect that even on an Ubuntu distro apache is configured to look inside the /var/www/html directory to work proberly, but that you can see in the Apache config file.

The dvos.cron file is located in the tgz file you have downloaded with the frontend, the file is the one that tells cron how often and what the command is for the calendar function to work.
Best Regards
Tom Stage
ziopippo
Posts: 18
Joined: Tue Sep 05, 2006 10:43 am
Location: Italy

Post by ziopippo »

I've check the cinfig file, apache is configured to look inside the /var/www directory. I've the same error. :(
How i must see language permissions?

I know how are located the file dvos.cron, but i don't haven understood this:

"The next thing you need to do is to edit the cron job with Webmin (or your favorite cron job editor) and change the
path to where you put the php scripts in your apache root, you may also need to change the path to the php command.
The one in the job is for FC4." ;)

Thanks.

Ettore.
________
CHRYSLER SEBRING (SEDAN) HISTORY
Last edited by ziopippo on Sun Feb 13, 2011 12:40 pm, edited 1 time in total.
User avatar
voronwe
Posts: 193
Joined: Tue Jan 18, 2005 12:40 am
Location: Copenhagen Denmark

Post by voronwe »

Hi ziopippo

Ok so the Apache Config is correct, then it should work, an installation on a FC4 system would look like this.

/var/www/html/

This is where the frontend files will be located, then ZoneMinder is installed in a subdirectory named zm, that will make a structure that looks like this.

/var/www/html/ The Location of the frontend files and directorys.
/var/www/html/zm/ The location of the ZoneMinder Files and directorys.


Normally if the files are owned by the webuser there will be no problems at all, or if the permissions on the whole structure below /var/www/html are 755.

So in your case i would try to change the owner of the files to the webuser on the whole structure below /var/www/.

I hope this will resolve your problem.
Best Regards
Tom Stage
ziopippo
Posts: 18
Joined: Tue Sep 05, 2006 10:43 am
Location: Italy

Post by ziopippo »

I think to have resolved some problems. I have only had to cancel the cookie in my browser and change the default language into dvos database (User_Language at the admin table) :wink:
Now i have only problems to show my logs. :? I have already modified the path into config.php file. :wink:

This is my error messages:

Code: Select all

Warning: file(./logs/messages): failed to open stream: No such file or directory in /var/www/config/dvos.inc.php on line 269
some errors occurs: Array ( [0] => your path [./logs] doesn't exists )
________
Sell vaporizers
Last edited by ziopippo on Sun Feb 13, 2011 12:40 pm, edited 1 time in total.
User avatar
voronwe
Posts: 193
Joined: Tue Jan 18, 2005 12:40 am
Location: Copenhagen Denmark

Post by voronwe »

Hi ziopippo

Hmm is the messages file the only one with the error or is it the only one you have tryed to open ??
Best Regards
Tom Stage
ziopippo
Posts: 18
Joined: Tue Sep 05, 2006 10:43 am
Location: Italy

Post by ziopippo »

All the log button give me error message.

This is my config.php file whith my configuration:

Code: Select all

$cron_file = '/etc/cron.d/dvos.cron';// Path to the cron job file in your cron.d directory
// $cron_file = './dvos.cron';// This line is used for programming purpuses only edit the above instead
$cmd_zmpkg = "perl -T /usr/local/bin/zmpkg.pl '"; // Remember to change this to the path for your zmpkg.pl file on your system
$viewlogs = true; // If log viewing is active or not
$systemlogs = true; // This is used to tell if you want to be able to view the messages / access_log / error_log
$webuser = 'apache'; // The user that apache runs under, on Fedora Core the default is apache
$logroot = '/var/log/'; // Path to the main log directory
$zmlogfiles = '/tmp/'; // Path to the ZoneMinder Logfiles
$httpdlogfiles = '/var/log/apache2/'; // Path to the Apache Logfiles
________
Buy Air One Vaporizer
Last edited by ziopippo on Sun Feb 13, 2011 12:41 pm, edited 1 time in total.
User avatar
voronwe
Posts: 193
Joined: Tue Jan 18, 2005 12:40 am
Location: Copenhagen Denmark

Post by voronwe »

Hi ziopippo

Ok i would suspect that you have a problem with Sudo changes that is discribed in section 7 in the ReadMe.txt file.

The changes are needed to allow the webuser to copy, remove and chown the files in the temporary log file directory, the way this log function works is that we take a copy off the original log file, to make sure that we are not messing up the system while we read the files for the displaying in the web interface, and unless we give the user the right access in the sudo config file in /etc/sudoers it wont work, this is on an FC4 system done thru the command visudo.

In short follow the instructions in the ReadMe.txt file section 7.
Best Regards
Tom Stage
ziopippo
Posts: 18
Joined: Tue Sep 05, 2006 10:43 am
Location: Italy

Post by ziopippo »

Can you post your config file in /etc/sudoers? Also in ubuntu distro i have command visudo. :)
Thank's.
________
Kawasaki Zg1000
Last edited by ziopippo on Sun Feb 13, 2011 12:41 pm, edited 1 time in total.
User avatar
voronwe
Posts: 193
Joined: Tue Jan 18, 2005 12:40 am
Location: Copenhagen Denmark

Post by voronwe »

Hi ziopippo

Mine looks like this.

Code: Select all

apache ALL= (root) NOPASSWD: /bin/cp, /bin/chown, /bin/rm 
Best Regards
Tom Stage
ziopippo
Posts: 18
Joined: Tue Sep 05, 2006 10:43 am
Location: Italy

Post by ziopippo »

This is mine:

Code: Select all

  GNU nano 1.3.12           File: /etc/sudoers.tmp                              

# Defaults

Defaults        !lecture,tty_tickets,!fqdn

# User privilege specification
root    ALL=(ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

#Apache permissions
apache ALL= (root) NOPASSWD: /bin/cp, /bin/chown, /bin/rm

I have also try with this

Code: Select all

#Apache permissions
apache ALL= (root) NOPASSWD: /bin/cp, /bin/chown, /bin/rm, /var/log/, /tmp/, /var/log/apache2/
but the error messages don't change. :?
________
FERRARI 348 SPECIFICATIONS
Last edited by ziopippo on Sun Feb 13, 2011 12:41 pm, edited 1 time in total.
User avatar
voronwe
Posts: 193
Joined: Tue Jan 18, 2005 12:40 am
Location: Copenhagen Denmark

Post by voronwe »

Hi ziopippo

Hmm now iam blank, i have no idea why it wont work on your system, but then again all my testing is done on a FC4 system, but then again i would not think that it would make a diffrence.

I need to think about this one.
Best Regards
Tom Stage
ziopippo
Posts: 18
Joined: Tue Sep 05, 2006 10:43 am
Location: Italy

Post by ziopippo »

Ok thank's a lot.
________
Vapir No2
Last edited by ziopippo on Sun Feb 13, 2011 12:41 pm, edited 1 time in total.
User avatar
voronwe
Posts: 193
Joined: Tue Jan 18, 2005 12:40 am
Location: Copenhagen Denmark

Post by voronwe »

Hi ziopippo

I have found the following on the net, and it would seem that ubuntu have a more strict policy with Sodu than FC4 have.

http://www.psychocats.net/ubuntu/sudo

From what i can see on this page only the users who are in the admin group may use the Sudo command, so in my eyes there are 2 ways u can solve the problem.

1. Have the web user be a member of the admin group (should only be done for testing purpose), so start out with this, and see if it solves your problem.

2. Make an entry where the webuser group may allso use the sudo command, on this isue i cannot offer any help other than what is listed on the web site i linked to.
Best Regards
Tom Stage
ziopippo
Posts: 18
Joined: Tue Sep 05, 2006 10:43 am
Location: Italy

Post by ziopippo »

Ok thanks anyway :wink:
________
How To Roll A Joint
Last edited by ziopippo on Sun Feb 13, 2011 12:41 pm, edited 1 time in total.
Post Reply