Knowledge base
1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
Solve a Perl or Python script problem
This guide details the use of scripts Perl or Python on Web hosting Infomaniak.
Preamble
- Perl and Python scripts are often used with Apache's CGID module to generate dynamic content on web servers.
- This module allows Apache to process queries using scripts written in Perl or Python via the CGI (Common Gateway Interface) protocol, thus providing the opportunity to create interactive and responsive web pages based on user interactions with the site.
- However, for safety reasons, Infomaniak chose to disable the ability to execute scripts written in Perl or Python via this specific Apache module (CGID) on its shared hosting offers.
- Therefore, consideration should be given to: change offer for a Cloud Server offer if you are currently on shared web hosting.
Using scripts
Here are some practical information:
- The location (path) of the python interpreter is
/usr/bin/python
. mod_python
is not supported.- Running scripts without extension
pl
orcgi
is not possible however a file.pl
can exist and be called via a URL without the extension.
If you get the following error message:
CGIWrap Error: Execution of this script not permitted
Execution of that script is not permitted for the following reason:
(1) Script file not found.
Request Data:Extra Path Info: /dossier/wwwdata/collection/vignettes/blabla.PL.12.34.56.gif
while the loaded file is a simple GIF image with a file name of type "blabla.PL.12.34.56.gif
"It comes from the name of the files in question. To get around the problem, Just rename your files.
Link to this FAQ: