Jump to content

Recommended Posts

Hi everyone!

 

I've got a very simple script with shell_exec that's giving me a headache! My server is a NetBSD machine running LightTPD (1.4.8nb1) and php (5.1.1nb2).

 

 

I've got the file dummy.php with the following content:

 

<?php

error_reporting(E_ALL);

$res = shell_exec("pwd 2>&1");

echo $res;

?>

 

 

When I access this file through a browser i can't see any output:

 

http://my.url/dummy.php results in a blank page that loads in no time! No error messages, neither output by the browser or in the log files (php.log and LightTPD's error.log).  ???

 

 

When I use the terminal on the servern it all works fine:

 

php /path/to/wwwroot/dummy.php gives me the working directory. Doesn't matter from which working directory I execute the command, or which user (I've tried the LightTPD user aswell). It works every time!  :o

 

 

safe_mode is off and there are no disabled_functions!

 

 

I've asked around in LightTPD forums, but they say it's a PHP problem. So, I've asked around in (other) PHP forums but noone seems to have any ideas how to solve this!  :'(

Perhaps there are expert users here that can help me, or at least redirect me to some other expert forum.

 

 

Thanks for any help!

 

/ Mikael

 

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.