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.
User avatar
voronwe
Posts: 193
Joined: Tue Jan 18, 2005 12:40 am
Location: Copenhagen Denmark

Post by voronwe »

Hi Teldin
Teldin wrote:Hi again Tom, I'm back from vacation so I can work on this more. the apache error logs of intrest state:

Directory index forbidden by rule: var/www/html/calendar/

and

Call to undefined function cal_days_in_month(): var/www/html/calendar/calendar.php line 56

Hopefully this will help...
Hmm the first error looks like an apache config error and should therefore be easy to fix, find the line in your httpd.conf where it says :

Code: Select all

DirectoryIndex
That should look like this :

Code: Select all

DirectoryIndex index.htm index.html index.php default.htm
The second error looks like a PHP error and that bugs me due to the fact that this function are in PHP 4 >= 4.1.0, PHP 5 so hmm what version of php are you running, and is the version compiled with the calendar functions, a quick way to check this is to make a php file containing the following command :

Code: Select all

phpinfo();
I can see from your posts that you are running from an install of the liveCD.
Best Regards
Tom Stage
User avatar
voronwe
Posts: 193
Joined: Tue Jan 18, 2005 12:40 am
Location: Copenhagen Denmark

Post by voronwe »

Hi Teldin
Teldin wrote: Call to undefined function cal_days_in_month(): var/www/html/calendar/calendar.php line 56

Hopefully this will help...
If you havent figured out the calendar problem yet there will be a fix for it in the next release, so dont bug your self to much atm.

I found a nice example for the php function in the php manual that seems to do the job just as well as the php function do and have tested it.

And to every one the next release will hopefully be ready at the start of next week.
Best Regards
Tom Stage
Teldin
Posts: 4
Joined: Fri Aug 04, 2006 12:23 am

Post by Teldin »

Correct, I installed it from the live CD. So my PHP version is 5. I made the change to hppd.conf but it's still doing the same thing. I look forward to your newest version, keep up the good work :)
User avatar
voronwe
Posts: 193
Joined: Tue Jan 18, 2005 12:40 am
Location: Copenhagen Denmark

Post by voronwe »

Hi Teldin

Sorry for the late reply here, i have been busy the last few weeks, the new version is ready for download.

I have added a log view function to the frontend, but sadly this needs some changes to the sudo configuration, but to avoid this change there is a variable in the config file to disable the function.

And as allways read the ReadMe.txt file for configuration questions.

And the opservant user will discover that some changes have been made to the calendar part of the frontend. Since cron needs the files inside the /etc/cron.d directory to have some restricted permissions to prevent hacking i cannot enable / disable it from the frontend, so i would suggest using Webmin for that.
Best Regards
Tom Stage
itsthemedication
Posts: 33
Joined: Mon Jul 12, 2004 3:11 pm

Taking a different approach

Post by itsthemedication »

For simple minded peopl like me that have problems setting up scripts and paths and such, I have found that KDE's kcron does a great job!

Thanks to all for the great software. Running four axis network cameras on my setup (Mandriva 2006) and everything is humming along great. This is what open source is all about!
amerdsp
Posts: 28
Joined: Tue Oct 03, 2006 10:51 pm

Calendar Connection Problem

Post by amerdsp »

Hello,
I tried to follow the instructions in the readme file, but when I try to login I get the following SQL error:

SQL Connect Fejlede

Does anyone know what that is?

Thannks,

A
User avatar
voronwe
Posts: 193
Joined: Tue Jan 18, 2005 12:40 am
Location: Copenhagen Denmark

Re: Calendar Connection Problem

Post by voronwe »

Hi amerdsp

The error below seems to indicate that you have a misconfiguration of your config.php regarding your sql information, the error says that it cannot connect to the database.
amerdsp wrote:Hello,
I tried to follow the instructions in the readme file, but when I try to login I get the following SQL error:

SQL Connect Fejlede

Does anyone know what that is?

Thannks,

A
Best Regards
Tom Stage
amerdsp
Posts: 28
Joined: Tue Oct 03, 2006 10:51 pm

Re: Calendar Connection Problem

Post by amerdsp »

voronwe wrote:Hi amerdsp

The error below seems to indicate that you have a misconfiguration of your config.php regarding your sql information, the error says that it cannot connect to the database.
Thanks Tom for your reply. I apologize if I sound too naive but here is what is happening. When I log in locally to the calendar, I get the message I told you about earlier without even getting to a login screen. However, when I try to log in from the diiferent machine, I do get the login page. I enter Admin and password but then I get

Code: Select all

Query failed. No database selected
. Below you can find my config.php file perhaps you can give me a hint of what I am doing wrong.

Thank you in advance for your time and help.

Code: Select all

$VERSION = "2.0";
$base = "dvos"; // This is the Database where the calendar table is located
$basezm = "zm"; // This is the default zm database so if you have changed that remember to change it here as well.
$user = "zmuser"; // Remember to change this to your database user
$password = "zmpass"; // Remember to change the password for your database user
$host = "localhost"; // Remember to change the host to where you have your databases
$default_lng = 'en';// Set Default Language
$default_template ='dvos';// Set Default Template
$browser_resize = true; // Wether or not we should resize browser window, this is used in the ZM template for now
$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/httpd/'; // Path to the Apache Logfiles
User avatar
voronwe
Posts: 193
Joined: Tue Jan 18, 2005 12:40 am
Location: Copenhagen Denmark

Post by voronwe »

Hi amerdsp

Hmm this is strange, at the moment i can only think of one thing, the user you have in the config.php, is that user restricted to the zm database only or is he a global user that have access to all the databases on the server. ??
Best Regards
Tom Stage
amerdsp
Posts: 28
Joined: Tue Oct 03, 2006 10:51 pm

Post by amerdsp »

voronwe wrote:Hi amerdsp

Hmm this is strange, at the moment i can only think of one thing, the user you have in the config.php, is that user restricted to the zm database only or is he a global user that have access to all the databases on the server. ??
Yes, I granted all privileges to zmuser on *.* and the error remains even though I can see bith the dvos and zm db in mysql.

Is there a way to know what db it is trying to connect to and with what user and password?
User avatar
voronwe
Posts: 193
Joined: Tue Jan 18, 2005 12:40 am
Location: Copenhagen Denmark

Post by voronwe »

amerdsp wrote: Yes, I granted all privileges to zmuser on *.* and the error remains even though I can see bith the dvos and zm db in mysql.

Is there a way to know what db it is trying to connect to and with what user and password?
Ok so the zmuser should have full access to everything in the database, that just makes it more strange.

Ok the connection that the system try to make is to the dvos database where all the frontend user and cron information is stored, the only time that the frontend is trying to get info from the ZM database is when it needs to check what states there are on the system.
Best Regards
Tom Stage
User avatar
voronwe
Posts: 193
Joined: Tue Jan 18, 2005 12:40 am
Location: Copenhagen Denmark

Post by voronwe »

Hi All

Some Bugs have been found and iam working on them, i will post here when the new version is ready for download.
Best Regards
Tom Stage
User avatar
voronwe
Posts: 193
Joined: Tue Jan 18, 2005 12:40 am
Location: Copenhagen Denmark

Post by voronwe »

Hi All

The Webmin bug have been fixed, and a new version is now ready for download.
Best Regards
Tom Stage
ziopippo
Posts: 18
Joined: Tue Sep 05, 2006 10:43 am
Location: Italy

Post by ziopippo »

Hi,
i have this error:

Code: Select all

Sorry, we have language problem. Sorry, we have language problem.
If i connect the first time with the Uesr: admin and Password: (none) i receive this error message:

Code: Select all

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/config/dvos.inc.php:3183) in /var/www/login.php on line 61

Warning: Cannot modify header information - headers already sent by (output started at /var/www/config/dvos.inc.php:3183) in /var/www/login.php on line 89

Warning: Cannot modify header information - headers already sent by (output started at /var/www/config/dvos.inc.php:3183) in /var/www/login.php on line 90

Warning: Cannot modify header information - headers already sent by (output started at /var/www/config/dvos.inc.php:3183) in /var/www/login.php on line 91

Warning: Cannot modify header information - headers already sent by (output started at /var/www/config/dvos.inc.php:3183) in /var/www/login.php on line 92

Warning: Cannot modify header information - headers already sent by (output started at /var/www/config/dvos.inc.php:3183) in /var/www/login.php on line 93

Warning: Cannot modify header information - headers already sent by (output started at /var/www/config/dvos.inc.php:3183) in /var/www/login.php on line 95

Can you help me?

Best Regards.
________
Vaporizer manufacturers
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

The 1st problem might be a permission problem, that your web user dont have access to the language directory.

For the 2nd problem i need to get some more info about your system.
What distro are you using. ?
What version of php are you using. ?
What version of apache are you using. ?
Best Regards
Tom Stage
Post Reply