Forum Moderators: coopster

Message Too Old, No Replies

Problems with executing binaries with php exec()

Blank page when system('myprogramm')

         

wieza

8:48 pm on Apr 4, 2006 (gmt 0)

10+ Year Member



Hi. I have problems with executing external programms in php with exec() and system(). When i am trying to execute some shell commands eg system('ls'), exec('whoami') there is no problem
, with my binaries (the simplest hello world program in c++) - no problem. But programms, which i've installed(./configure make make install) before, don't work.' For example i've installed cvs. When i want to open page
<?php
system('cvs');
?>
I'am getting blank page. I was trying to give whole path system('/usr/local/bin/cvs') it doesn't work.

My environment:
Suse Linux
PHP Version 4.3.4
Apache
safe_mode = Off

coopster

12:02 am on Apr 6, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, wieza.

Have you checked your error logs first to see why? Perhaps it is a permissions issue, that is likely the cause.

wieza

8:47 am on Apr 6, 2006 (gmt 0)

10+ Year Member



I can't found php errors in my logs.
In apache access_log there is information "GET /t/test2.php HTTP/1.1" 200" . In apache error_log there no information about this.

I've read somewhere that it could be problem when program which i want to execute in php is using shared libraries, but i don't know anything more.