Jump to content

Daniel On The Web

Members
  • Content Count

    23
  • Joined

  • Last visited

Everything posted by Daniel On The Web

  1. Well, guess what: I contacted with the admin of the domain I'm using to create a database for me and tried to connect to it via PHP. And it worked. Anyway, thank you for all your help.
  2. As I thought I did something wrong, I decided to start over on a Mac. PHP works even without XAMPP, so I believe that the service to upload my webpage supports PHP. Now I'm thinking about reinstalling MySQL and phpMyAdmin in the Mac and test it again. Anyway, useful info to check what's the right port.
  3. There's one my.ini in the XAMPP MySQL \bin folder. There's also my-huge.ini, my-innodb-heavy-4G.ini, my-large.ini, my-medium.ini, my-small.ini in xampp\mysql. There's no my.cnf, however.
  4. User name: any Host name: localhost Password: no Global privileges: usage User group: - Grant: no User name: pma Host name: localhost Password: no Global privileges: usage User group: - Grant: no User name: root Host name: 127.0.0.1 Password: no Global privileges: all privileges User group: - Grant: yes User name: root Host name: ::1 Password: no Global privileges: all privileges User group: - Grant: yes User name: root Host name: localhost Password: no Global privileges: all privileges User group: - Grant: yes
  5. It appears to me as "Privileges", but I think it's the same. The user I tried to use to connect to the database is: User name: root Host name: localhost Type: global Privileges: ALL PRIVILEGES Grant: Yes
  6. With MySQLi: No connection could be made because the target machine actively refused it. With PDO: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it. So they are the same. The console works well. The problem is connecting to the databases using PHP. And I'm using a PC.
  7. I tried with MySQLi but got the same error. Actually I don't care about using PDO or MySQLi. I'm choosing what works best.
  8. Like this?: extension=php_pdo_mysql.dll Because that's how it appears on my php.ini. And it's not commented. I'm already using it.
  9. I checked the port it is using and it's 3306. But I still find the message that says me that the connection failed.
  10. Checked. It wasn't the firewall. Strange. Could I have to change some configuration file?
  11. Yes, I configure it but it doesn't work as it should. I admit that it's weird.
  12. Both "localhost" and "localhost:3306" didn't work as servers.
  13. Of course. I know that I shouldn't post such kind of information. However, I set up an user, a host and a password and wrote the same information in the PHP and the code is still throwing the error.
  14. I used Port 81 because I had to change it when preparing Apache. And the MySQL process was active.
  15. <?php $serv = "localhost:81"; $user = "root"; $password = ""; try { $con = new PDO("mysql:host=$serv;dbname=test", $user, $password); $con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); echo "Successfully connected."; } catch (PDOException $e) { echo "Connection failed: " . $e->getMessage(); } ?> Here I'm trying to use PDO to connect to my SQL database "test". However, I receive this error each time I connect: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it. Am I connecting with the wrong server, user
  16. Ok. I went through the file httpd.conf of the Apache Module and changed the port to listen from. Now it's port 81. And it worked. However, when I type http://localhost I found an error 404 even with Apache activated. And what I am supposed to see is the XAMPP page. What else do I have to do? Edit: I changed the main port for Apache to 81 as well and typed http://localhost:81. This took me to the XAMPP page. Now I have to configure PHP and Apache so I can use them in my website.
  17. But... what else could be? If we don't find what is blocking port 80 I'll have to change the port to listen from.
  18. I don't have Skype. It has to be another thing.
  19. Hello everyone. I tried to install and configure PHP and MySQL for use on my own website using XAMPP. However, the Apache module gives me an error each time I try to start it. 10:40:53 [main] Starting Check-Timer 10:40:53 [main] Control Panel Ready 10:41:07 [Apache] Problem detected! 10:41:07 [Apache] Port 80 in use by "Unable to open process" with PID 4! 10:41:07 [Apache] Apache WILL NOT start without the configured ports free! 10:41:07 [Apache] You need to uninstall/disable/reconfigure the blocking application 10:41:07 [Apache] or reconfigure Apache and the Control Panel to l
  20. This problem has been solved. Thank you for all your help!
  21. So, in order to solve the issue, I have to: Download XAMPP or something similar and set up a test server on my own computer. Make sure the page and the XML are both in that server. I have downloaded XAMPP, but now the question is, how do I create my test server?
  22. So I should create a server using a domain, and then configure it to send an Access-Control-Allow-Origin HTTP header. Am I right?
  23. Hello and thank you all for bringing me into this forum. I would want to make a website about video games with news, articles, login system, etc., and I'm learning to make it with W3Schools. My issue is with the XML DOM. I tried to use JavaScript to add XML data (in the form of a news list) to my HTML page, so I used the following JavaScript code: var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (xhttp.readyState == 4 && xhttp.status == 200) { newsDisplay(xhttp); } }; xhttp.open("GET", "news.xml", true); xhttp.send(); function newsDisplay(xml
×
×
  • Create New...