LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-24-2011, 02:16 PM   #1
georgejc
LQ Newbie
 
Registered: Jun 2006
Distribution: Arch Linux
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, 02:27 PM   #2
Nominal Animal
Senior Member
 
Registered: Dec 2010
Location: Finland
Distribution: Xubuntu, CentOS, LFS
Posts: 1,723
Blog Entries: 3

Rep: Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948Reputation: 948
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, 10:03 PM   #3
georgejc
LQ Newbie
 
Registered: Jun 2006
Distribution: Arch Linux
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



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

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

All times are GMT -5. The time now is 08:53 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