Jump to content

exec() white page


asmith

Recommended Posts

Hi,

 

I have a vps and as root, (on my CLI: 'php -a'), I run this code:

 

exec('/home/public_html/programs/execFile', $output);
echo '<pre>'.print_r($output,true).'</pre>';

 

and it works fine and prints the data it supposed to show.

I put same code in a php script an run it, it gives me:

Array

(

)

 

Someone told me the php from CLI has different php.ini than the one webserver uses.

The php.ini I know is located at:

/etc/php5/cgi/php.ini

and safe_mod is off there.

 

Any idea?

Link to comment
Share on other sites

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.