shanka Posted August 31 Posted August 31 (edited) Hi, My account (username: shanka) was recently moved to the rebuilt Tommy server. Two Python CGI scripts that worked on the old server until 31 July 2026 have stopped working after the move. The scripts previously used: #!/usr/bin/env python3.12 Plesk's Apache error log now reports: /usr/bin/env: 'python3.12': No such file or directory Could you please confirm the correct Python interpreter/shebang to use for Python CGI scripts on the new Tommy server? In particular, which Python version and path should replace python3.12? The account-move email also said that Python modules are not transferred to the new server. The two scripts require these third-party Python packages: aiohttp pandas mysql-connector-python requests beautifulsoup4 Could you please install/enable these modules for the Python version currently supported for CGI on my account? Both scripts also contain cgitb.enable(). I understand that cgitb was removed in Python 3.13, so I will remove that code if the supported Python version is 3.13 or newer. Thanks. Edited August 31 by shanka
wolstech Posted August 31 Posted August 31 The new Tommy has 3.14 instead of 3.12. The modules you listed are already installed. https://tommy2-info.heliohost.org/pyinfo/info3.14.py
shanka Posted September 1 Author Posted September 1 Hi, Thanks for confirming that Tommy 2 uses Python 3.14 and that the required Python modules are already installed. I have done some further testing, and I believe there is a CGI configuration/execution issue with my account after the migration. My original Python CGI scripts now fail with: /usr/bin/env: 'python3.12': No such file or directory I then created a minimal Python CGI using the interpreter you confirmed: #!/usr/bin/python3.14 print("Content-Type: text/plain") print() print("Python 3.14 CGI works") This also returns HTTP 500. The Apache error log says: End of script output before headers: test4.py I then tested CGI independently of Python with this minimal shell CGI: #!/bin/sh echo "Content-Type: text/plain" echo echo "CGI shell works" This also returns HTTP 500, with: End of script output before headers: shelltest.cgi Therefore even a minimal shell CGI in /httpdocs/cgi-bin/ is unable to produce CGI output. Could you please check whether CGI/suexec/handler configuration or permissions for my subscription's /httpdocs/cgi-bin/ directory were affected during the Tommy 2 account migration? The affected directory is: /home/shanka.helioho.st/httpdocs/cgi-bin/ The Python interpreter and modules appear to be available according to the Tommy 2 Python diagnostic, so I believe the remaining issue is specific to CGI execution for my account. Thanks.
shanka Posted September 2 Author Posted September 2 @Krydos, please can you help with the above. Thanks!
shanka Posted Friday at 01:46 AM Author Posted Friday at 01:46 AM Please, any one can help with this? Thanks!
shanka Posted Friday at 05:05 AM Author Posted Friday at 05:05 AM This has been resolved. No action required. Thanks.
Recommended Posts