PHP Not Working {Solved}

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

Re: PHP Not Working

Postby Altrea » 19. August 2013 04:06

Apache and MySQL are started as Windows services.
You should unregister them first and try to start without the services.
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: 6583
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: PHP Not Working

Postby Zorro » 19. August 2013 15:26

I am assuming that to unregister a service one must stop it and turn off the service. This worked fine with MySQL; however, trying to stop Apache crashed the control panel:
Image

The error message:
Exception EAccessViolation in module xampp-control.exe at 001ABEFE. Access violation at address 005ABEFE in module 'xampp-control.exe'. Read of address 00000042.


Interestingly, there are no error logs for Apache (nor any logs at all, for that matter). This has happened previously too.
Zorro
 
Posts: 15
Joined: 14. August 2013 19:37
XAMPP Version: 5.6.3
Operating System: Windows 7 Home Premium

Re: PHP Not Working

Postby Altrea » 19. August 2013 16:43

That's a known problem of this specific control panel version.
You can download an updated version of the control panel from here: viewtopic.php?f=16&t=48932

Simply stop/close the current control panel, extract the downloaded files to your XAMPP installation directory (overwrite files if needed) and start the new control panel exe.
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: 6583
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: PHP Not Working

Postby Zorro » 19. August 2013 20:03

I installed the upgraded control panel for XAMPP, and Apache and MySQL are turned off by default. I then attempted to load a .php program at the localhost, but the problem persists. In addition, I am unable to start Apache, as nothing happens after I give permission to NetCommand, though I am able to start MySQL without any trouble. Also, the options to turn on the service for any of the programs is greyed out, like so:
Image

The text on the control panel reads:
Code: Select all
2:45:24 PM  [main]    Initializing Control Panel
2:45:24 PM  [main]    Windows Version: Windows 7 Home Premium SP1 64-bit
2:45:24 PM  [main]    XAMPP Version: 1.8.1
2:45:24 PM  [main]    Control Panel Version: 3.2.1  [ Compiled: May 7th 2013 ]
2:45:24 PM  [main]    You are not running with administrator rights! This will work for
2:45:24 PM  [main]    most application stuff but whenever you do something with services
2:45:24 PM  [main]    there will be a security dialogue or things will break! So think
2:45:24 PM  [main]    about running this application with administrator rights!
2:45:24 PM  [main]    XAMPP Installation Directory: "c:\xampp\"
2:45:24 PM  [main]    Checking for prerequisites
2:45:24 PM  [main]    All prerequisites found
2:45:24 PM  [main]    Initializing Modules
2:45:24 PM  [Apache]    Apache Service detected with wrong path
2:45:24 PM  [Apache]    Change XAMPP Apache and Control Panel settings or
2:45:24 PM  [Apache]    Uninstall/disable the other service manually first
2:45:24 PM  [Apache]    Found Path: "C:\program files (x86)\xampp\apache\bin\httpd.exe" -k runservice
2:45:24 PM  [Apache]    Expected Path: "c:\xampp\apache\bin\httpd.exe" -k runservice
2:45:24 PM  [Apache]    Problem detected!
2:45:24 PM  [Apache]    Port 80 in use by ""C:\program files (x86)\xampp\apache\bin\httpd.exe" -k runservice" with PID 1616!
2:45:24 PM  [Apache]    Apache WILL NOT start without the configured ports free!
2:45:24 PM  [Apache]    You need to uninstall/disable/reconfigure the blocking application
2:45:24 PM  [Apache]    or reconfigure Apache and the Control Panel to listen on a different port
2:45:24 PM  [Apache]    Problem detected!
2:45:24 PM  [Apache]    Port 443 in use by ""C:\program files (x86)\xampp\apache\bin\httpd.exe" -k runservice" with PID 1616!
2:54:59 PM  [Apache]    Apache WILL NOT start without the configured ports free!
2:45:24 PM  [Apache]    You need to uninstall/disable/reconfigure the blocking application
2:45:24 PM  [Apache]    or reconfigure Apache and the Control Panel to listen on a different port
2:45:24 PM  [main]    Starting Check-Timer
2:45:24 PM  [main]    Control Panel Ready


I suspect that this is due to trouble during the installation of the new control panel, as during the progress of extraction (using either WinRAR or 7-Zip) I received the following error:
! C:\Users\Greg\AppData\Local\Temp\CPv3.2.1-1.7z: Cannot open locale\en\LC_MESSAGES\delphi2006_de_en.mo
! C:\Users\Greg\AppData\Local\Temp\CPv3.2.1-1.7z: Cannot open locale\en\LC_MESSAGES\xampp_control.mo


At this point, the main thing I think about is how I unlucky I am getting one problem after another. :?
Zorro
 
Posts: 15
Joined: 14. August 2013 19:37
XAMPP Version: 5.6.3
Operating System: Windows 7 Home Premium

Re: PHP Not Working

Postby Altrea » 19. August 2013 22:02

You can't edit any windows service things without starting the control panel with elevated administrator rights.
rightclick the control panel icon and choose "run as administrator"
After that unregister the services.
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: 6583
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: PHP Not Working

Postby Zorro » 19. August 2013 23:41

Altrea wrote:You can't edit any windows service things without starting the control panel with elevated administrator rights.
rightclick the control panel icon and choose "run as administrator"
After that unregister the services.

Although it no longer asks for a confirmation (which never was a problem), Apache is still "stuck" and does nothing when I try to start it. Here is what it looks like:
Image
What the CP says when I try to start Apache:
Code: Select all
6:35:56 PM  [Apache]    Problem detected!
6:35:56 PM  [Apache]    Port 80 in use by ""C:\program files (x86)\xampp\apache\bin\httpd.exe" -k runservice" with PID 1616!
6:35:56 PM  [Apache]    Apache WILL NOT start without the configured ports free!
6:35:56 PM  [Apache]    You need to uninstall/disable/reconfigure the blocking application
6:35:56 PM  [Apache]    or reconfigure Apache and the Control Panel to listen on a different port
6:35:56 PM  [Apache]    Problem detected!
6:35:56 PM  [Apache]    Port 443 in use by ""C:\program files (x86)\xampp\apache\bin\httpd.exe" -k runservice" with PID 1616!
6:35:56 PM  [Apache]    Apache WILL NOT start without the configured ports free!
6:35:56 PM  [Apache]    You need to uninstall/disable/reconfigure the blocking application
6:35:56 PM  [Apache]    or reconfigure Apache and the Control Panel to listen on a different port
6:35:56 PM  [Apache]    Attempting to start Apache service...


When I try to turn off Apache service:
Code: Select all
6:38:00 PM  [Apache]    Uninstalling service...
6:38:01 PM  [Apache]    Apache Service detected with wrong path
6:38:01 PM  [Apache]    Change XAMPP Apache and Control Panel settings or
6:38:01 PM  [Apache]    Uninstall/disable the other service manually first
6:38:01 PM  [Apache]    Found Path: "C:\program files (x86)\xampp\apache\bin\httpd.exe" -k runservice
6:38:01 PM  [Apache]    Expected Path: "c:\xampp\apache\bin\httpd.exe" -k runservice
6:38:01 PM  [Apache]    Service was NOT (un)installed!


Because of the messages, I think the problem is a coding/filing issue. If a solution is impossible, I may just have to wait until XAMPP is updated and the problems fixed (unless I am the one doing something wrong).
Zorro
 
Posts: 15
Joined: 14. August 2013 19:37
XAMPP Version: 5.6.3
Operating System: Windows 7 Home Premium

Re: PHP Not Working

Postby Altrea » 20. August 2013 04:35

Zorro wrote:Because of the messages, I think the problem is a coding/filing issue. If a solution is impossible, I may just have to wait until XAMPP is updated and the problems fixed (unless I am the one doing something wrong).

I have never heared about problems unregistering a windows service with this version of the control panel in elevated rights. In your control panel config you can tick the "Show debug information" setting and set it's value to "More Details". That way the control panel will output every action it is doing. Please try to unregister the service again with this setting and provide us the full contents of the control panel message window this time.

The second possibility would be to try to unregister the service yourself in your windows command line (again in elevated rights mode):
Code: Select all
sc delete Apache2.4


If this will not work too, i expect a prolem with your os installatioon or an misleading influence of a security software.
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: 6583
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: PHP Not Working

Postby Zorro » 20. August 2013 15:35

Here is the enhanced debug code when I try to uninstall Apache:
Code: Select all
10:20:19 AM  [Apache]    Uninstalling service...
10:20:19 AM  [Apache]    Executing "c:\xampp\apache\bin\httpd.exe -k uninstall -n "Apache2.4""
10:20:22 AM  [Apache]    Return code: 0
10:20:22 AM  [Apache]    Checking for service (name="Apache2.4"): Service installed
10:20:22 AM  [Apache]    Apache Service detected with wrong path
10:20:22 AM  [Apache]    Change XAMPP Apache and Control Panel settings or
10:20:22 AM  [Apache]    Uninstall/disable the other service manually first
10:20:22 AM  [Apache]    Found Path: "C:\program files (x86)\xampp\apache\bin\httpd.exe" -k runservice
10:20:22 AM  [Apache]    Expected Path: "c:\xampp\apache\bin\httpd.exe" -k runservice
10:20:22 AM  [Apache]    Service was NOT (un)installed!


When I try to start Apache:
Code: Select all
10:28:23 AM  [Apache]    Checking default ports...
10:28:23 AM  [Apache]    Portblocker Detected: httpd.exe
10:28:23 AM  [Apache]    Checking for App: c:\xampp\apache\bin\httpd.exe
10:28:23 AM  [Apache]    Checking for Service: "C:\program files (x86)\xampp\apache\bin\httpd.exe" -k runservice
10:28:23 AM  [Apache]    Portblocker Path: Unable to open process
10:28:23 AM  [Apache]    Portblocker Service Path: "C:\program files (x86)\xampp\apache\bin\httpd.exe" -k runservice
10:28:23 AM  [Apache]    Problem detected!
10:28:23 AM  [Apache]    Port 80 in use by ""C:\program files (x86)\xampp\apache\bin\httpd.exe" -k runservice" with PID 1616!
10:28:23 AM  [Apache]    Apache WILL NOT start without the configured ports free!
10:28:23 AM  [Apache]    You need to uninstall/disable/reconfigure the blocking application
10:28:23 AM  [Apache]    or reconfigure Apache and the Control Panel to listen on a different port
10:28:23 AM  [Apache]    Portblocker Detected: httpd.exe
10:28:23 AM  [Apache]    Checking for App: c:\xampp\apache\bin\httpd.exe
10:28:23 AM  [Apache]    Checking for Service: "C:\program files (x86)\xampp\apache\bin\httpd.exe" -k runservice
10:28:23 AM  [Apache]    Portblocker Path: Unable to open process
10:28:23 AM  [Apache]    Portblocker Service Path: "C:\program files (x86)\xampp\apache\bin\httpd.exe" -k runservice
10:28:23 AM  [Apache]    Problem detected!
10:28:23 AM  [Apache]    Port 443 in use by ""C:\program files (x86)\xampp\apache\bin\httpd.exe" -k runservice" with PID 1616!
10:28:23 AM  [Apache]    Apache WILL NOT start without the configured ports free!
10:28:23 AM  [Apache]    You need to uninstall/disable/reconfigure the blocking application
10:28:23 AM  [Apache]    or reconfigure Apache and the Control Panel to listen on a different port
10:28:23 AM  [Apache]    Attempting to start Apache service...
10:28:23 AM  [Apache]    Executing "net start "Apache2.4""
10:28:23 AM  [Apache]    Return code: 0


What do you mean by Windows Command? I tried to run the Shell (console) from the Control Panel, but apparently it was never installed:
Image

A problem encountered during installation seems very likely. I also run Norton Anti-virus, but I am unaware of any influence it has over XAMPP.
Zorro
 
Posts: 15
Joined: 14. August 2013 19:37
XAMPP Version: 5.6.3
Operating System: Windows 7 Home Premium

Re: PHP Not Working

Postby Altrea » 20. August 2013 16:08

Zorro wrote:What do you mean by Windows Command?

There are several names for it:
Windows...
  • ...command prompt
  • ...command line
  • ...shell
  • ...ugly black window

You can google how to find/open it. It should be somewhere inside your Windows Start menu.

And yes, Norton is known to conflict with XAMPP.
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: 6583
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: PHP Not Working

Postby Zorro » 20. August 2013 18:04

The command prompt succeeded and Apache is now deactivated.
Image
What is the best course of action now?
Zorro
 
Posts: 15
Joined: 14. August 2013 19:37
XAMPP Version: 5.6.3
Operating System: Windows 7 Home Premium

Re: PHP Not Working

Postby Altrea » 21. August 2013 02:33

Great :D
Hit the Start Button and see if Apache could be started.
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: 6583
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: PHP Not Working

Postby Zorro » 21. August 2013 15:16

Apache started without any trouble, and I re-installed it. What's more, PHP is working now without any apparent issues. Apparently restarting Apache restored order to XAMPP, as it works perfectly now. I cannot thank you enough! Case solved! :mrgreen:
Zorro
 
Posts: 15
Joined: 14. August 2013 19:37
XAMPP Version: 5.6.3
Operating System: Windows 7 Home Premium

Re: PHP Not Working {Solved}

Postby Altrea » 21. August 2013 15:35

You are welcome :D
Now finally: Have fun with XAMPP and all that stuff 8)
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: 6583
Joined: 17. August 2009 13:05
XAMPP Version: 5.5.19
Operating System: W7Ux64

Re: PHP Not Working {Solved}

Postby hackattack142 » 29. August 2013 23:25

Hello,

You should consider upgrading your XAMPP Control Panel to the latest version (3.2.1) from the link in my signature.

Those errors are appearing because of this
7:57:08 PM [main] You are not running with administrator rights! This will work for
7:57:08 PM [main] most application stuff but whenever you do something with services
7:57:08 PM [main] there will be a security dialogue or things will break! So think
7:57:08 PM [main] about running this application with administrator rights!
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 703
Joined: 20. May 2011 23:29
XAMPP Version: 5.6.3
Operating System: Windows 7 Ultimate SP1 64-Bit

Re: PHP Not Working {Solved}

Postby Zorro » 30. August 2013 02:27

hackattack142 wrote:Hello,

You should consider upgrading your XAMPP Control Panel to the latest version (3.2.1) from the link in my signature.

Those errors are appearing because of this
7:57:08 PM [main] You are not running with administrator rights! This will work for
7:57:08 PM [main] most application stuff but whenever you do something with services
7:57:08 PM [main] there will be a security dialogue or things will break! So think
7:57:08 PM [main] about running this application with administrator rights!

Thank you for making the terrific control panel! I doubt I could have solved the problem without it.
Zorro
 
Posts: 15
Joined: 14. August 2013 19:37
XAMPP Version: 5.6.3
Operating System: Windows 7 Home Premium

Previous

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 32 guests