LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-08-2007, 08:39 PM   #1
recluse8912
LQ Newbie
 
Registered: Jan 2007
Posts: 2

Rep: Reputation: 0
issue with FD4 + PHP5 using "exec_shell()"


I'm trying to run ImageMagick's software via PHP. When trying to run 'convert' using exec_shell() or exec(), nothing happens and it doesn't return anything, although it works great from the command line. However, when I run a simple command such as 'ls' or 'pwd', it works no problem. I'm running Fedora Core 4 from a remote server, so it's all command line based. Any suggestions would be invaluable!
 
Old 01-09-2007, 01:07 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
Permission problem? What permissions are set on the imagemagick binary / imagemagick's convert binary?

Sounds like the user PHP runs as does not have permission to execute / spawn / fork the imagemagick binary. Also, make sure that PHP can find the imagemagick binary, i. e. that its location is explicitly specified or it is in the path.
 
Old 01-09-2007, 06:04 PM   #3
recluse8912
LQ Newbie
 
Registered: Jan 2007
Posts: 2

Original Poster
Rep: Reputation: 0
the permissions seem ok, but I did notice that the 'convert' command along with the other ImageMagick commands are located in: /usr/local/bin

all the commands that work via exec_shell are located in either /usr/bin or /bin

it seems like i have to somehow allow /usr/local/bin to be accessible by exec_shell, but have no idea how
 
Old 01-10-2007, 12:20 AM   #4
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
...or just move the binaries over to the accessible directory...
 
  


Reply



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
PHP5 + Apache 2.x : /usr/local/modules/libphp5.so: Undefined symbol "apr_table_set" Ephracis Linux - Software 6 10-01-2010 12:26 PM
SSH issue ""Server unexpectedly closed network connection" Errsta_Fonzarelli Linux - Software 12 05-24-2010 02:35 PM
Telling people to use "Google," to "RTFM," or "Use the search feature" Ausar General 77 03-21-2010 11:26 AM
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 03:07 PM
Any way to get "Alice"; "Call of Duty" series and "Descent 3" to work? JBailey742 Linux - Games 13 06-23-2006 01:34 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:05 PM.

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