Apache, MySql will not stop - Windows 7 [SOLVED]

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

Re: Apache, MySql will not stop - Windows 7

Postby Sharley » 28. September 2011 04:06

Did you start the Control Panel 3 by right clicking first?

In phpMyAdmin select to change the language from German to English.

Don't tick and Service check boxes.

Read the error.log file in C:\xampp\apache\logs for clues about any issues.

Also read and paste here the xampp-control-3-beta.log in the xampp folder between forum code tags, please.
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Apache, MySql will not stop - Windows 7

Postby Coastalguy » 28. September 2011 04:37

I started the control panel with the icon created on my desktop during installation. Didn't realize it but it was the 2.5 version, which apparently was provided along with the 3 version beta. Deleted it and created a shortcut for the 3 beta version and ran that.... an obvious difference. The service modules are checked. Unclicking them advises I need to stop the service first. Should I stop the services and uncheck the service modules? If so, Will they still automatically start on Windows boot?

In my phpmyadmin, the translate option I am getting is from the Google Chrome Browser, which does not work. I haven't a clue on how to change it to English, as I cannot read any of the page?

On the xampp-control-3-beta.log, you mention to paste folder between forum code tags. Again, not sure what this is, but I see a Code button on top, so I will paste it using that.... Hope I did that right.

Code: Select all
11:16:56 PM  [main]    Initializing main
11:16:56 PM  [main]    Windows version: 6.1 (build 7601) - Service Pack 1
11:16:56 PM  [main]    Xampp version: 1.7.7
11:16:56 PM  [main]    Control center version: 3.0.2 [ Compiled: Jul 21th 2011 - build #1 ]
11:16:56 PM  [main]    Running not as admin! This will work for all application stuff, but whenever you do
11:16:56 PM  [main]    something with services there will be a security dialogue! So think about running
11:16:56 PM  [main]    this application with administrator rights!
11:16:56 PM  [main]    Working with basedir: "i:\xampp\"
11:16:56 PM  [main]    Initializing moduls
11:16:56 PM  [apache]    "i:\xampp\apache\bin\httpd.exe" seems to be running on port 80?
11:16:56 PM  [apache]    "i:\xampp\apache\bin\httpd.exe" seems to be running on port 443?
11:16:56 PM  [mysql]    "i:\xampp\mysql\bin\mysqld.exe" seems to be running on port 3306?
11:16:56 PM  [main]    Starting check-timer
11:17:44 PM  [apache]    Stopping apache (PID: 5996)
11:17:44 PM  [apache]    Stopping apache (PID: 3848)
11:17:44 PM  [apache]    Status change detected: stopped
11:17:47 PM  [mysql]    Stopping mysql (PID: 4148)
11:17:47 PM  [mysql]    Status change detected: stopped
11:17:50 PM  [apache]    Starting apache app...
11:17:50 PM  [apache]    Status change detected: running
11:17:55 PM  [mysql]    Starting mysql app...
11:17:55 PM  [mysql]    Status change detected: running
11:18:12 PM  [main]    Deinitializing moduls
11:18:12 PM  [main]    Deinitializing main

11:19:13 PM  [main]    Initializing main
11:19:13 PM  [main]    Windows version: 6.1 (build 7601) - Service Pack 1
11:19:13 PM  [main]    Xampp version: 1.7.7
11:19:13 PM  [main]    Control center version: 3.0.2 [ Compiled: Jul 21th 2011 - build #1 ]
11:19:13 PM  [main]    Running not as admin! This will work for all application stuff, but whenever you do
11:19:13 PM  [main]    something with services there will be a security dialogue! So think about running
11:19:13 PM  [main]    this application with administrator rights!
11:19:13 PM  [main]    Working with basedir: "i:\xampp\"
11:19:13 PM  [main]    Initializing moduls
11:19:13 PM  [apache]    "i:\xampp\apache\bin\httpd.exe" seems to be running on port 80?
11:19:13 PM  [apache]    "i:\xampp\apache\bin\httpd.exe" seems to be running on port 443?
11:19:13 PM  [mysql]    "i:\xampp\mysql\bin\mysqld.exe" seems to be running on port 3306?
11:19:13 PM  [main]    Starting check-timer
11:19:16 PM  [main]    Deinitializing moduls
11:19:16 PM  [main]    Deinitializing main
Coastalguy
 
Posts: 57
Joined: 06. March 2011 21:06
XAMPP version: 1.7.7
Operating System: Windows 10 Home Premium

Re: Apache, MySql will not stop - Windows 7

Postby Sharley » 28. September 2011 04:52

Coastalguy wrote:Deleted it and created a shortcut for the 3 beta version and ran that
See the link in my previous post about how to create and run a shortcut as an administrator, a must do!
http://www.sevenforums.com/tutorials/11 ... rator.html
Code: Select all
11:19:13 PM  [main]    Running not as admin! This will work for all application stuff, but whenever you do
11:19:13 PM  [main]    something with services there will be a security dialogue! So think about running
11:19:13 PM  [main]    this application with administrator rights!



Coastalguy wrote:The service modules are checked. Unclicking them advises I need to stop the service first. Should I stop the services and uncheck the service modules? If so, Will they still automatically start on Windows boot?
Remove the ticks and answer yes.

You can tick them again, when you have tested your installation and everything is working, to enable your servers to start on boot.


Coastalguy wrote:In my phpmyadmin, the translate option I am getting is from the Google Chrome Browser, which does not work. I haven't a clue on how to change it to English, as I cannot read any of the page?
Under the heading "Anzeige-Einstellungen" click on the "Sprache - Language" and select English or English (United Kingdom).


Coastalguy wrote:On the xampp-control-3-beta.log, you mention to paste folder between forum code tags. Again, not sure what this is, but I see a Code button on top, so I will paste it using that.... Hope I did that right.
Yes that the idea and you must agree it is much easier to read than just a plain text paste.

I was able to spot 2 things that the services were started from Installation and you wasn't running as an admin.

Go to http://localhost/xammp/index.php and select you language and exercise the demos to check your installation is working as it should.

Then proceed to do what ever you wanted to do with it and enjoy. :)

It's must have been a great learning experience for you as you now know much more about the workings of this beast. 8)

Best wishes and good luck. ;)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Apache, MySql will not stop - Windows 7

Postby Coastalguy » 28. September 2011 05:32

The service modules remain checked, whether I click on the check. Alternately when I click on the check, it advises that it will install the service and then it will uninstall the service. Regardless of which, it remains checked. I tried to see if the check was greyed out or black, but I don't see a difference.

Anyway, everything seems to be working great. Under the config button, there are options to start apache and mysql on boot, which I checked, so I am not sure what the service module thing if for?

I did figure out how to make phpmyadmin display in english. Also, I had forgotten that http://localhost/security brings up the page to set the password.... not under http://localhost/phpmyadmin.

Lastly, per an online search, set the shortcut for the control panel to run as administrator (another new thing for me).

Anyway, everything seems to be working great. I want to thank you for all of your help, and my great learning process on this.

Regards,
Dave
Coastalguy
 
Posts: 57
Joined: 06. March 2011 21:06
XAMPP version: 1.7.7
Operating System: Windows 10 Home Premium

Re: Apache, MySql will not stop - Windows 7

Postby Sharley » 28. September 2011 05:41

Coastalguy wrote:The service modules remain checked, whether I click on the check. Alternately when I click on the check, it advises that it will install the service and then it will uninstall the service. Regardless of which, it remains checked. I tried to see if the check was greyed out or black, but I don't see a difference.
Dave,
Follow the same procedure as I outlined before for the same issue, that is using the SCM to remove the services that were installed when you reinstalled XAMPP with 1.7.7 - works the same even in this version with this CP3.

Good luck. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Apache, MySql will not stop - Windows 7

Postby Coastalguy » 28. September 2011 15:10

Back on this this morning, with my mind being a lot fresher. What I found this morning was the following. If incorrect, let me know, otherwise everything seems to be working great, and I did learn a lot with your help.

1. On the module services, I see now that when services are installed, that the check becomes a darker green. When not installed it is light gray. Obviously, when services are installed, it starts up with Windows Boot.

2. Under the "Config" button options, I see there that the start is for when the control panel is started, not Windows. Obviously if services are installed, this is not needed, unless you turn off Apache and Mysql, or services are off, and want them to start automatically when the control panel is started, rather than having to click on the start button for each. If I am correct, this gives a lot of good options.

Again, all of my local websites and databases are working fine, and I can now turn off and restart Apache and Mysql, which I was unable to do under the old version. Now I have to update XAMPP under my dual boot XP...... Have it down pat now, so that should be a snap.

Thanks again for your help,
Dave
Coastalguy
 
Posts: 57
Joined: 06. March 2011 21:06
XAMPP version: 1.7.7
Operating System: Windows 10 Home Premium

Re: Apache, MySql will not stop - Windows 7

Postby Sharley » 28. September 2011 21:22

Hello Dave,

You seem now to be on the right track and are starting to develop an understanding of the features in this new CP3. 8)

You are also now able to move forward and enjoy XAMPP. :)

Please post again if you find an XAMPP related hurdle you can't seem to jump over.

Good luck and my best wishes. :)
User avatar
Sharley
AF Moderator
 
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Re: Apache, MySql will not stop - Windows 7

Postby Coastalguy » 28. September 2011 23:39

Will do, and thank again,

Regards,
Dave
Coastalguy
 
Posts: 57
Joined: 06. March 2011 21:06
XAMPP version: 1.7.7
Operating System: Windows 10 Home Premium

Apache, MySql will not stop - Windows 7

Postby JJJ » 05. October 2011 18:47

In order to make the XAMPP Control Panel stop Apache and stop MySql properly in 64-bit Windows 7,
change the following batch file 'mysql_stop.bat' to the following:

@echo off
echo Mysql shutdown ...
taskkill /f /im mysqld.exe

if not exist mysql\data\mysql.pid GOTO exit
echo Delete *.pid ...
del /q mysql\data\*.pid

:exit

Then on the XAMPP Control Panel Click 'Stop' for MySql first, followed by Click 'Stop' for Apache.

JJJ.
Singapore
JJJ
 
Posts: 3
Joined: 05. October 2011 18:31

Re: Apache, MySql will not stop - Windows 7

Postby Coastalguy » 06. October 2011 02:34

JJJ.

Interesting. You noted Windows 64 bit. Will this work on 32 bit. I no longer have this problem, with the upgrade that was suggested and that I installed, however I was wondering if there was batch code that would actually stop apache and mysql before my backups, and then start it again after completed?

Thanks,
Coastalguy
 
Posts: 57
Joined: 06. March 2011 21:06
XAMPP version: 1.7.7
Operating System: Windows 10 Home Premium

Re: Apache, MySql will not stop - Windows 7

Postby JJJ » 06. October 2011 14:42

Hi Coastal Guy,

The Xampp Control Panel uses the apache_stop.bat, mysql_stop.bat, apache_start.bat and mysql_start.bat found in C:\xampp to stop/start Apache and MySql. Unfortunately, the default mysql_stop.bat fails to work as it calls pv.exe to kill mysqld.exe (the MySQL daemon process), but Windows 7 security prevents pv.exe from killing the mysqld.exe process. To workaround this, I use the Taskkill function from Windows 7 as shown in my posting above dated 6 October 02:47 hrs.

My guess is that these 4 batch files (substituting my modified mysql_stop.bat for the default one) would work in 32-bit Windows 7 as well as 64-bit Windows 7. I don't have 32-bit Win 7, so it's just a guess!

Cheers!
JJJ
JJJ
 
Posts: 3
Joined: 05. October 2011 18:31

Re: Apache, MySql will not stop - Windows 7

Postby hackattack142 » 06. October 2011 23:19

The XAMPP Control Panel v3 does not use the batch files. I do not believe the 2.5 CP does either as far as I can tell from the code (it is a bit harder to read). The CPv3 directly calls programs but I do believe it is the "pv.exe" call to kill MySQL in CPv3 is hardcoded.
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 701
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit

Re: Apache, MySql will not stop - Windows 7

Postby Altrea » 06. October 2011 23:27

i can't recommend to use taskkill for that, especially not with the /f (force) flag.
Data losses and/or inconsistent databases can be the consequence
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: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Apache, MySql will not stop - Windows 7

Postby JJJ » 06. October 2011 23:53

Doesn't pv.exe do the same thing as taskkill in Windows 7?? Basically killing the mysqld.exe daemon ? Remove the /f option if you insist.

Do you reckon pv.exe can kill the MySql process more gently than taskkill (without the /f option) ??
JJJ
 
Posts: 3
Joined: 05. October 2011 18:31

Re: Apache, MySql will not stop - Windows 7

Postby hackattack142 » 07. October 2011 01:22

The current method that the Control Panels are using is not an ideal way of stopping the programs. It does forcefully close them and you do get messages in each log file stating that it was not shutdown in a nice way. There are methods for stopping these programs when they are not running as services in a nice way. For instance, with MySQL, you can use the "mysqladmin.exe" tool in the "xampp/mysql/bin" directory to issue a shutdown command. The problem is that this tool requires authentication and a user in the DB with shutdown privileges. One could tell it to use the "root" account but once the user changes the password, it would break. There is also the option of storing these credentials in a file that the user could change when they change the password but that has its own security implications.
XAMPP Control Panel Developer
Latest CP: viewtopic.php?f=16&t=48932
hackattack142
 
Posts: 701
Joined: 20. May 2011 23:29
Operating System: Windows 7 Ultimate SP1 64-Bit

PreviousNext

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 109 guests