Hello, I’ve created a AJAX script to send mails, I’ve tested my code in localhost and everything worked fine. But, in my website, the request has an error.
jquery.min.js:2 POST https://omsistuff.ga/php/lib/bugreport.php net::ERR_FAILED
I’ve set a code to show ajax request error but it’s work only in local. I see that the php file that analyse my request is marked in red in the network console, but I d’ont fine revelant informations.
My website : omsistuff.ga / omsistuff.rf.gd
And the ID of the modal button : #feedback-dialog
Hello, I forgot to specify this but I use PHP mailer and it’s work without AJAX.
Otherwise, that’s the request response in my localhost vs the online version :
As far as what I’m aware sending emails using PHP is not allowed and won’t work here because it uses to much server resources.
I saw that PHP Mailer has some options to choose on how your emails will be sent, it could be mail() and SMTP, but mail() is strictly forbidden here.
Sending emails has worked very well for me for a long time, using PHP mailer. I followed the guide proposed on this same forum. The question being, in localhost, I manage to get an response from my php file, but here, I don’t even have an error response. And I wanted to know why?
You mean it has worked for your here for a long time? If that’s not what you meant then PHP Mailer won’t work here if you are using the mail() option which is strictly forbidden here.
Not really sure about that but it’s probably because the security system blocked that request since it identified you’re using php mail().
From where are you sending Ajax request Exactly? ERR_FAILED means that it is denying your AJAX, it’s either internet problem or your sending request from another domain.
OK, I found my error, I’ve a rewrite rules on my site, that remove extensions name. I just need to remove .php in this line : '/php/lib/bugreport.php',
And know, all working fine. Thanks anyway for your answers.