I'm having a problem with the "Add configuration" option. When I try to create a configuration and submit it, "Could not add config:" is displayed and the insert fails.
I added "echo $sql;" to audit_config_add_ajax.php to echo the query so I could input it manually using phpmyadmin.
Here is the query it echos:
[code]INSERT INTO audit_configurations ( audit_cfg_name, audit_cfg_action, audit_cfg_type, audit_cfg_os, audit_cfg_max_audits, audit_cfg_ldap_conn, audit_cfg_audit_conn, audit_cfg_ldap_user, audit_cfg_ldap_pass, audit_cfg_ldap_server, audit_cfg_ldap_page, audit_cfg_audit_user, audit_cfg_audit_pass, audit_cfg_ip_start, audit_cfg_ip_end, audit_cfg_pc_list, audit_cfg_win_vbs, audit_cfg_lin_sft, audit_cfg_lin_sft_lst, audit_cfg_sft_lst, audit_cfg_ldap_use_conn, audit_cfg_audit_use_conn, audit_cfg_nmap_int, audit_cfg_nmap_srv, audit_cfg_nmap_udp, audit_cfg_nmap_tcp_syn, audit_cfg_nmap_url, audit_cfg_ldap_path, audit_cfg_wait_time, audit_cfg_lin_url, audit_cfg_filter, audit_cfg_filter_case, audit_cfg_nmap_path, audit_cfg_com_path, audit_cfg_command_list, audit_cfg_log_enable, audit_cfg_filter_inverse, audit_cfg_cmd_list, audit_cfg_mysql_ids, audit_cfg_command_interact, audit_cfg_audit_local, audit_cfg_win_url, audit_cfg_win_sft, audit_cfg_win_uuid) VALUES ( 'comp','pc', 'iprange','windows', '10', 'nothing', 'nothing', AES_ENCRYPT('user@domain.com', 'openaudit'), AES_ENCRYPT('password','openaudit'), 'hostname', '1000', AES_ENCRYPT('user@domain.com','openaudit'), AES_ENCRYPT('password','openaudit'), '192.168.1.2', '3','', '//domain.edu/netlogon/openaudit/audit.vbs','0', '0','0', '0','0', '7', '1', '1', '1', '', 'DC=mydomain,DC=com', '600','', '','0', '','', '', '1', '0', '', '','0', '0','', '1','mac')[/code]
"Could not add config:" is the error displayed by the php code."mysql_error()" returns blank.
If I take the above query and enter it manually into phpmyadmin I get this error:
[code]Incorrect integer value: 'nothing' for column 'audit_cfg_ldap_conn' at row 1 [/code]
I can change the 2 "nothing" values to "0" run it again, and it is correctly entered into the table.
So how can this be fixed? I suspect the problem lies somewhere in "audit_config_add_ajax.php" possibly in these lines:
[code]$ldap_use_conn = ( $_POST['select_ldap_cred'] != "nothing" ) ? '1' : '0'; $audit_use_conn = ( $_POST['select_audit_cred'] != "nothing" ) ? '1' : '0';[/code]
Is the assignment to interger values failing for some reason?
I'm running SVN 1227 on Windows Server 2003 SP2 with IIS. MYSQL is version "Server version: 5.0.45-community-nt." The problem occurs in both IE 8 and Firefox 3.5.
Attachments: |
File comment: Error I get manually entering the query
phpmyadminerror.JPG [ 104.29 KiB | Viewed 4792 times ]
|
File comment: Example input screen from audit_configuration.php
audit_configuration.JPG [ 67.77 KiB | Viewed 4792 times ]
|
|