Allow someone else to connect to my XAMPP mysql - php

Good day,
I am making a discord bot that will require MySQL access. I have used XAMPP in the past for other projects, but now that I am working with someone else, I need to allow them to also access my XAMPP MySQL database. I have tried googling solutions, as well as looking up a lot of other stuff for this, but everything just redirects back to localhost/virtualhost stuff.
I have my own DNS that I would like the person to connect to, so example.
I am trying to run this entire thing off my own server, this way I do not have to worry about data limitations or worry about if the project goes inactive for a while that everything will be wiped (remotemysql.com)
Only kind of success I have had so far is allowing another computer on my LAN to connect through my IPv4 address
I have the ports, 3306, 80, and 443 all open as well as allowed through my firewall. I have also tried temp disabling my firewall to test to see if this was the issue, but it wasnt

I don't know if you want to that just for testing, if it is, maybe ngrok could work for you.
It creates tunnels to localhost, but it has no custom domains on the free plan though.

Use ngrok. Alternatively if you want it to be free in terms of use, you can setup your own ngrok like server using expose. Here is the link https://github.com/beyondcode/expose

Related

PHP and node.js on the same server

I am using PHP for the backend of my website and I am introducing a node.js chat. I have everything figured out as far as authentication between the two, and my only problem now is switching between port numbers. How is this handled? Ideally I'd like to hide the port number and I've tried virtual hosts for this, but no matter how I configure the virutal host the server does not load and appears to be down. I am using cloudflare if this matter. But hiding the port isn't required. I just want to smoothly link to the chat app on port 2053 from the PHP app on port 443, and have the chat app link back to the PHP site. PHP uses apache. I can't find any easy way to do this. Been at this problem for days.
After much much research, trial and error I've figured out a few things.
My site consists of mainly PHP, I want to use node.js on a separate page as a chat app. I thought this would be easy, but I was mistaken. It's a lot of pain to get both node.js and PHP to work together flawlessly, and if I knew back then what I know now I might have went a different route. But I have things working for the most part and I am happy.
Some useful info:
If you want to link back to 80 or 443 from your node page, use the full URL with http/s.
If you want to use a virtual host it's only possible on Apache 2.4+ because socket.io can't communicate through it without some apaache mods that allow websocket proxing. It's also possible with NGINX from what I hear but I am less familiar with it.
So in the end I am just keeping the port number and allowing hyper links between the two. This is a temporary solution until I upgrade to either Apache 2.4 or NGINX.

php built in webserver not reacheable with ip:port via network cable

I have been trying to make things work for a while now but I did not succeed. I also have done a lot of research, in vain. I really hope that someone is able to help me find the root cause of that issue:
I am trying to connect to my localhost:8000 from another computer (which actually is an arduino ethernet but that doesn't make a difference I guess) by using an ip address. I set the ip address manually in network settings (192.168.1.5).
funny enough, the connection from the external device to 192.168.1.5:80 (which is the normal apache server) works, hence the problem cannot be IP-based.
However, the connection to the php built in webserver running on localhost:8000 does not work. I am trying to access it with '192.168.1.5:8000' obviously - I guess this can not be the mistake?
Now I am wondering what the cause of the problem is. Is anything preventing the connection to port 8000 or does the php built in webserver not respond to the manually given ip? Why does the apache respond to that IP though?
Thanks so much for any hint!!
Steffen
The built in server is, by default, only available on localhost. You have to provide a address wildcard mask, if you want to access it over the local network.
$ php -S 0.0.0.0:8000
However, please be aware of the security implications. If your machine is connected to the internet directly, automatic port scanners will find it sooner or later and may take advantage of security problems.
An address mask of 0.255.255.255 will do fine for 10...* networks, and 0.0.255.255 will do fine for 192.168.. networks.

Choices regarding IP restrictions on web request

Didn't really know what title to give this question so I hope its acceptable.
I am using a system which has an API. I don't have a lot of control over this system, but one thing I need for security reasons is for it to be locked down to my IP. This works, so now the system can only be accessed from my IP.
Now, I have built a custom app which uses the above API. This app is hosted on a server which is different from my IP address. Therefore, when I try to make the API call it fails due to it being restricted. I know this is the case, because if I run the app locally from my location, it works without any problems.
So, the question is whats the best thing to do? I know I could add the IP address of the server which is hosting my app to the systems API. However, I think the servers IP is dynamic which could cause problems. I have also used things like no-ip locally to control my dynamic IP, but I cant imagine I can install this on my web server.
Looking for thoughts as to how I can overcome this problem.
Thanks

need to create an application that will work on the Internet also and local internet also

i need to make a website such that it can be accessed through the internet if internet is available otherwise when there is no internet then it should work properly on the local intranet also can this be achieved , i have built my site on php/mysql
if this can be achieved please tell me and direct me to some examples of how to achieve this
thankyou
Google Gears?
http://gears.google.com/support/
If you have a local web server, why not just host everything from there instead of hosting it elsewhere, and set it up so incoming connections from the outside hit that machine as well.
Or set up a remote sync that will keep all files on the remote server and the local server sync'd up. Could change DNS upon internet outage and have it resolve to the local server?
This will depend on how your network is configured, there are two likely scenarios that I can think of:
Your web server is behind a router and port 80 is forwarded
Your web server has it's own IP address on the internet
In the first instance you shouldn't have to do anything unless you want to access the website using a URL (e.g. www.mywebserver.com) in which case you'll have to play some DNS tricks on the local network to get it to point to the local IP of the server instead of the actual internet IP. For example when accessed from the internet the dns record for www.mywebserver.com would point to 12.34.56.78 where as the dns record for any machine on the local network would be something like 192.168.0.10.
In the second case to my knowledge there is nothing you can do that will allow you to be able to access on the intranet (I could be wrong so if someone posts a solution in this case I'll update my answer).
So the answer to your question really depends on your network configuration, If you expand on that a little giving a more concrete answer will be a little easier.

can php code break down shared hosting services for the particular IP?

Sorry, i had to put the same post again due to still no solution
I have a strange problem, i just installed my php web site on a shared hosting(php,apache,mysql,linux), all services were working fine. But after configuring my app i just could visit my web site only once, other attempts gives "The server is taking too long to respond.". But from other IP i can access, but only once, it seems all ip addresses being blocked after first visit(even ftp and other services go down, no access at all from the IP), can anyone help to explore this problem ? i don't think that it's my app problem, the app works fine on my local PC. By far The only one is there might be a infinity loop in my code becouse i had this issues on my local pc, but i fixed it, should work fine everywhere. Can infinity loop make blocking all services bind(if this is the way) to particular IP ? but im not sure about this. Never thought this way.
I would look at an infinite loop issue more. I had a similar issue that only showed up on the shared server because my local machine had a different version of php and different error settings.
Sounds like a problem either with sessions or database connections. Is there a page's code that you could share that causes this problem?

Categories