0
votes

I've hosted a website and there is a contact form. I'm using PHPMailer and Gmail's smtp settings to send that email. The domain and email are owned by me and I've hosted the domain on free hosting service for test.

The email script works fine on my local server, but on Hostinger it displays a Error Page (500), Internal server error. I tried to enable the error logs but still I am not able to see any error.

Please help, Thanks in advance.

UPDATE I've checked the PHP and PHPMailer version on my local server as well as on Hostinger. They are exact same.

This is really basic debugging - read some docs on how to diagnose PHP problems. If you're getting an error 500, errors will appear in your web server's error log. I expect it's a problem with your host's PHP configuration, not anything wrong with your code.Synchro
But I checked the error logs. They are just blank. Even on enabling them I'm not able to see any logs.Shubham Katta
So try other options to make errors visible: ini_set('display_errors', true); etc. If it's generating a 500, it will be generating an error message somewhere!Synchro
@Synchro can you suggest any related blog or article where I can refer to it? Thanks.Shubham Katta
The logs are empty. @Synchro, tried that as well.Shubham Katta