XAMPP change the port

Problems with the Windows version of XAMPP, questions, comments, and anything related.

XAMPP change the port

Postby benila » 11. May 2020 09:46

My xampp makes me a problem: I install it on a particular port (8080 for example), but it suddenly replaces the port. In particular, it does so when I run software that invokes the fixed port. Usually, after a while, it returns to the fixed port, but each time I redirect to the fixed port - it replaces the port again. As a result, I cannot run code that has a server-side invocation. What is the reason for this? What can I do? I thank everyone for helping me with this.
post Scriptum. I was already trying to replace Port - I switched to Port 8012 - and it didn't help.
I also tried running xampp as an administrator - that didn't help either.
benila
 
Posts: 4
Joined: 11. May 2020 09:42
XAMPP version: 3.2.4
Operating System: windows10

Re: XAMPP change the port

Postby Altrea » 11. May 2020 12:24

Hi,

two questions:
- How did you change the port exactly?
- What makes you believe Apache changes its port?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 10248
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: XAMPP change the port

Postby benila » 11. May 2020 13:00

1. I change the port by the usual method: I log into httpd.conf and change Listen 80 to Listen 8080, and change ServerName localhost: 80 to 8080.

2. I see that the ports listed in the xampp control panel have changed. Before the change, the xampp writes that the ports that the apache uses are 443,8080, while after the change other numbers are written, for example 56752.
benila
 
Posts: 4
Joined: 11. May 2020 09:42
XAMPP version: 3.2.4
Operating System: windows10

Re: XAMPP change the port

Postby Nobbie » 11. May 2020 13:02

benila wrote:2. I see that the ports listed in the xampp control panel have changed. Before the change, the xampp writes that the ports that the apache uses are 443,8080, while after the change other numbers are written, for example 56752.


Forget about that, Apache stll keeps open the port 80 (8080 or whatever you choose). See also viewtopic.php?p=197896&sid=df3bb64d241e7e17c754fa1982a0fc4c#p197930
Nobbie
 
Posts: 11581
Joined: 09. March 2008 13:04

Re: XAMPP change the port

Postby benila » 11. May 2020 13:48

Even if xampp retains the original port, it does not help me, since I run software that has a link to localhost, and once the port is changed, the software stops and does not work. For example, if my software says: "$ MySQLdb = new PDO (" mysql: host = 10.0.0.30: 8080; dbname = summary "," root "," "), and I run it - it doesn't work. So what can I do ?
benila
 
Posts: 4
Joined: 11. May 2020 09:42
XAMPP version: 3.2.4
Operating System: windows10

Re: XAMPP change the port

Postby Altrea » 11. May 2020 14:09

The ports didn't change.
And if you want to establish a database connection with PDO you need to use the Mariadb port 3306 and not the Apache port.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 10248
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: XAMPP change the port

Postby Nobbie » 11. May 2020 15:15

benila wrote:" mysql: host = 10.0.0.30: 8080;


That is if course nonsense, MySQL Server is running on Port 3306 and not 8080.
Nobbie
 
Posts: 11581
Joined: 09. March 2008 13:04

Re: XAMPP change the port

Postby benila » 11. May 2020 15:52

I thank all the respondents. The problem has been resolved. It turns out I just had to write "local host", without specifying the IP address and the specific port.
benila
 
Posts: 4
Joined: 11. May 2020 09:42
XAMPP version: 3.2.4
Operating System: windows10

Re: XAMPP change the port

Postby Altrea » 11. May 2020 16:19

Sure, because 3306 is the default port and default ports can often left omitted.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 10248
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 74 guests