Technical article 126297

PHP cannot execute external applications with system, exec or passthru functions

OpenServer 5.0.7

Written · Last revised

Problem

When creating a simple PHP script (as below), system(),
exec() and passthru() do not work resulting in an error
message ("NoNe  SuCh=: is not an identifier") being logged
to the apache error log file.
test.php:
<?php
    system("ls");
?>

Note that PHP is working, the following script works fine:

<?php
    phpinfo();
?>

PHP safe mode is Off by default (/usr/lib/php/php.ini), the nouser account has /bin/sh as the login shell, the Apache user has been changed from nouser to a regular user (/usr/lib/apache/conf/httpd.conf)... None of these changes make any difference.

The PHP on OSR507 MP4 is 4.4.0 whereas OMS 4 uses PHP
4.3...
The system(), exec() and passthru() functions work fine on
an OMS 4 machine.

Solution

This problem has been reported to SCO engineering. fz533447

From the Xinuos technical article database, record 126297. Reproduced with permission. The original is at www.sco.com/ta/126297, which is reachable but blocked from search engines.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.