MessageBird API not working on Domain

Hello everyone, while coding a program that allows people to be notified through SMS using MessageBird API, I have encountered a problem when I’m using it in a domain namely,

To expound further, the code works fine when I’m on a localhost, my guess is that I have the autoload.php directly linked like “E:\xampp\htdocs\program\vendor\autoload.php” but when I’m doing the same process on a domain, I’m getting errors such as “chrome-error://chromewebdata/:1 Failed to load resource: the server responded with a status of 500 ()” and “VM508:6745 crbug/1173575, non-JS module files deprecated.”

After some time trying to solve this problem through reading debug logs and constantly seeing HTTP ERROR 500, I can say that the page can’t find the required php file even if its linked correctly to my knowledge, thus resulting in the errors stated above. I would also like to know if it actually a problem on my end since I’ve been debugging for three days straight and its still a recurring problem. I would greatly appreciate some feedback and advice on how to solve this problem.

This is the source code that gives the HTTP Error, if needed.

Take note of this

In the shared file, I see you’re trying to require the file through the full URL But the use of HTTP URLs to include files is disabled on our hosting because it’s a really bad idea for security and performance to load PHP code over HTTP.

Instead, always include and require files using paths pointing to files in your hosting account. The best way is generally to use relative paths. So if the script you’re using and the vendor folder are both directly in the htdocs folder, you can do require './vendor/autoload.php'; to import the Composer packages.

Please don’t, it’s completely irrelevant.

Contrary to what some seem to believe, just because it’s not possible to host APIs with us doesn’t mean that it’s impossible to interact with other APIs from sites hosted with us.


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