LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 05-24-2011, 03:16 PM   #1
georgejc
LQ Newbie
 
Registered: Jun 2006
Distribution: Gentoo
Posts: 27

Rep: Reputation: 15
How do I use bashrc to redirect an executable call?


Hi,

I need to redirect a /usr/sbin/sendmail command to $HOME/bin/msmtp .
The sendmail command would be coming from a PHP5 application.

I'm assuming the best way is to use .bashrc, but .htaccess is also available.

The remote server is a shared web host which is running Debian 4.0.

I do not have root access.
I have SSH access.

Any ideas?

Thanks!
 
Old 05-24-2011, 03:27 PM   #2
Nominal Animal
Senior Member
 
Registered: Dec 2010
Location: Finland
Distribution: Xubuntu, CentOS, LFS
Posts: 1,723
Blog Entries: 3

Rep: Reputation: 946Reputation: 946Reputation: 946Reputation: 946Reputation: 946Reputation: 946Reputation: 946Reputation: 946
Quote:
Originally Posted by georgejc View Post
Hi,

I need to redirect a /usr/sbin/sendmail command to $HOME/bin/msmtp .
Add
Code:
php_value sendmail_path /home/georgejc/bin/msmtp
to the relevant .htaccess file, and make sure /home/georgejc/ and /home/georgejc/bin/ and /home/georgejc/bin/msmtp are all executable (for the Apache user at least).
 
Old 05-26-2011, 11:03 PM   #3
georgejc
LQ Newbie
 
Registered: Jun 2006
Distribution: Gentoo
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks for the quick reply!

Unfortunately, when I put this in the .htaccess file, it causes a server error.

I assume I can use this, or something similar, inside a php.ini file.
I'll try that next, and post back here with my results.
 
  


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
Unix Function call to get executable's path vharishankar Programming 13 04-20-2010 01:53 PM
call the C executable inside the C is noname Programming 9 01-09-2010 10:28 AM
problem of function call address in executable file valpa Programming 12 09-05-2008 09:36 AM
Setting path: /etc/profile, /etc/bashrc or ~/.bashrc Swakoo Linux - General 1 08-07-2007 11:59 PM
Redirect Output from execvp( ) call Francinoman Programming 9 11-06-2006 03:26 PM

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

All times are GMT -5. The time now is 04:02 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration