You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Sun Club@ NITDGP
Hello people,
Its been a long time since we actually had anything to work upon.
There will be a lot of commitments when we go back to college. I have
opened this thread for all those who are working on anything related
to software development and have got stuck. Please post your problems
in this thread.
Navin Kumar Verma
unread,
Jun 27, 2009, 11:59:28 PM6/27/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Sun Club@ NITDGP
Hi,
I ran into this problem.
I am planning to run a java program from a php script. The code for
that is
<?php
$output = shell_exec("java filename");
?>
shell_exec runs a command from the command line and stores the output
unto $output.
Now i want to terminate the program if its taking too long to execute
itself, for example more than 10 seconds or so.
Can anyone suggest how can I do this?
Aritra
unread,
Jul 7, 2009, 12:35:30 PM7/7/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Sun Club@ NITDGP
I solved the problem with the help of java itself. I made a java
program which takes in the name and inputs of the original program as
command line arguments. Then I started two threads, one calculating
the time elapsed and other running the original program. Thus i could
check whether the stipulated amount of time has expired or not.
I ran this java program from a php script but initially it was not
working as the php script was ignoring outputs which took too long.
After a lot of googling i found out that you needed to increase the
script execution time.
Change the following property in php.ini file
max_execution_time = 30; // accordingly
Now the script works fine.
If anyone made any other progress regarding this please share your
views.