Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
06-10-2006, 05:14 AM
|
#1
|
LQ Newbie
Registered: Jun 2006
Posts: 2
Rep:
|
exec command not working
i tried to run exec, system command with php script but not working
not able to find out any reason
/// test.php
<?
echo exec('whoami');
echo shell_exec('whoami');
echo system('whoami');
?>
but no results when tried from browser to run this file
but when i tried to run this php from prompt it works perfectly
php test.php
i could'nt find reason y this is happening
please put ur thoughts
Last edited by suruchi; 06-12-2006 at 02:00 AM.
|
|
|
06-11-2006, 12:11 AM
|
#2
|
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290
|
Probably PHP safe mode is enabled. Safe mode will prevent PHP, as invoked from Apache, from executing any executables except in precepicief directories (see the safe_mode_exec_dir parameter in your php.ini to see what this is set to). Believe me, safe mode is a good thing that helps prevent people from exploiting buggy PHP scripts to exploit your system (it's not perfect, or anywhere close, but it helps).
|
|
|
06-12-2006, 02:02 AM
|
#3
|
LQ Newbie
Registered: Jun 2006
Posts: 2
Original Poster
Rep:
|
exec not working
Quote:
Originally Posted by btmiller
Probably PHP safe mode is enabled. Safe mode will prevent PHP, as invoked from Apache, from executing any executables except in precepicief directories (see the safe_mode_exec_dir parameter in your php.ini to see what this is set to). Believe me, safe mode is a good thing that helps prevent people from exploiting buggy PHP scripts to exploit your system (it's not perfect, or anywhere close, but it helps).
|
i set safe_mode_exec_dir variable to "On" in php.ini but still not working
|
|
|
All times are GMT -5. The time now is 04:36 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|