Page 1 of 1

[SOLVED] running an exe program

Posted: Wed Oct 27, 2004 8:11 am
by pelegk2
i run this line :

Code: Select all

<?php
exec ("doc2rtf ".$file[0]." ".$file[1]);
?>
the strane thing is that when i run the same from command line it takes no more then a second
but when i run this line from php script it can take a minute and even ,ore
why is that>
tnaks in advance
peleg

Posted: Wed Oct 27, 2004 9:06 am
by kettle_drum
Different file sizes? Plus your making apache load php, which is then running a system command, which is then running the requested program. Its bound to take a bit longer. Why not see if there is a php class that does the same things, or write one.

Posted: Thu Oct 28, 2004 1:32 am
by pelegk2
but i dont see where is the problem?
it should take less then a second?
what to look for?

Posted: Thu Oct 28, 2004 1:22 pm
by rehfeld
i would try simplifying things extremely.


maybe write a simple "hello world" program and execute that from php. see if that still takes forever to run.

if so, well at least you narrowed it down some

i havent used exec before, but doesnt it return some info from the system? maybe php is stuck waiting for this info....

what does the program do? that may help find the problem...

Posted: Sun Oct 31, 2004 1:12 am
by pelegk2
ok the prblem is solved!!!!
i went to the apache service and told it to interact with the desktop as some 1 told me and know it works fine:)

Posted: Sun Oct 31, 2004 4:15 am
by m3mn0n
Yep. ;)

Glad you got that workin'.

Posted: Sun Oct 31, 2004 4:24 am
by pelegk2
yes it was u samy:):):):):