LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Configure Php for wget.....Anybody????? (https://www.linuxquestions.org/questions/linux-software-2/configure-php-for-wget-anybody-426832/)

rajnair0278 03-21-2006 01:46 AM

Configure Php for wget.....Anybody?????
 
When I type wget http://xxx.xxx.xxx.xxx/file.csv at the shell prompt it downloads the file smoothly. However when I enter the command
<?php
exec ("wget http://xxx.xxx.xxx.xxx/filename.csv")
?>
into a download.php file and execute it in the browser it doesnot download the file. When I move this download.php file to a another php-linux server it works fine. What is my server missing?? Is php not configured to accept wget?? If so, how can i overcome the problem.

Any steps and suggestions will be appreciated. My php version is 4.2.2. This is inspite of installing 5.1, phpinfo() still shows the installed version as 4.2.2

Pls, anybody out there....???

nixcraft 03-21-2006 02:13 AM

For security causes many sys admin blocks access to shell via exec and system (and other calls)
Or your apache web server runs in chrooted jail

Best way to debug this problem is to check apache log file and php log file

rajnair0278 03-21-2006 02:30 AM

Thx nixcraft that suggestion was really helpful. The /var/httpd/logs/error_logs clearly mentions Permission denied: for all the time I was trying the download option. So now I know thats the reason. Now which files permission should I change to enable this download. My apache is installed in /usr/local/httpd and php in /usr/local/php.
Feeling better now that we have zeroed in on the problem?? Thx again.


All times are GMT -5. The time now is 12:09 PM.