Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 27852

Access cmd via PHP

$
0
0

Hi there

I try to access the command line via PHP (5.4.9) on my Server 2008 R2. When i run the following php code:

<?php
$result = 0;$resultstr = system('echo %PATH%', $result);echo $resultstr;
?>

When i execute the code i got: PHP Warning: system(): Unable to fork [echo %PATH%]

I already tried these things:

  • The Website and the assigned APP-Pool are running with an local administrator account
  • Give Everyone permissions to execute cmd.exe
  • Copying the cmd.exe to the same folder where the .php File is.

Does anyone know a solution for my problem?

Thanks very much :)

Regards,

Simon




Viewing all articles
Browse latest Browse all 27852

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>