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 Apr 19, 2024 8:54 am

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
PostPosted: Tue Jun 08, 2010 11:24 pm 
Offline
Contributor
User avatar

Joined: Thu Mar 02, 2006 4:41 am
Posts: 205
Location: Massachusetts
I've always had problems opening the software register. I just tracked down the exact error I'm getting.

PHP Fatal error: Maximum execution time of 200 seconds exceeded in software_register.php on line 27

Here is line 27:

$result = mysql_query($sql, $db);

Any ideas how to fix?

Thank you

mysql ver 5.1.33
php ver 5.2.9-2
apache 2.2.11

_________________
Server Info: running on a CentOS 7 vm
OA Version: 2.0.6 @ 500 devices


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 09, 2010 2:56 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
You're auditing quite a few machines there. How long does it take to run the query from software_register.php outside of OpenAudit?

Updated sql due to problem noted below
[code]
SELECT software_reg_id, software_title, count(software.software_name) AS number_used FROM
software_register, software, system WHERE
software_title = software_name AND
software_uuid = system_uuid AND
software_timestamp = system_timestamp
GROUP BY software_title
[/code]

I think you can increase the timeout by adding the following. Increase the time limit to accomodate however long the query takes.
[code]
set_time_limit(300);
[/code]


Last edited by jpa on Thu Jun 10, 2010 7:05 am, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 10, 2010 6:13 am 
Offline
Contributor
User avatar

Joined: Thu Mar 02, 2006 4:41 am
Posts: 205
Location: Massachusetts
Is that a mysql query? I thought it was but when I ran it I got this error:

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 'GROUP BY software_title' at line 5

The workaround is selecting software_register_del.php which doens't delay and lists the software register.

Also, is this a MySQL setting? I'm just wondering where to make this change.

[code]set_time_limit(300); [/code]

Sorry for the "cluelessness" but I'm clearly not a dba or developer

_________________
Server Info: running on a CentOS 7 vm
OA Version: 2.0.6 @ 500 devices


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 10, 2010 6:32 am 
Offline
Moderator

Joined: Fri Jul 20, 2007 8:27 am
Posts: 1259
You know based on my last few times helping people I'm not doing so good on my first tries. So here goes again. Less suck this time.

I copied and pasted the sql out of the php file but when cleaning it up I got a little crazy with the delete key. So here is the actual SQL software_register.php runs. No joke. I even tested it.
[code]
SELECT software_reg_id, software_title, count(software.software_name) AS number_used FROM
software_register, software, system WHERE
software_title = software_name AND
software_uuid = system_uuid AND
software_timestamp = system_timestamp
GROUP BY software_title
[/code]

You can increase the timeout for php by adding the [url=http://php.net/manual/en/function.set-time-limit.php]set time limit stuff[/url] to software_register.php at line 9. The value is the amount of time allowed before the script times out. If you're running on Windows this includes the time for the mysql call. If it's taking a long time because of the number of systems you've audited then increasing the timeout may help. If it's for some other reason then we'll need to try again.
[code]
set_time_limit(300);
[/code]


Top
 Profile  
Reply with quote  
PostPosted: Fri Jun 11, 2010 4:43 am 
Offline
Contributor
User avatar

Joined: Thu Mar 02, 2006 4:41 am
Posts: 205
Location: Massachusetts
Thank you! I was able to run that query in My SQL Query Browser, it took 321 seconds to complete. I'm going to change the time limit to 350 or 400.

_________________
Server Info: running on a CentOS 7 vm
OA Version: 2.0.6 @ 500 devices


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