When starting XAMPP i suddenly got a new IP address. Instead of 192.168.64.2 I got 192.168.64.3. I have been looking for answers everywhere without a good advice what to do.
The biggest issue is that I can't go to my files that are on the 192.168.64.2. So what am I doing wrong or what solution is there to make XAMPP start next time on a specific IP address. I have also tried to make it start as localhost when changing in httpd.conf to Listen 127.0.0.1:80 without success!
I have also seen that some are saying that I might have xampp-vm. But as far as I know that should not be the issue.
Related
I am working on fixing a Javascript WebRTC script that gets my IP address (private, not public). It was working yesterday, then it didn't do anything at night and wasn't working this morning, and now all of a sudden it's working again. However, my private IP address seems to have changed. I do a lot of work with Javascript and Node.js, and one of the things I do with Node.js is host servers. Now, to have others be able to see that server, I need to give them my private IP. So, I have it memorized. (I'll write the first couple of digits: 10.0....). Now, when I went to run $ ipconfig in terminal (I'm on a windows), I'm getting another IP address. I checked my server, and sure enough, it's now on a new private IP, 192.16.... and it seems like my IPv6 is now my default IP. Is there a reason for this new switch? I didn't update my computer or anything like that, the switch happened as I was testing the IP tool.
Any explanation for this would be amazing. Thanks!
Edit:
Also, when I go to the IP2Location demo, it uses my IPv6, and it says I am in Washington, Seattle, when I actually am in Wyoming. What is going on here?
This happened to me a month ago. It was in the morning, my WiFi was having trouble, and so I switched my WiFi to a little AT&T WiFi box, and didn't think anything of it. However, I was testing my PHP server, and, although the server wasn't throwing any errors, my IPv4 private IP wasn't showing my server. I scratched my head for a couple of minutes, and then ran ipconfig. Sure enough, my IP had changed.
An IP address changing could be:
You moved locations
You changed your WiFi
and much more.
I am running into a problem with Homestead. I have a piece of code that works well on an online dev server, but fails in the vagrant Homestead one.
The piece of code is an ajax executed one, where I upload an image, save it in a temp directory and send it back to the user, who then crops it. For this, I have two functions, tempUpload and tempCrop. It is failing in tempCrop, and most the line that triggers it is the following:
$img = getimagesize($imgUrl);
$imgUrl is an input with the url to an image in a temp folder. Checking in vagrant, I saw that these images have attributes -rwxrwxrwx 1 vagrant vagrant. The error appearing in the console is "SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data".
Again, this works perfect in an online version, so I guess it is either a permission problem or some environment setting. The permissions for the temp folder in vagrant are as following: drwxrwxrwx 1 vagrant vagrant
I have checked in /app/storage/logs, and the error I'm getting is:
'getimagesize(http://nominate.app:8000/temp/2078ec37e959dd733930ad758854ce4cb5f175de.jpg): failed to open stream: Connection refused'
I really don't know what else to look into, specially since it is working fine in another dev environment I have, running centOS.
Any ideas?
Thanks a lot.
The answer would be to put the path rather than the url into getimagesize.
Basically, as far as your virtual machine knows, it's serving on port 80. Vagrant seamlessly forwards this port to the host machine's port 8000. When you call getimagesize, it first tries to resolve the hostname (nominate.app), and, if successful, it tries to initiate a connection to it on port 8000. I'm guessing that nominate.app is configured to resolve to 127.0.0.1 (the VM), which isn't actually listening on port 8000.
It's a bad idea to perform those sorts of operations over HTTP, since it'll slow things down and potentially generate multiple temporary copies of the same image. You can use Laravel's path helpers to help you determine the local path of the image (i.e. getimagesize(public_path() . "/temp/" . $filename)).
Changing my host file to point homestead.app to the Homestead VM's IP of 192.168.10.10 rather than 127.0.0.1 resolved this very same issue. Additionally, I can now navigate to http://homestead.app rather than http://homestead.app:8000.
Thanks to ClarkF for pointing me in the right direction to get this resolved!
As much as we don't enjoy "it works in develop but not in production", it's even more curious when it works in production but not in develop!
I would like to view my locally hosted website via an iPad or other mobile device.
I have seen that many other people have succeeded in doing this and am unsure where I'm going wrong.
I have window 7 with iis. I have tried my_ip_address/index.html in safari with and without windows firewall disabled.
I think port 80 is correct, however I also use phpmyadmin which uses port 3306 if that means anything. (I did try this though my_ip_address:3306/index.html but nothing changed)
I have also tried using the IPV4 address which gives me this error:
Not Found
HTTP Error 404. The requested resource is not found.
And IPV4 DNS Server (which is an almost identical ip address apart from the last digit) and this gives me the following error:
Object Not Found
The requested URL '/index.asp' was not found on the RomPager server.
Return to last page
I'm currently running around in circles so any help is much appreciated. Thanks
I do this without any problems.
Try http://192.168.xxx.xxx:6969 on your laptop, does it work? Try it again with the iPad (obviously using your laptops ip address which I'm guessing looks like the above)
I've found it can be sensitive about the port number but I don't know why, 6969 did work for me.
It is well known how to access XAMPP sites from another computer in the local network (by typing IP address), please tell me how to FORBID to do so and still have a running localhost.
Thats so simple,
just create a file named index.php/index.html
and just leave them empty,
now anybody who access your ip will be redirected to index.php and they can't be aware of what files you have.
Hope this answer helps.
localhost (127.0.0.1 for IPv4) is only accessible from, well, the local host. Look for any "Listen" and "VirtualHost" directives and make sure they all say "localhost" and not another hostname or IP address.
I could not figure out why http:// localhost would resolve and http:// 127.0.0.1 would not resolve, when i was running apache, made no sence. While when running POW both would resolve.
I ve set up proper mapping in hosts file, and created VirtualHost entry in httpd-vhosts.conf file with defined ServerName that I have already mapped to 127.0.0.1. VirtualHost entry is for reverse proxy set up.
Every time i would run localhost, VirtualHost entry would work, but anytime i would try to access 127.0.0.1 or mapped domain i would be out of luck. In my case due to project(s) set up http:// localhost is not sufficient to run dev enviroment and i need mapped entry in hosts file to function.
I also use POW for my rails and sinatra apps. Had previously encountered POW issues, and to start and shutdown POW server I have installed gem Powify. Very convinient, I thought, and assumed when i run "powify server stop", that it would take care of things, which it did, for localhost resolution at least.
So how to deal with this? I ended up uninstalling POW. So the simple solution for this issue, is to completely uninstall POW, apparently due to configuration POW sets up I ended up dealing with this problem.
Due to lack of knowledge behind the scenes of what actually happens I would appreciate if some one could point out inner workings. I read up some of the articles on how to set up POW along side Apache, but would appreciate very much if someone could explain why exactly this behavior happens.
Ended up being about powify not removing the firewall exception and just stopped pow instance to free up some memory and processing power.
Still need to uninstall pow for firewall rule to be removed. So that you can use apache properly.