Error 500 is commonly a php error.
A very common cause is using an incompatible php version. In newer versions (from 7.0 and onwards) mysql extension is removed and has been replaced with mysqli and PDO that are more secure. If you believe this is a possible reason for your code you need to switch to php version 5.6 (can be done under "Extra Features").