Install XAMPP server to run python , cgi-bin , PHP , scripts(Updated June 2017)
How to set up XAMPP to run Python programs and php on your own computer. SQL works also. Only tested on windows 10.All programs can be run through localhost in browser and files stored in htdocs directory in xampp.
Xampp Version 5.6.30
Python.3.6.1
Link to Python https://www.python.org/downloads/
Link to XAMPP https://www.apachefriends.org/index.html
Should be the same versions as mine in order to work.
Make sure to save Python as C:\Python3.6 using custom installation.First line of your program must direct to where python.exe is installed.Mine is #!C:/Python3.6/python.exe .You must use parenthesis with print.
Instructions:
__________________________________________________________________
1.Install xampp and python, make sure to remember the location where everything is installed.Mine are in 1 folder.
2.When both are installed, run XAMPP.
3.add test files to htdocs mine are downloadable.
4.Open the httpd.conf file in apache by clicking config but do not start apache yet.
6. Look for AddHandler cgi-script .cgi .pl .asp and add .py to it
7.Start apache
8. open a browser, type localhost and go to it. This is your homepage.
9. To run your files type localhost/ enter in name of file. eg
localhost/hello.py
10. That's it, it should work. Just make sure to have correct shebang on top of python files which shows the location of where python.exe is. Mine is #!C:/Python3.6/python.exe
11. You now should add passwords and run it offline if needed.
12.Python files need print("content-type: text/html\n\n" ) below shebang in order to work.
my httpd file :
https://www.dropbox.com/s/yhlgltz4he6ju1i/httpdXampp.conf?dl=0
Python test program : https://www.dropbox.com/s/g1f3jp4iv640qz9/hi.py?dl=0
https://www.dropbox.com/s/xuex9vd17ojihul/test.py?dl=0
Php test program :
https://www.dropbox.com/s/q5mbjh0dmotiw5f/hi.php?dl=0
Program to run in idle to find path for shebang. Just add #! before it and double check it says python or python.exe if not just change it to the result of idle program.
https://www.dropbox.com/s/f6z0je82vo6y4n9/findPath.py?dl=0
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Install XAMPP server to run python , cgi-bin , PHP , scripts(Updated June 2017)», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.