Jump to content

EXEC()


patrickMast

Recommended Posts

Hi there,

 

I once wrote a PHP-script to run a Prolog query.

 

I used exec() to call prolog. When i tried to find the bug I recognized some strange behavior:

The call exec("uptime", $result, $return_var); is working as expected:

  $result is the uptime string

  $return_var=0

 

But the call exec("ls", $result, $return_var); is NOT working:

  $result is an empty array

  $return_var=2

 

The script is hosted on the server of our university.

 

Does anyone have a clue why some commands do work and others don't? Or does anybody know what the return value "2" does mean?

 

Thank you for your help!

 

Patrick

Link to comment
https://forums.phpfreaks.com/topic/127158-exec/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.