View previous topic :: View next topic |
Author |
Message |
ruurd
Joined: 27 Oct 2007 Posts: 5
|
Posted: Fri Apr 18, 2008 5:32 pm Post subject: script hangs from encrypt_pwd.exe |
|
|
Hello there,
Is there a workaround to fix the problem of the script hanging when using the exec function to execute "encrypt_pwd.exe"? I made a custom script that enable my users to refresh their accounts (post credit to buy quotas). It works well at most times but hangs usually at the account validation stage when executing the password encryption program. Here is how I execute the firstspot encryption program:
$passwd = exec("C:\WebApp\wifirefresh\encrypt_pwd.exe $password1");
the $passwd vatriable is then passed in the select statement when doing validation. The problem is that the execution doesnt terminate properly and php will wail until it complete but never. How do I capture its output (according to php manual) so it will terminates properly and doesnt hangs?
Appreciate any help on this.
Thanks in advanced.
ruurd _________________ How to use firstspot for usage based (data transferred) instead of time based and display on info window the remaining $ or MB instead of remaining time? |
|
Back to top |
|
|
dominic Forum facilitator
Joined: 23 Oct 2007 Posts: 103
|
Posted: Mon Apr 21, 2008 5:15 am Post subject: |
|
|
Please try the following alternative:
Code: | $sys = new COM('FSCONFIG.Cfgmgr') or die;
$cmd = "C:\\WebApp\\wifirefresh\\encrypt_pwd.exe $password1";
$passwd = $sys->runCommand($cmd);
$sys = null; |
|
|
Back to top |
|
|
|
|
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 vote in polls in this forum
|
|
Powered by phpBB © 2001, 2005 phpBB Group
| |