修复错误后内部服务器错误仍然存​​在但新的相同文件是否成功?

After migrating a website's source PHP and database to a new server, there were a few database connection errors producing 500.

Those were fixed quickly. However, files that were previously displaying Internal Server Errors are still doing so.

Following is a step-by-step of what happens currently.

Before:

  1. load website.com/something.php Receive 500 server error, because something.php includes another file that had errors to trigger the 500.

Now:

  1. fixed another file that had errors to trigger 500.
  2. load website.com/something.php (receive 500 server error)
  3. duplicate file something.php to something2.php on server
  4. load website.com/something2.php (no error everything operational)
  5. rename something.php to something3.php
  6. load website.com/something3.php (500 error)
  7. rename something2.php to something.php
  8. load website.com/something.php (no error)
  9. load website.com/something3.php (500 error)

UPDATE

No cache mechanism is installed (that I am aware of) but I should have mentioned these points:

  1. empty something3.php and replace with: <?php echo "Hello world";
  2. load website.com/something3.php (500 error)

The file permissions were unsuitable for the setting (shared host).

The something.php renamed to something3.php had 0664, rather than 644.

This comes up in google searches, for "group writable 500", and is noted on many shared hosts, related to suPHP.

I manage my own server with my own host and normally I use group writable permission for files and directories, so this was a counter-intuitive issue. I had noticed the something3.php (0664) and something2.php (644) difference before posting this Q&A, but I had no idea a group-writable permission would trigger 500 errors. Plus they don't for me in my own hosting machine.

Hope this helps someone else. I will try to update the question to be more descriptive for future reference.

Thanks for everyone's help.