Jump to content

No changes made to website, but it now gives 500 error


Recommended Posts

Posted

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

 

Posted

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).

Posted

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

Posted

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

Posted

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)?

Posted

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

Posted
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.

Posted

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

Posted

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.

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...