alewis Posted Tuesday at 11:56 AM Posted Tuesday at 11:56 AM Hello My website (https://alewis.helioho.st/savagephotos/ ) was working the last time I visited it. But now, despite the fact that I have made no changes, it gives a "500 Internal Server Error" message. The entries in the log file are: [Tue Nov 12 11:37:47.451346 2024] [cgid:error] [pid 1551276:tid 1551321] [client 82.17.75.43:0] failed to open log file /var/log/httpd/suexec_log: /home/alewis.helioho.st/httpdocs/savagephotos/index.cgi, referer: https://helionet.org/ [Tue Nov 12 11:37:47.451494 2024] [cgid:error] [pid 1551276:tid 1551321] [client 82.17.75.43:0] fopen: Permission denied: /home/alewis.helioho.st/httpdocs/savagephotos/index.cgi, referer: https://helionet.org/ [Tue Nov 12 11:37:47.452069 2024] [cgid:error] [pid 1551276:tid 1551321] [client 82.17.75.43:0] End of script output before headers: index.cgi, referer: https://helionet.org/ So it appears that index.cgi cannot run because suexec_log cannot be opened? I don't think I have access to that file to check what is happening? I would be grateful if somebody could look into it. Many thanks Andy
wolstech Posted Tuesday at 12:44 PM Posted Tuesday at 12:44 PM When was the last time this worked? I ask because looking at the index.cgi for savagephotos, it's shebang line is looking for Python 2.7 which hasn't been available since the Tommy migration (server only supports 3.9 and 3.12 now).
alewis Posted Tuesday at 07:23 PM Author Posted Tuesday at 07:23 PM I usually check it every 30 days when I get reminded to log in to my account, but I might have missed doing that the last time. So it could be a couple of months since it worked. When was the Tommy migration? Anyway, it looks like I need to migrate my code to Python 3. I'll do that and see whether that fixes the problem. Thank you Andy
wolstech Posted Tuesday at 07:34 PM Posted Tuesday at 07:34 PM Your account moved to the new Tommy on September 27th, and the old Tommy2 server was retired shortly thereafter.
alewis Posted Tuesday at 07:43 PM Author Posted Tuesday at 07:43 PM OK, I have updated the code in index.cgi to Python 3, and the text on the page now displays. But photos on the page are not being displayed. Is it possible that the PIL module (Python Imaging Library, now known as "pillow") was not reinstalled when the migration occurred? Could you check, and install it if it is missing? Many thanks! Andy
wolstech Posted Tuesday at 07:50 PM Posted Tuesday at 07:50 PM The pillow module is already available on 3.12 but is not installed for 3.9. Which Python version are you using (not at a PC so can’t look at the file again right now)?
alewis Posted Tuesday at 08:15 PM Author Posted Tuesday at 08:15 PM OK, I've changed the shebang line to reference Python 3.12 specifically now. But still no images unfortunately. The error log says it is sendthumb.cgi which is failing, but I can't see anything in there which needs to change between Python 2 and Python 3. So I'm a bit stuck at the moment. Thanks for your help! Andy
wolstech Posted Tuesday at 10:06 PM Posted Tuesday at 10:06 PM ModuleNotFoundError: No module named 'StringIO': /home/alewis.helioho.st/httpdocs/savagephotos/sendthumb.cgi That's your issue. Looks like io.BytesIO is the replacement based on a quick google.
alewis Posted Wednesday at 03:03 PM Author Posted Wednesday at 03:03 PM Thank you! Where are you seeing this error? It's not in error_log - the messages there are not as helpful. I've switched to io.BytesIO but still no images. So I suspect the problem has just shifted somewhere else, but with only the generic message from error_log it's hard to know where. Andy
wolstech Posted Wednesday at 06:57 PM Posted Wednesday at 06:57 PM You can view them in Plesk. Under your domain in the Dev Tools section there's an option for Logs. The errors show up in the details of the 500 errors.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now