logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Coding & Scripting Corner View previous topic :: View next topic
Reply to topic   Topic: shell_exec exec permissions to run in full mode
Author
pq_rar



Joined: 10 Nov 2015
Posts: 2
Location: usa

PostPosted: Mon 24 Sep '18 19:00    Post subject: shell_exec exec permissions to run in full mode Reply with quote

Hello,
I am trying to run an exe but it always runs in demo mode from PHP(not running with full privileges I guess):
Code:
$source="D:\\temp\\anonym";
shell_exec('"C:\Progra~1\NeoLogica\DICOMAnonymizerPro\DICOMAnonymizerProCmdLine.exe" -inputPaths "'.$source.'" -outOverwriteOrig 2>&1');

If I run the same command in cmd, it runs ok. I also tried to run Apache as different users in Services. No luck. I am attaching my Apache and PHP config files.
Apache:https://drive.google.com/file/d/1KulHYiygrgE_j7SoNaRipMdWKaz0ucoE/view?usp=sharing
PHP: https://drive.google.com/file/d/1AbvWE4DhIwvkK5ROY4Vi0NvnkTDnp3mq/view?usp=sharing
I will be really really appreciate if somebody can guide me in what am I doing wrong and/or what to try.
Thanks
Back to top
spser



Joined: 29 Aug 2016
Posts: 97

PostPosted: Wed 26 Sep '18 10:16    Post subject: Reply with quote

windows?

try exec function:

Code:
<?php

// test
$ret = exec('tasklist.exe /V /FO CSV', $out,$errcode);
echo '<pre>';

var_dump('errorcode'.$errcode);
var_dump('retData:'.$ret);
print_r($out);
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7288
Location: Germany, Next to Hamburg

PostPosted: Tue 16 Oct '18 23:14    Post subject: Reply with quote

2>&1 ?? That is a linux thing.
Back to top


Reply to topic   Topic: shell_exec exec permissions to run in full mode View previous topic :: View next topic
Post new topic   Forum Index -> Coding & Scripting Corner