We have a rare situation where rogue requests to our server will cause 
unhandled errors (low-level that can't be trapped via ON ERR CALL). We run 
Active4D with an NTK-based web server. When this happens all of the listener 
processes eventually hang and requests to Active4D no longer respond.

I've spent untold hours trying to figure out the request details so that I 
might block them with Apache before they are passed on to A4D but have given 
up. 

We have external monitoring software installed informs us when the Active4D web 
server isn't responding. The solution for now is to go to the server if 
on-site, or VPN in and ARD to the 'web client' and kill 4D. In the worst case 
you may have to force quit. 4D will automatically restart within a minute. I 
have a launchd process that runs a set of scripts that keep 4D running. 

I would like to develop a secure, protected web app (w/ PHP) that would allow 
us to kill 4D. Ideally I could just call an Active4D page that would "QUIT 4D", 
but that isn't possible if all of the A4D Listeners are hung. When A4D is hung, 
Apache/PHP is still serving fine. We're running on Mac OS X 10.6 Server.

The shell command 'sudo killall 4D' will kill 4D  but I can only get this to 
work if run from the command line as a privileged user. If I try to run a PHP 
script that executes that it doesn't have the privileges to run 'killall'.

I think that the solution to this problem may be found in a blog post about 
modified the sudoers file:

http://www.slepi.net/blog/system-administration/using-sudo-to-execute-root-privileged-commands.html

The problem is that blog gives details for LINUX and the Mac OS sudoers syntax 
differs.

Has anyone here ever had to tackle a similar problem, and if so can you offer 
any tips?

What I think I need to do is modify sudoers so that _www user can execute 'sudo 
/usr/bin/killall 4D' without having to give a password.

That blog and 'man sudoers' indicate this is definitely possible. I've been 
battling this for most of the afternoon, but I can't seem to get the syntax 
right.

Thanks,

Brad Perkins
_______________________________________________
Active4D-dev mailing list
[email protected]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://vasudev.aparajitaworld.com/archive/active4d-dev/

Reply via email to