Jump to content

lynns

New Members
  • Posts

    9
  • Joined

  • Last visited

lynns's Achievements

Member

Member (2/5)

0

Reputation

  1. Got it all working. There was an issue with the exe so the company allowed me to access it directly so I used curl. Thank you all for trying to help, I know it was frustrating for you.
  2. Oh ginerjm, you're funny. You didn't, in fact, give me an answer, now did you? You instead asked me if I read the manual on the command. Which I did, and still reached out for help. I've instituted all the suggestions on this page to no avail. I've supplied the return_value, I've checked the error logs, but none of them work. I keep asking for more help because none have worked so far. If you have something constructive to say, then say it. Otherwise please leave this space for someone to add an intelligent remark.
  3. Jacques1, I added the syntax you provided but the script did not run at all. On the webpage it threw a 500 error. I just tried it a different way and the return_value is: int(-532462766)
  4. ginejm ,while I appreciate your responses, your condescending attitude is repulsive and unhelpful. I told you upfront that I am new to this. I did try what he asked and nothing happened. In fact, the script did not run at. I'm looking for solutions, not argumentative repartee.
  5. Jacques1, thank you. I do not know the return value. How do I determine this?
  6. Thank you maxxd and ginerjm. The code I've been using to call the exec is this: <?php exec("Sample.exe -b https://website.com/restapi/api/xxxx -u name@company.com -p PASSWORD --name $Email --access 1 --affiliate $CompanyName --examples AddnewUserEx"); ?> If I call this php file from the command line, hardcode the name and affiliate, it runs properly and adds the new user in my partner's portal. However, it will not run from IIS.
  7. Ginerjm, yes I've read it and have implemented to the best of my limited abilities. I am posting on this site to ask for assistance beyond what I've been able to do so far.
  8. Thank you all for your input. I am brand new to this and trying to figure it out as I go. I changed the variables to no avail. If I could get the exec command to work I could then move to making it more secure. But so far I'm unable to get the exec command to run from this script. Again, I can run it from the command line and it works great. I need to execute the local program and it posts to a remote API. I am not allowed to post directly to the API with PHP. I am integrating this process with another company so that's not allowed.
  9. I have an HTML form where I am capturing the data, then passing it to a PHP file. Within the PHP file I want to grab specific variables and pass them to an executable. I am getting back all the lines I'm asking to ECHO before the executable and after it. However, the executable is not running. I can run the executable from the command line, but it will not process from the PHP script. I am running on Windows Server 2012 with IIS 8. Am I missing a setting in PHP or withing IIS to allow the executable to run or ??? Here is the sample PHP script. <?php echo "<h1>Thank you, your username is - " .$_POST ["Email"] . "</h1>"; /* this is working fine */ $user=$_POST["Email]; $company=$POST["CompanyName"]; $company=str_replace('','.',$company); echo $company; echo $user: /* this section is working fine */ echo "Registration Starting.\n"; /* working fine */ exec("Sample.exe -b https://website.com/restapi/api/xxxx -u name@company.com -p PASSWORD --name $Email --access 1 --affiliate $CompanyName"); /* not working */ echo "Registration Complete.\n"; /* working fine */ ?>
×
×
  • 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.