How can I change the port for localhost in PHP (Apache, Xamp

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

Re: How can I change the port for localhost in PHP (Apache,

Postby chayacooper » 19. March 2015 01:05

@Altrea, I haven't installed any other webservers on this machine :-( Would you be able to help me figure out how to change it - either by using Port 81 or by updating the version of PHP being used by Port 2556?
Altrea wrote:Ok, but some webserver is using Port 2556 and did have its own resources which are not automatically accessible by any other webserver you are running on port 81
chayacooper
 
Posts: 9
Joined: 18. March 2015 00:39
Location: NYC
Operating System: Windows 8.1

Re: How can I change the port for localhost in PHP (Apache,

Postby mark.mcdonald » 19. March 2015 15:29

Time for: "Process of Elimination"!
To better understand this situation, please tell us if xampp is the older or if xampp2 is the older version of xampp. (Trying to understand how everything is setup)
Try stopping the older version of xampp and see if you can still access localhost:2556:
if trying to access site = FAIL -> Somewhere in your old xampp its referencing port 2556. (I would start by digging into the httpd.conf file and see if you can find this # 2556)
If trying to access site = SUCCESS -> Try stopping new version of xampp (try to access again after both xampps are stopped).
if trying to access site = SUCCESS STILL -> You either have a service of apache running still (see where it's pointing to) or you have another version of xampp running or some other web service such as iis. (I would keep both xampp's turned off till you can identify what is using port 2556)
mark.mcdonald
 
Posts: 160
Joined: 13. March 2015 15:48
Location: Edmonton
Operating System: Windows Server 2012 R2

Re: How can I change the port for localhost in PHP (Apache,

Postby Altrea » 19. March 2015 16:06

The other possibility would be a virtual host of any of the webservers using this 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: 8294
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: How can I change the port for localhost in PHP (Apache,

Postby mark.mcdonald » 19. March 2015 16:10

Altrea wrote:The other possibility would be a virtual host of any of the webservers using this port

Based on my previous post if one of the xampps turned off turns off access to localhost:2556 and not found in httpd.conf, this would be the next best place to look!
Thanks for pointing this out Altrea! This would have been my next post.
mark.mcdonald
 
Posts: 160
Joined: 13. March 2015 15:48
Location: Edmonton
Operating System: Windows Server 2012 R2

Re: How can I change the port for localhost in PHP (Apache,

Postby chayacooper » 19. March 2015 17:04

Xampp2 is the newer one, and Xampp is the older one, and I'm only running the new one. But that was a good idea - I turned off the new one too and PHP is still working in Port 2556. Any suggestions how to fix that? This whole mess started because I needed to update which version of PHP I was running ;-)
mark.mcdonald wrote:Time for: "Process of Elimination"!
To better understand this situation, please tell us if xampp is the older or if xampp2 is the older version of xampp. (Trying to understand how everything is setup)
Try stopping the older version of xampp and see if you can still access localhost:2556:
if trying to access site = FAIL -> Somewhere in your old xampp its referencing port 2556. (I would start by digging into the httpd.conf file and see if you can find this # 2556)
If trying to access site = SUCCESS -> Try stopping new version of xampp (try to access again after both xampps are stopped).
if trying to access site = SUCCESS STILL -> You either have a service of apache running still (see where it's pointing to) or you have another version of xampp running or some other web service such as iis. (I would keep both xampp's turned off till you can identify what is using port 2556)
chayacooper
 
Posts: 9
Joined: 18. March 2015 00:39
Location: NYC
Operating System: Windows 8.1

Re: How can I change the port for localhost in PHP (Apache,

Postby mark.mcdonald » 19. March 2015 17:55

Check your services by Open Administrative Tools by clicking the Start button Picture of the Start button, and then clicking Control Panel. In the search box, type administrative tools, and then click Administrative Tools.
Double-click Services. Administrator permission required If you're prompted for an administrator password or confirmation, type the password or provide confirmation.
See if you have apache running as a service. Have you downloaded any other versions of xampp anywhere else in your system (Time to go on a hunt)?
Now that both of your xampps are off. Finding whatever is allowing you to connect to a localhost will let you resolve this issue. Best of luck!
mark.mcdonald
 
Posts: 160
Joined: 13. March 2015 15:48
Location: Edmonton
Operating System: Windows Server 2012 R2

Re: How can I change the port for localhost in PHP (Apache,

Postby Altrea » 19. March 2015 18:33

I would follow a different debugging strategy:
Type in Windows commandline
Code: Select all
netstat -aon | find "2556"

remember the PID and identify the process in your windows task manager with this PID.

Then you can search your system for this specific process
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: 8294
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Previous

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 51 guests