PDA

View Full Version : How to find out if it's possible to add new accounts, programatically?


tomfra
11-21-2006, 03:29 AM
OK, this may sound odd but let me explain my problem....

I create new accounts through an external PHP script but it sometimes fails. I've found out that it's not caused by the script itself because, sometimes, it is not possible to add new accounts through WHM either.

I suppose it's not possible during the VPS backup process or simply when something else goes wrong. Usually, Apache restart does solve this problem.

The question is: is there a way to check if everything is working as it should and that the server is ready to accept new accounts, from an external script? I can create a "test" new account and then terminate it but that doesn't seem to be the best way in my opinion.

Any ideas?

Thanks!

Tomas

Robert
11-21-2006, 03:04 PM
The main thing I can suggest here is determining WHY the process is failing during certain times. Backups should not cause that kind of problem. Apache being stopped in fact should not cause domain creations to fail as long as the httpd.conf file is still accessable.

However that being said... if you know that restarting Apache always fixes the problem... then a cheat way of fixing the problem might just be to restart Apache before each creation (it would try to restart when it finishes anyway after modifying the httpd.conf).

tomfra
11-23-2006, 02:48 PM
Well, yes, that may work, but sometimes restarting Apache may fail just because Apache is "busy" and the restart attempt needs to be repeated. That's not a big problem for me actually, but I think the fewer Apache restarts the better.

Anyway, I'll try it. Thanks for the tip!

Tomas