Registrations to Open-AudIT forums are now closed. To ask any new questions please visit Opmantek Community Questions.

Open-AudIT

What's on your network?
It is currently Fri Nov 15, 2019 5:52 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 13 posts ] 
Author Message
PostPosted: Wed Jan 10, 2007 11:00 pm 
Offline
Newbie

Joined: Thu Mar 02, 2006 12:41 am
Posts: 33
I have recently ported my openaudit database from Windows IIS to Apache running on CentOS. Whilst this went quite well, I've noticed some errors that pop up at various intervals. These are

Notice: Undefined variable: vnc_type in /var/www/html/openaudit/admin_config.php on line 285

Notice: Undefined variable: management_domain_suffix in /var/www/html/openaudit/admin_config.php on line 290

Notice: Undefined variable: ldap_base_dn in /var/www/html/openaudit/admin_config.php on line 305

Notice: Undefined variable: ldap_server in /var/www/html/openaudit/admin_config.php on line 306

Notice: Undefined variable: ldap_user in /var/www/html/openaudit/admin_config.php on line 307

Notice: Undefined variable: ldap_secret in /var/www/html/openaudit/admin_config.php on line 308

I never had these errors before - can anyone suggest a way of resolving these ?

Thanks


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 11, 2007 12:05 am 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
Make sure you have the latest version of all of the OA code, then go in to admin> config and make sure you save a valid entry for all of the variables.

You are seeing the errors because there are certain entries not set in your config.

Did you copy the config from an older version by any chance. If so just do as I suggest above, and everything should be OK. If not let us know.

:P


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 11, 2007 1:13 am 
Offline
Newbie

Joined: Thu Mar 02, 2006 12:41 am
Posts: 33
Thanks. I got all the new code from the SVN, and went through the setup again.

This time, I get

3. Setup database
4. Setup Completed
Connecting to the MySQL Server... Success!
Creating the database... Success!
Creating the user... Could not create the user: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'USER 'openaudit'@'localhost' IDENTIFIED BY 'xxxxxx'' at line 1

I am running MySQL 4.1.20. Not really in a position to upgrade this, as I have another application that uses the same backend.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 11, 2007 1:29 am 
Hmm yeah, I think there is an incompatibility with MySQL 4 and the setup routine. We can work around that though. Do you want to use your old db? That's pretty simple. Just `chmod 664 include_config.php`, which will allow the config to be written by the website. Then follow Andy's instructions above. That should remove all errors. What is happening is that the config for PHP is set differently on your CentOS box as compared to your windows install. The specific change is that it is reporting more warnings, which is helpful for development.


Top
  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 11, 2007 1:34 am 
Offline
Newbie

Joined: Thu Mar 02, 2006 12:41 am
Posts: 33
Ok will try this, however, include_config.php is no longer in the SVN trunk ? I can see include_config_defaults.php though ?????

Is include_config.php missing ?

Thanks


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 11, 2007 1:43 am 
Offline
Newbie

Joined: Thu Mar 02, 2006 12:41 am
Posts: 33
[RESOLVED]

Skip the above post, as I have managed to resolve this. It looks like the older version of MySQL is not able to parse the setup script. Therefore, to alleviate this issue, I have done the following:

1. Downloaded newest code from SVN
2. Copied over an existing version of include_config.php, and modified it accordingly
3. Placed this (CHMOD 755) inside the OpenAudit folder within HTML (Apache)
4. In MySQL, created a new database called "Openaudit"
5. In MySQL, created a new database user called "Openaudit", and assigned rights
6. Restored my old database

This seems to have done the trick.

Thanks for all your help.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 11, 2007 2:11 am 
Offline
Moderator
User avatar

Joined: Tue Jan 25, 2005 3:09 am
Posts: 2140
Location: Scotland
See this link for what all of the bits do.
http://www.open-audit.org/phpbb2/viewtopic.php?t=1393

Then....modify the following code to suit, and put in include_config.php

Code:
<?php
$mysql_server = 'mymachine.mydomain.local';
$mysql_database = 'openaudit';
$mysql_user = 'openaudit';
$mysql_password = 'SomePassword';

$use_https = 'n';
// An array of allowed users and their passwords
// Make sure to set use_pass = "n" if you do not wish to use passwords
$use_pass = 'n';
$users = array(
 'admin' => ''
);


// Config options for index.php
$show_other_discovered = 'y';
$other_detected = '3';

$show_system_discovered = 'y';
$system_detected = '3';

$show_systems_not_audited = 'y';
$days_systems_not_audited = '7';

$show_partition_usage = 'y';
$partition_free_space = '1000';

$show_software_detected = 'y';
$days_software_detected = '3';

$show_patches_not_detected = 'y';
$number_patches_not_detected = '5';

$show_detected_servers = 'y';
$show_detected_xp_av = 'y';
$show_detected_rdp = 'y';

$show_os = 'y';
$show_date_audited = 'y';
$show_type = 'y';
$show_description = 'y';
$show_domain = 'y';
$show_service_pack = 'y';

$count_system = '20';

$vnc_type = 'ultra';

$round_to_decimal_places = '2';

$management_domain_suffix = 'local';

$use_ldap_integration= 'y';

$ldap_base_dn= 'dc=mydonain,dc=local';

$ldap_server = 'myserver.mydomain.local';

$ldap_user = 'myuser@mydonain.local';

$ldap_secret = 'password';

$full_details = 'n';

$language = 'en';

?>


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 11, 2007 2:13 am 
Offline
Newbie

Joined: Thu Mar 02, 2006 12:41 am
Posts: 33
Thanks Andy.

I realised that this stuff was missing, and copied it from my Windows box. It's all good now, as they say..

Thanks again.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 11, 2007 2:22 am 
Did you chmod 755 the include_config.php? That would make it executable! No need for that. 644 would do. Though if you want the website to modify it, like I said, 664 may be necessary. All depends on the user/group the apache process is running under, and the user/group assigned to your htdocs/www-data or whatever folder :)


Top
  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 11, 2007 3:04 am 
Offline
Newbie

Joined: Thu Mar 02, 2006 12:41 am
Posts: 33
Sorry - my mistake. The files are all 644 at the moment. I'm not really a linux guy (still learning), so forgive my ignorance with CHMOD...

Thanks for all the help :D


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Jan 11, 2007 6:55 pm 
Offline
Newbie

Joined: Thu Mar 02, 2006 12:41 am
Posts: 33
Just as an observation...

The time taken to load index.php on my CentOS box is significantly longer than the previous Windows incarnation. CentOS takes about 15 seconds to load the page, whilst Windows takes around 6 seconds.

Anyone have any idea as to why this is ? Obviously, the CentOS box uses Apache (with MySQL 4.1.20), in comparison to the Windows box, which is using IIS 5.0, and MySQL 5.

Thanks


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Jan 12, 2007 12:26 am 
Is this the same machine specs-wise as that used for the windows server?


Top
  
Reply with quote  
 Post subject:
PostPosted: Fri Jan 12, 2007 1:26 am 
Offline
Newbie

Joined: Thu Mar 02, 2006 12:41 am
Posts: 33
Yes. It's a VM to be honest, but I have another app that uses PHP, as this runs fine.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 13 posts ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group