milan
-
Posts
5 -
Joined
-
Last visited
Posts posted by milan
-
-
Dear Krydos,
Here's the error once again with the actual path to my local php file:
XMLHttpRequest cannot load file:///C:/Users/milan/JavaScript/MySQL_posting/heliohost_mySQL_connectMethod_remote/userInfo.php. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
Best,
Milan
-
Hey Krydos,
Yes I enabled remote connections by putting the wildcard % in the list of hosts - this is an error that popped up regardless of that.
Best,
Milan
-
Hey, Krydos, thanks! It worked on the local domain!
When I try to connect remotely I get the following error:
XMLHttpRequest cannot load [path to my php file connect file]
Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https
Any advice on how to go from there?
Thanks a lot!
Best,
Milan
-
Hi eveyone!
I am using the following code to connect to my mySQL database:
<?php// Create connection$conn = mysqli_connect('localhost', 'database_user_name', 'database_password');// Check connectionif (!$conn) {die("Connection failed: " . mysqli_connect_error());}mysqli_select_db($conn,"database_name");?>I tried several variants of this, replacing parameters:
mysqli_connect('tommy.heliohost.org', 'database_user_name', 'database_password');
mysqli_connect('localhost', 'database_name', 'database_password');
mysqli_connect('tommy.heliohost.org', 'database_name', 'database_password');
None of those seem to work. Could you please help me out figure out which host, username and password I should use to make this work. To note, my website is currently hosted on tommy.heliohost.org. Is this also true for mySQL database?
In the next step I will be trying to connect remotely and it would be cool if you also let me know what the hostname for the external world looks like, and how do i log onto it.
Thank you very much!
Best,
Milan
Connecting To Mysql Database
in Customer Service
Posted
Hi Krydos,
Thanks for your explanation, that is very helpful. I tried some of the followup suggestions from the stackoverflow post: running a local server using python, or using the npm http-server in windows command line, but those servers do not support the ajax post method. I also tried opening chrome with --allow-file-access-from-files but that doesn't seem to change anything.
Do you have any recommendations/pointers for a simple solution?
Thanks a lot!
Milan