This site can’t be reached:localhost refused to connect - xampp

I am trying to open the index of my C:\xampp\htdocs folder, but when I try:
localhost:8000
or
localhost:8000/index
It shows:
This site can’t be reached
localhost refused to connect.
Search Google for localhost 8000 index
How can I open index of htdocs folder on my browser?
Even when I tried :
localhost:8000/wordpress
It showed same error:
This site can’t be reached
localhost refused to connect.
I don't understand what is the problem?

make sure you have xampp turn on, also check if thers any error xampp shows
make sure your are using right port ie. localhost:80000 u can check it with config file

Related

Laravel Valet Share Error: "dial tcp [...] no such host"

I just installed Laravel Valet. Everything works perfectly, except for the site sharing function.
After typing
valet share
Terminal returns the following output, right before Ngrok opens:
grep: /Users/myname/.config/valet/Nginx/myurl*: No such file or directory
Ngrok gives me a public URL, but my browser returns a page with title Failed to complete tunnel connection and error message dial tcp: lookup myurl.test on 192.168.0.1:53: no such host.
How do I solve this?
Solution for laragon
If you are using any VPN, then turn it off and then reload laragon.

WAMP, Windows 10 : #2002 - No connection could be made because the target machine actively refused it. —

I tried to login to phpMyAdmin in WAMP + Windows 10. But I got the following errors when I tried to login as root ( no password )
#2002 - No connection could be made because the target machine
actively refused it. — The server is not responding (or the
local server's socket is not correctly configured).
mysqli_real_connect(): (HY000/2002): No connection could be made
because the target machine actively refused it.
It will be great if someone can help me out. Thanks.
PS : The WAMP icon is Orange in colour
PS 2 : I closed Skype from Task manager using End Task
Open my.ini file by left clicking wampp and opening MySQL menu. Search socket and write
socket = /tmp/mysql.sock
And save it.

Object not found in xampp (running apache service)

Object not found!
The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.
If you think this is a server error, please contact the webmaster.
Error 404
localhost
Apache/2.4.17 (Win32) OpenSSL/1.0.2d PHP/5.6.14
i did run apache service and mysql and i have htdocs in xampp, also having index.php...
help?
also, while i'm trying to make sure i installed everything (i followed wikihow tutorial) i clicked on the mysql admin section and it leads me to http://localhost/phpmyadmin/ but when i click on the apache admin it just leads me to http://localhost/dashboard/...
i created new folder named try inside xampp and tried again my code was
<?php
echo "<h1>hey, buddy!</h1>";
?>
i called this hi.php
localhost/try/hi.php
then tried to access it but... nothing

How to setup FTP on xampp

i want to make a server using xampp. i have already installed xampp and setting port 8080. php and mysql work fine but i can't access ftp from internet. Can you please suggest way how can I do this?
XAMPP comes preloaded with the FileZilla FTP server. Here is how to setup the service, and create an account.
Enable the FileZilla FTP Service through the XAMPP Control Panel to make it startup automatically (check the checkbox next to filezilla to install the service). Then manually start the service.
Create an ftp account through the FileZilla Server Interface (its the essentially the filezilla control panel). There is a link to it Start Menu in XAMPP folder. Then go to Users->Add User->Stuff->Done.
Try connecting to the server (localhost, port 21).
XAMPP for linux and mac comes with ProFTPD. Make sure to start the service from XAMPP control panel -> manage servers.
Further complete instructions can be found at localhost XAMPP dashboard -> How-to guides -> Configure FTP Access. I have pasted them below :
Open a new Linux terminal and ensure you are logged in as root.
Create a new group named ftp. This group will contain those user accounts allowed to upload files via FTP.
groupadd ftp
Add your account (in this example, susan) to the new group. Add other users if needed.
usermod -a -G ftp susan
Change the ownership and permissions of the htdocs/ subdirectory of the XAMPP installation directory (typically, /opt/lampp) so that it is writable by the the new ftp group.
cd /opt/lampp
chown root.ftp htdocs
chmod 775 htdocs
Ensure that proFTPD is running in the XAMPP control panel.
You can now transfer files to the XAMPP server using the steps below:
Start an FTP client like winSCP or FileZilla and enter connection details as below.
If you’re connecting to the server from the same system, use
"127.0.0.1" as the host address. If you’re connecting from a different
system, use the network hostname or IP address of the XAMPP server.
Use "21" as the port.
Enter your Linux username and password as your FTP credentials.
Your FTP client should now connect to the server and enter the /opt/lampp/htdocs/ directory, which is the default Web server document root.
Transfer the file from your home directory to the server using normal FTP transfer conventions. If you’re using a graphical FTP client, you can usually drag and drop the file from one directory to the other. If you’re using a command-line FTP client, you can use the FTP PUT command.
Once the file is successfully transferred, you should be able to see it in action.
I launched ubuntu Xampp server on AWS amazon.
And met the same problem with FTP, even though add user to group ftp SFTP and set permissions, owner group of htdocs folder.
Finally find the reason in inbound rules in security group, added All TCP, 0 - 65535 rule(0.0.0.0/0,::/0) , then working right!
On XAMPP click "Start" and after "Admin".
Login to localhost (127.0.0.1) without password, with second port, not with 21.
Add users and passwords, change your settings. Quit.

XAMPP "module 'mysqli' already loaded" error?

Had XAMPP configured and running properly, was able to access phpmyadmin and execute php code on the local server. This morning after starting XAMPP and starting Apache, I get a message saying: "module 'mysqli' already loaded."
I can't log into phpmyadmin- I see the login page, but when I click "go" I simply get a blank page. I was practicing submitting forms into a DB, everything was working fine, now after submitting the form a message comes back: "connect failed with: (2002) A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. "
The XAMPP status page shows everything as being activated. I don't remember making any config changes or doing anything else that could have caused this.
Appreciate any input.
I fixed this by editing my php.ini and commenting these lines back out:
;extension=php_mysqli_mysqlnd.dll
;extension=php_mysqli_libmysql.dll
and typing in this line in their place:
extension=php_mysqli.dll
Worked perfectly.
disable or comment duplicate extension=mysqli in your php.ini
Open your php.ini file and comment out the duplicate line below
extension=mysqli
;extension=mysqli

Resources