Page 2 of 2

Re: PHP Not Working

PostPosted: 19. August 2013 04:06
by Altrea
Apache and MySQL are started as Windows services.
You should unregister them first and try to start without the services.

Re: PHP Not Working

PostPosted: 19. August 2013 15:26
by Zorro
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.

Re: PHP Not Working

PostPosted: 19. August 2013 16:43
by Altrea
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.

Re: PHP Not Working

PostPosted: 19. August 2013 20:03
by Zorro
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. :?

Re: PHP Not Working

PostPosted: 19. August 2013 22:02
by Altrea
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.

Re: PHP Not Working

PostPosted: 19. August 2013 23:41
by Zorro
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).

Re: PHP Not Working

PostPosted: 20. August 2013 04:35
by Altrea
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.

Re: PHP Not Working

PostPosted: 20. August 2013 15:35
by Zorro
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.

Re: PHP Not Working

PostPosted: 20. August 2013 16:08
by Altrea
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.

Re: PHP Not Working

PostPosted: 20. August 2013 18:04
by Zorro
The command prompt succeeded and Apache is now deactivated.
Image
What is the best course of action now?

Re: PHP Not Working

PostPosted: 21. August 2013 02:33
by Altrea
Great :D
Hit the Start Button and see if Apache could be started.

Re: PHP Not Working

PostPosted: 21. August 2013 15:16
by Zorro
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:

Re: PHP Not Working {Solved}

PostPosted: 21. August 2013 15:35
by Altrea
You are welcome :D
Now finally: Have fun with XAMPP and all that stuff 8)

Re: PHP Not Working {Solved}

PostPosted: 29. August 2013 23:25
by hackattack142
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!

Re: PHP Not Working {Solved}

PostPosted: 30. August 2013 02:27
by Zorro
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.