Go Back   HostGator Peer Support Forums > HostGator Peer Support Forums > Shared Hosting Support

Notices

Reply
 
Thread Tools
  #1  
Old 01-12-2011, 12:29 AM
BigUglyTroll BigUglyTroll is offline
Hatchling Croc
 
Join Date: Oct 2005
Posts: 15
Default Escapeshellcmd() Exec()

are escapeshellcmd() and exec() enabled, or can we enable these for our accounts using php.ini
Reply With Quote
  #2  
Old 01-12-2011, 12:46 AM
virtvir5's Avatar
virtvir5 virtvir5 is offline
King Croc
 
Join Date: Feb 2009
Location: Parry Sound, Canada
Posts: 1,245
Default Re: Escapeshellcmd() Exec()

The PHP escapeshellcmd() function merely escapes any characters in a string that might be used to trick a shell command into executing arbitrary commands. The PHP exec() function works fine where the server's executable files themselves have been granted the necessary permissions -- notably, for example, for things like ImageMagick and other executable files that are located in the /user/bin/ and /usr/local/bin/ folders.

No need for any special php.ini modifications.
__________________
Regards, Richard
VIRtech.org

Last edited by virtvir5; 01-12-2011 at 12:48 AM.
Reply With Quote
  #3  
Old 02-05-2012, 12:16 PM
dmolavi dmolavi is offline
Hatchling Croc
 
Join Date: May 2005
Posts: 30
Default Re: Escapeshellcmd() Exec()

This is dredging up an old topic, but I have a cronjob that runs every 15 minutes to check to see if a remote repository has been updated, and if so, it is supposed to trigger two additional php scripts to execute via the "exec" command. The code is like this:
exec('php '.getcwd().' /MYFILE.php');

However, it results in a hung process and loads of "unable to fork" errors in the error log.

I can run the secondary scripts via http or CLI with no issue, so i'm not sure what the problem is.

Does anyone have any tips/suggestions?
__________________
Reply With Quote
Reply

Bookmarks

Thread Tools

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 On
HTML code is Off

Forum Jump

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