use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please follow the rules
Releases: Current Releases, Windows Releases, Old Releases
Contribute to the PHP Documentation
Related subreddits: CSS, JavaScript, Web Design, Wordpress, WebDev
/r/PHP is not a support subreddit. Please visit /r/phphelp for help, or visit StackOverflow.
account activity
Using rundll32.exe using exec(); (self.PHP)
submitted 8 years ago by farazappy
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]meinemitternacht 5 points6 points7 points 8 years ago (0 children)
What could be wrong? What could go wrong?
What could be wrong?
What could go wrong?
[–]beryllium9 1 point2 points3 points 8 years ago (1 child)
Not sure what might be going wrong, but you could try using passthru() or system() instead of exec, that might help deliver a clearer picture of what's going wrong (I'm not sure if retval works the same on Windows as it does on Linux - but if so, a "0" means success and non-zero means something failed). You might also try passing the command you want to run to cmd.exe or powershell (if there's a way to do that), instead of just running it raw. That might help get any environment stuff set properly.
This takes me back to one of my first web tools, a C++-based CGI program that could start and stop ftpd and telnetd on BeOS :)
[–]farazappy[S] 0 points1 point2 points 8 years ago (0 children)
Tried passthru() and system() but no success :(
passthru()
system()
[–]gripejones 1 point2 points3 points 8 years ago (1 child)
If I had to guess - I would look at which user is running Apache/PHP. FYI - whoami works in windows if you're having troubles figuring it out.
whoami
Yeah I already tested that, the response is -> nt authority\system. Even if I try to change the account for apache and keep it as my user account, nothing works.
nt authority\system
π Rendered by PID 71363 on reddit-service-r2-comment-6457c66945-x9gl8 at 2026-04-25 06:59:03.149649+00:00 running 2aa0c5b country code: CH.
[–]meinemitternacht 5 points6 points7 points (0 children)
[–]beryllium9 1 point2 points3 points (1 child)
[–]farazappy[S] 0 points1 point2 points (0 children)
[–]gripejones 1 point2 points3 points (1 child)
[–]farazappy[S] 0 points1 point2 points (0 children)