LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-04-2011, 06:14 PM   #1
tnrooster
Member
 
Registered: Apr 2007
Location: bell buckle tn
Distribution: F13-F14
Posts: 88

Rep: Reputation: 15
command not found- qrencode


I'm trying to get another bash script to run from a exec() command but I keep getting errors.

Bash script is in a directory in html on apache server.

Was owned by root:root. Ran from terminal and it ran perfect.

No problem then running the script from web page just it wouldn't output .

Return user in the script, print on the web page. Apache:Apache.

Ok so then reset the autofs directories with apache as the uid,gid so apache has r/w on those directories, nothing different.

Running it in terminal as "apache" and I'm getting
Code:
/.qrimager: line 25 qrencode: command not found

But:
Code:
sudo -u apache echo 2222 | qrencode -s 5 -o /directory/testqr.png
works just fine.

Any ideas?

Last edited by tnrooster; 04-05-2011 at 10:13 AM.
 
Old 04-04-2011, 08:07 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
"/.qrimager" mean that you are trying to execute the hidden file '.qrimager' in the root directory '/'. I think what you mean to execute is './qrimager' which means execute qrimager in the current working directory.
 
Old 04-05-2011, 10:07 AM   #3
tnrooster
Member
 
Registered: Apr 2007
Location: bell buckle tn
Distribution: F13-F14
Posts: 88

Original Poster
Rep: Reputation: 15
Doh! Thank you.

Ooh wait no I just wrote that wrong.

It is :

Quote:
./qrimager:
Thanks for the pointer though.


Answer

It was a $PATH issue for the apache user. No $PATH set for qrencode.

Issued a
Quote:
which qrencode
Recieve:
Quote:
/usr/bin/qrencode
Use that in bash script vs just calling qrencode and everything works.

That must mean when I was changing user in the terminal, it was using the original users PATH settings. As that user had qrencode set and the changed to user did not.

Last edited by tnrooster; 04-05-2011 at 11:16 AM. Reason: Found answer.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
setup command not found in Ubuntu 10.04 Command Prompt vinaytp Ubuntu 2 05-06-2010 02:10 PM
cc command not found :/ silentkillzr Linux - Distributions 2 12-22-2009 05:57 PM
Shell: command not found / Runs fine with "Run command" badbunny Linux - Newbie 1 01-22-2007 02:21 AM
bash: rpm: command not found && sudo: alien: command not found Java_Code Ubuntu 7 07-28-2006 12:57 AM
bash: <command name> command not found smash Programming 5 03-13-2006 09:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration