Jump to content

PATH


ToonMariner

Recommended Posts

Hi guys n' gals...

 

My firts post in here and I wanr you I AM A TOTAL SPAZ at this stuff...

 

Anyway working on a site hosted by Dreamhost.  Its video stuff so I have installed mencoder ffmpeg flvtool2 lame etc etc.

 

I have a couple of questions...

 

I can run the mencoder from the command line successfully BUT when I run it from a php exec command it doesn't work.  Each time I login I have to enter the folowing so that the correct apps are used...

 

export TMPDIR=$HOME/tmp

export PATH=$HOME/bin:$PATH

export LD_LIBRARY_PATH=$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH

export CPATH=$HOME/include:/usr/local/include:$CPATH

export LIBRARY_PATH=$HOME/lib:/usr/local/lib:$LIBRARY_PATH

 

Now I need to set the PATH permanently - I did post on the forums on there and a guy replied saying I shoudl look at Invocation in men bash...

 

Problem being that I would LOVE to know what the hell he is on about.

 

Apologies but if anyone could be so kind I kinda need a hand holding session on this...

 

Thanks you lovely lovely people.

Link to comment
Share on other sites

You can set variables perminently in your .bashrc file.

 

I can run the mencoder from the command line successfully BUT when I run it from a php exec command it doesn't work.

 

PHP usually runs as the Apache user or something simular, so setting the variables in your .bashrc won't make any difference. You simply need to pass the full path to the executables. eg;

 

<?php exec('/usr/local/bin/ffmpeg foo'); ?>

Link to comment
Share on other sites

thanks for the tips chaps.

 

@thorpe

 

I am passing the full path to app but it is still failing.

 

The apps I have installed run fine in command line but php just can't seem to call them and I can't for the life of figure why.

 

ANY ideas will be VERY welcome...

 

Thanks everyone

Link to comment
Share on other sites

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.