Warning: session_start(): open(/var/cpanel/php/sessions/alt-php74/sess_4b17dd53fa1c2712f3b2eae2afd33fad, O_RDWR) failed: No such file or directory (2) in /home/xsofthost/public_html/help/wp-content/plugins/accelerated-mobile-pages/includes/redirect.php on line 358

Warning: session_start(): Failed to read session data: files (path: /var/cpanel/php/sessions/alt-php74) in /home/xsofthost/public_html/help/wp-content/plugins/accelerated-mobile-pages/includes/redirect.php on line 358
What is Python and How To Install Python via cPanel with Py Extension

How to install python in my cPanel and add py extension

Python normally installed on all cPanel hosting server because most of Centos/red hat update system use it.

For python apache python extension ,you only needs to activate the python handler for your apache to allow the apache server serve the py file and execute it instead of send the script to the browser as downloadable file.

What is Python:

Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together.. 

Python’s design philosophy emphasizes code readability with its notable use of significant indentation. 

Its language constructs and object-oriented approach aim to help programmers write clear, logical code for small and large-scale projects.

How to add python apache python extension Handler from your cPanel account

  • Login to your cPanel account
  • From Advance group click Apache Handlers link.
  • On create Apache Handler add the Handler cgi-script ,and in extensions add .py extension the click Add ,This will create user defined Apache Handlers.
  • Then ,change the permissions for any python file to 755 ,this permissions need it in order for suexec to execute the files.
  • In yor python .py files you can use the following #!/usr/bin/python
				
					#!/usr/bin/python
				
			
Share on facebook
Share on twitter
Share on linkedin
Share on telegram
Share on whatsapp

Related Posts