Garethp Posted February 2, 2010 Share Posted February 2, 2010 I have EasyPHP running on my Windows Machine, and I'm running a program that goes through a folder, goes into the subfolders and uses the rar command with WinRAR to create a cbr (comic book rar) file, but I have alot of files to go through, and it's a pain in the ass trying to do stuff with the command line popping up every few seconds. Is there anyway to do a system() but silent, so it runs in the background? Link to comment https://forums.phpfreaks.com/topic/190623-silent-system/ Share on other sites More sharing options...
trq Posted February 2, 2010 Share Posted February 2, 2010 & puts a process into the background. system('command &'); Link to comment https://forums.phpfreaks.com/topic/190623-silent-system/#findComment-1005311 Share on other sites More sharing options...
gizmola Posted February 2, 2010 Share Posted February 2, 2010 & puts a process into the background. system('command &'); Hehe, don't think that will work on windows though. Link to comment https://forums.phpfreaks.com/topic/190623-silent-system/#findComment-1005313 Share on other sites More sharing options...
Garethp Posted February 2, 2010 Author Share Posted February 2, 2010 Unfortunately Gizmola is right. Is there any version of that for Windows? Link to comment https://forums.phpfreaks.com/topic/190623-silent-system/#findComment-1005318 Share on other sites More sharing options...
trq Posted February 2, 2010 Share Posted February 2, 2010 Take a look at the START command, this really has nothing at all to do with php. Link to comment https://forums.phpfreaks.com/topic/190623-silent-system/#findComment-1005320 Share on other sites More sharing options...
Haberdasher Posted February 2, 2010 Share Posted February 2, 2010 I've had success with the exec() function on Windows servers. The only caveat is the the app being executed has to be in the same dir as the PHP that is executing it. There may be a setting that can be adjusted to get around that though. Here's a bit of code I use to run a python app. $command = "\"scan.py\""; print $command; print exec($command); Hope that helps. -Dave Link to comment https://forums.phpfreaks.com/topic/190623-silent-system/#findComment-1005335 Share on other sites More sharing options...
gizmola Posted February 2, 2010 Share Posted February 2, 2010 Nobody said that exec doesn't work, what doesn't work is using unix process control to background a process, as in thorpe's example. Link to comment https://forums.phpfreaks.com/topic/190623-silent-system/#findComment-1005337 Share on other sites More sharing options...
gizmola Posted February 2, 2010 Share Posted February 2, 2010 BTW, as usual thorpe pretty much knows everything .... On windows ... "start program" is apparently functionally equivalent to unix... "program &" Link to comment https://forums.phpfreaks.com/topic/190623-silent-system/#findComment-1005338 Share on other sites More sharing options...
trq Posted February 2, 2010 Share Posted February 2, 2010 BTW, as usual thorpe pretty much knows everything .... Pfff. I'm just not too lazy to use Google every now and then. Link to comment https://forums.phpfreaks.com/topic/190623-silent-system/#findComment-1005344 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.