Open-AudIT

What's on your network?
It is currently Wed Apr 25, 2018 10:16 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Tue Apr 10, 2012 8:53 pm 
Offline
Newbie

Joined: Tue Mar 27, 2012 8:35 pm
Posts: 12
Hello,

I'm unable to add an audit configuration. When I submit the settings I get an error in IE 8:
An hexadecimal digit was expected in audit_configuration line 1 char 88

It doesn't work in Firefox but in that case I don't get any error.

Any suggestion?

_________________
OA 10.09.01 + mysql/5.5.8 + Apache/2.2.17 + PHP/5.3.4


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 11, 2012 12:43 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1254
Maybe you're running into MySQL Strict mode problems. If you're already on the latest SVN version of OpenAudit you can try the attached file and see if it helps.

Remove the ".txt" from the downloaded file and copy to your OpenAudit htdocs directory.


Attachments:
audit_config_add_ajax.php.txt [14.26 KiB]
Downloaded 581 times
Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 13, 2012 1:11 am 
Offline
Newbie

Joined: Tue Mar 27, 2012 8:35 pm
Posts: 12
Hi jpa,

I changed the file but doesn't work.
I'm getting the same error

Any suggestion?

Thanks

_________________
OA 10.09.01 + mysql/5.5.8 + Apache/2.2.17 + PHP/5.3.4


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 13, 2012 1:39 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1254
You'll need to post some more info about the configuration you're trying to add.


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 13, 2012 4:28 pm 
Offline
Newbie

Joined: Tue Mar 27, 2012 8:35 pm
Posts: 12
hi,

Here you have an screen capture.

Thanks


Attachments:
AuditConfig.png
AuditConfig.png [ 143.37 KiB | Viewed 14947 times ]

_________________
OA 10.09.01 + mysql/5.5.8 + Apache/2.2.17 + PHP/5.3.4
Top
 Profile  
Reply with quote  
PostPosted: Sat Apr 14, 2012 2:48 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1254
I can't replicate this. Is there anything in your php error logs that might help?


Top
 Profile  
Reply with quote  
PostPosted: Sun Apr 15, 2012 2:19 am 
Offline
Newbie

Joined: Tue Mar 27, 2012 8:35 pm
Posts: 12
Hi,

Here are the errors I'm getting ...

[14-Apr-2012 18:13:28] PHP Notice: Undefined index: config_id in PATH_TO\audit_configuration.php on line 76
[14-Apr-2012 18:13:28] PHP Notice: Undefined index: config_id in PATH_TO\audit_configuration.php on line 116
[14-Apr-2012 18:13:29] PHP Notice: Undefined offset: 1 in PATH_TO\audit_configuration.php on line 274
[14-Apr-2012 18:13:29] PHP Notice: Undefined offset: 2 in PATH_TO\audit_configuration.php on line 274
[14-Apr-2012 18:13:29] PHP Notice: Undefined offset: 3 in PATH_TO\audit_configuration.php on line 274
[14-Apr-2012 18:13:29] PHP Notice: Undefined offset: 1 in PATH_TO\audit_configuration.php on line 277
[14-Apr-2012 18:13:29] PHP Notice: Undefined offset: 2 in PATH_TO\audit_configuration.php on line 277
[14-Apr-2012 18:13:29] PHP Notice: Undefined variable: ip_end in PATH_TO\audit_configuration.php on line 277
[14-Apr-2012 18:13:29] PHP Notice: Undefined variable: linux_software in PATH_TO\audit_configuration.php on line 365


Thanks!

_________________
OA 10.09.01 + mysql/5.5.8 + Apache/2.2.17 + PHP/5.3.4


Top
 Profile  
Reply with quote  
PostPosted: Sun Apr 15, 2012 2:48 am 
Offline
Newbie

Joined: Tue Mar 27, 2012 8:35 pm
Posts: 12
Hi again,

Are maybe my problems related with my OA, apache, php and mysql versions?
Which are the supported ones with my OA version?

_________________
OA 10.09.01 + mysql/5.5.8 + Apache/2.2.17 + PHP/5.3.4


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 18, 2012 2:50 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1254
Those errors are expected and don't indicate a problem.

I tested with Apache 2.2.22, MySQL 5.5.22 and PHP 5.2.13/5.3.10/5.4.0 and successfully added a configuration.

What happens if you don't use a preconfigured LDAP connection?


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 19, 2012 4:06 pm 
Offline
Newbie

Joined: Tue Mar 27, 2012 8:35 pm
Posts: 12
Hi jpa,

Thanks for your help.
I get the same error with an ldap entry preconfigured.
In fact if I leave all the fields blank I get the same error.

The javascript error is the next one
<b>Notice</b>: Undefined index: config_id in <b>C:\xampp\htdocs\OAv1\audit_configuration.php</b> on line <b>76</b><br />

<b>Notice</b>: Undefined index: config_id in <b>C:\xampp\htdocs\OAv1\audit_configuration.php</b> on line <b>116</b><br />

and the piece of code from the audit_configuration.php are the next ones

76 line
<form action="javascript:SubmitForm('config','<?php echo $form_action ?>','<?php echo $_GET['config_id']; ?>');" method="post" id="form_config">

116 line
<input type="hidden" value="<?php echo $_GET['config_id']; ?>" id="config_id"/>

I'm not used to work with php but seems that the parameter config_id is missed.

Any idea?

_________________
OA 10.09.01 + mysql/5.5.8 + Apache/2.2.17 + PHP/5.3.4


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 20, 2012 2:08 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1254
I'm pretty sure the php errors from the log aren't your problem. I think you've got some kind of javascript or file corruption thing going. If you click Submit on a blank add configuration page you should get an error message like the following.

Attachment:
EmptyAddConfigError.png
EmptyAddConfigError.png [ 7.3 KiB | Viewed 14876 times ]


The errors in the php log are from when you first load the Add a Configuration page and so are before when you see the error message. At this point I would back up the OpenAudit www directory on your server then wipe it and start from a fresh SVN download.


Top
 Profile  
Reply with quote  
PostPosted: Mon Apr 23, 2012 8:54 pm 
Offline
Newbie

Joined: Tue Mar 27, 2012 8:35 pm
Posts: 12
Hello,

I tried with a fresh installation but I get the same error.

malformed hexadecimal character escape sequence
javascript:SubmitForm('config','add','<br%20/><b>Notice</b>:%20%20Undefined%20index:%20config_id%20in%20<b>PATH_TO\audit_configuration.php</b>%20on%20line%20<b>76</b><br%20/>');
Line 1

Any idea?

_________________
OA 10.09.01 + mysql/5.5.8 + Apache/2.2.17 + PHP/5.3.4


Top
 Profile  
Reply with quote  
PostPosted: Tue Apr 24, 2012 3:08 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1254
Try the attached audit_configuration.php file. I can't replicate this error but I've changed one thing that might help.


Attachments:
audit_configuration.php.txt [20.77 KiB]
Downloaded 577 times
Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 26, 2012 9:25 pm 
Offline
Newbie

Joined: Tue Mar 27, 2012 8:35 pm
Posts: 12
Hey!

It works!!!

Thanks a lot.

Yo have changed these lines...

$ip_end = ( !is_null($cfg[$id]) ) ? $cfg[$id]['ip_end']

<input type="hidden" value="<?php echo $id; ?>" id="conf

please, could you explain the goal?

Thanks!

_________________
OA 10.09.01 + mysql/5.5.8 + Apache/2.2.17 + PHP/5.3.4


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 27, 2012 1:34 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1254
The audit_configuration.php file is used to add and change configurations. On first accessing the file there is no configuration selected for editing and so $_GET['config_id'] isn't set. One of the first things in the code is to check for this and set $id = 0 if we're not editing an existing configuration.
Code:
 $id = ( isset($_GET['config_id']) ) ? $_GET['config_id'] : '0';

It looks like for some reason on your machine when config_id isn't set $_GET['config_id'] returns an error string ( <br%20/><b>Notice</b>:%20%20Undefined%20index:%20config_id%20in%20<b>PATH_TO\audit_configuration.php</b>%20on%20line%20<b>76</b><br%20/>).
After $id is set early in the code further code should use $id rather than $_GET['config_id']. Two places in the released code are using $_GET['config_id'] rather than $id. I changed this because the garbage returned in your configuration was causing problems.
Code:
   <form action="javascript:SubmitForm('config','<?php echo $form_action ?>','<?php echo $_GET['config_id']; ?>');" method="post" id="form_config">
should be
   <form action="javascript:SubmitForm('config','<?php echo $form_action ?>','<?php echo $id; ?>');" method="post" id="form_config">

   <input type="hidden" value="<?php echo $_GET['config_id']; ?>" id="config_id"/>
should be
   <input type="hidden" value="<?php echo $id; ?>" id="config_id"/>


If we are editing a configuration then $id is set to the configuration id and the configuration information is retrieved and presented for editing. The released code was not retrieving the last octet of "IP End" for an "IP Range" type audit. So I added the following to get this info.
Code:
 $ip_end = ( !is_null($cfg[$id]) ) ? $cfg[$id]['ip_end']     : '0';


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.  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
Powered by phpBB® Forum Software © phpBB Group