Greetings! I use IIS to run my localhost. I have a form on the website where a user enters some data, then PHP gets these data and should run Python script. To run it I try to use following commands:
<?php
shell_exec("python script_folder/test.py");
?>
and
<?php
exec("python script_folder/test.py");
?>
but nothing happens. Python script is trivial:
importtime
print("It works!")
time.sleep(3)
I guess there is an issue with permissions. Possibly a user that connects website doesn't have privilege to use cmd.
In my opinion use IIS 10 and which type of user is?
Regards,
Jalpa.
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
No need to delete iis 6. just use iis 10 and add site in iis10.
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
Is your site is working well before hosting in IIS?
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.
5 Posts
IIS6 win 10 cmd
May 28, 2019 11:14 AM|AndreySignet|LINK
Greetings! I use IIS to run my localhost. I have a form on the website where a user enters some data, then PHP gets these data and should run Python script. To run it I try to use following commands:
<?php
shell_exec("python script_folder/test.py");
?>
and
<?php
exec("python script_folder/test.py");
?>
but nothing happens. Python script is trivial:
import time
print("It works!")
time.sleep(3)
I guess there is an issue with permissions. Possibly a user that connects website doesn't have privilege to use cmd.
Could you please help how to proceed?
1616 Posts
Re: IIS6 win 10 cmd
May 29, 2019 02:06 AM|Jalpa Panchal|LINK
Hi AndreySignet,
In my opinion use IIS 10 and which type of user is?
Regards,
Jalpa.
5 Posts
Re: IIS6 win 10 cmd
May 29, 2019 09:20 AM|AndreySignet|LINK
A user is a regular user visiting a website
1616 Posts
Re: IIS6 win 10 cmd
May 29, 2019 09:29 AM|Jalpa Panchal|LINK
No need to delete iis 6. just use iis 10 and add site in iis10.
5 Posts
Re: IIS6 win 10 cmd
May 29, 2019 09:31 AM|AndreySignet|LINK
Alright, thanks! So how to proceed with the original question?
1616 Posts
Re: IIS6 win 10 cmd
May 29, 2019 09:36 AM|Jalpa Panchal|LINK
Is your site is working well before hosting in IIS?
5 Posts
Re: IIS6 win 10 cmd
May 29, 2019 09:42 AM|AndreySignet|LINK
My site is working well while hosting IIS. I just can't understand why shell_exec() php command doesn't work
1616 Posts
Re: IIS6 win 10 cmd
May 29, 2019 09:43 AM|Jalpa Panchal|LINK
did you get any error message?
5 Posts
Re: IIS6 win 10 cmd
May 29, 2019 09:46 AM|AndreySignet|LINK
No, no messages, other script works well, page opens but shell_exec() is not executed
1616 Posts
Re: IIS6 win 10 cmd
May 29, 2019 09:54 AM|Jalpa Panchal|LINK
check that you give all permission to iis_iusr and iusr to run the script.
You could also refer below post for more detail:
https://stackoverflow.com/questions/2294034/how-to-get-shell-exec-to-run-on-iis-6-0