AJAX response error

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 there,

Sending mails here using PHP mail() is strictly forbidden because it uses too much server resources.

See this article for more details:

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 :
image image

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

I’m using SMTP gmail server so it’s good and authorized.

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.

1 Like

When I’m on my https url, the script not work, and get this error, but in http url, I get a 302 found. And my Ajax request is on the same 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 :
And know, all working fine. Thanks anyway for your answers.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.