473,383 Members | 1,733 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

exec() doesnot work??

When I run a command "blastp -query query.fasta -subject arbi.fasta " it gives the output in command promt. But it did not when used in exec as follows:

$out=exec('blastp -query query.fasta -subject arbi.fasta')
echo $out;


please help me in this..
Mar 28 '11 #1
2 1417
dgreenhouse
250 Expert 100+
Try:

Expand|Select|Wrap|Line Numbers
  1. // $out will contain the last line of the command
  2. $out=exec('blastp -query query.fasta -subject arbi.fasta', $output, $return_var);
  3.  
  4. echo '<pre> The last line of output:<br>';
  5. echo $out.'<br>';
  6. echo 'The output:<br>';
  7. print_r($output);
  8. echo '<br>The status: '.$return_var;
  9. echo '</pre>';
  10.  
If this doesn't work try passthru()

Also, the user the webserver is running as may not have execute permissions for the executable... Just a thought...
Mar 28 '11 #2
You may check your php.ini file , if their exec is permitted or not....
Mar 29 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Venkat | last post by:
Hi, My HTML page doesnot work properly in Netscape 7.1. But works fine in Opera 7 and IE 6.0. I could not figure out the problem. If any one could/suggest it would be nice.. This piece of HTML...
2
by: blah | last post by:
i m using Windows XP, and by tomorrow i will have have fedora core installed too. the problem is, when i use these "fork() and exec()" my windows doesnt do anything, python gives an error about the...
1
by: zahni31 | last post by:
This lookup the service controller, because db2 8.2.2 does not force connections at "net stop" command . -Zahni
11
by: Hasan O | last post by:
Hi , i have problem about sending data over socket . It waits for another socket.send // str = Encoding.ASCII.GetBytes("hello"); socket.Send(str,0,str.Length,SocketFlags.None); ...
3
by: dave | last post by:
We have an application that works perfectly in-house (tested on 3 different servers). It uses Microsoft.Web.UI.WebControls.dll for menubars and toolbars. Problem Description: We uploaded...
8
by: anandaraman | last post by:
Hi all, i want to send mail through php coding.but error displays. i am working in windows environment. please help.. PHP Coding: <?php $to = "anandh@yahoo.com"; $subject = "Example"; $txt =...
3
by: kolimukesh | last post by:
hi, i am working on javascript and have lots of problem in setting the attributes of various elements for example for my table element which i created i tried the following ...
29
by: zalek | last post by:
I am writing application with Ajax in sync mode - xmlHttp.open("GET", url, false). I noticed that in FireFox handler doesn't starts. It starts when I use xmlHttp.open("GET", url,true). I need to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.