Jump to content

Recommended Posts

Hi friends...

 

Below is the code. When i try to execute this i am getting the error produced by die; "could not run the program";

 

 

<html>

<body>

<?php

$val = shell_exec ( 'RepeatMasker temp/gene.txt > b.out' ) || die("could not run the program");

echo "<pre>$val</pre>";

 

?>

</body>

</html>

 

 

 

RepeatMasker is a computational program which takes an argument. The program runs and produces output when i run in terminal.

But program cannot be invoked when i am using it with CGI-PERL or PHP.

 

I am suspecting that Apache server loses its privileges when it goes to the background.

 

Please help me with the same.

 

thanks in advance.

 

Naren

 

 

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/90894-php-dies-when-executing-a-shell-command/
Share on other sites

<html>

<title>

RepeatMasker

</title>

<body>

<?php

 

$var = shell_exec ("RepeatMasker gene.txt") or die ("Could not run");

echo $var;

?>

</body>

</html>

 

I have modified the code like the above.

 

Programs dies saying could not run.

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.