Cause Analysis of PHPWAMP self-startup exception. Apache and other services will not be restarted automatically after the server is restarted. phpwampapache

Source: Internet
Author: User

Cause Analysis of PHPWAMP self-startup exception. Apache and other services will not be restarted automatically after the server is restarted. phpwampapache

When"PHPWAMP automatic task", Many students encountered the following problems:

"The website service will not be started automatically after the computer (server) is restarted in the phpwamp green integrated environment"

(This method can also be used if this problem is encountered in other environments or during self-built environments)

 

 

The content of this article is as follows:

Why can't I restart my website service after it is changed from manual to automatic?

Why does it change to manual after I set the service to automatic?

Why does the service not automatically restart after the server (Computer) restarts?

Why does the website service not automatically restart after windows Server is restarted.

Why cannot I restart the server (Computer) service after the service is set to automatic?

Msconfig settings are invalid.Automatic invalidation, invalid latency, Invalid registry modification,How to Prevent website services from automatically restoring to manual?

 

Preface:

PHPWAMPIs a pure green integrated environment integrated with VC.Customize PHP versionMultiple functions such as running multiple versions at the same time, force changing the password of any environment database, one-click removal of non-port 80 of the domain name, force uninstallation of any environment, force removal of Environmental obstacles, and automatic scheduled task system, some students recently found that after restarting the computer, phpwamp's website service will not be restarted. They need to manually start the website service to run the website normally, so what is the cause of this situation? Now I will analyze and solve it for you.

 

Similarly, this issue has nothing to do with PHPWAMP itself. It is caused by computer settings or automatic recovery of anti-virus software.

 

 

 

 

 

Students ask the following questions:

Students:The teacher used it for Mao.PHPWAMPOr in other integrated environments, every time the computer restarts, the website service will not automatically restart with the system? What's amazing is that some computers can start normally with the system? Is it me?Wrong posture? After you set the related website service to automatic, it's still a bird's cake! I checked a lot of online materials and did what I wrote above. The results were all futile. I went there and it was just a pitfall! How can this problem be solved?

Note: you can click an image to view the high-definition image. If you cannot see it, the article you see is reposted on another website. Please visit my blog to view the original article.

 

How can we solve this problem if we face this person above?

In the process of solving this problem, we may encounter the following problems. You only need to solve them one by one based on your own situation.

 

First introduce the general solution, and then introduce the comprehensive use of the features provided by PHPWAMP to solve this problem.

 

Solution:

Click "view all services" on the PHPWAMP main interface"

 

 

Right-clickComputers (servers)Start the service, right-click it, and click Properties.

 

 

Set it to "automatic". Generally we can set it like this, but sometimes it still doesn't work, so we can continue to look at it.

 

 

 

Solution:

EnterMsconfig, Open the System Configuration Utility to set the startup Item.

 

Then select the service tab in the startup Item, find the service you want to start from the list, set it, and restart.

This step is usually not a problem, but some people do not work after this setting!

This is because some anti-virus software optimization will reset the settings, causing msconfig to fail to be modified and will always change back to the pre-modification settings.

 

 

 

Solution:

To demonstrate how to install 360 security guard,The same applies to other anti-virus software.Enable kill firstStart item.

 

 

Find relatedWebsite ServiceClickResume startupButton, as shown in figure(The same applies to other anti-virus software)

 

If you do this, you still cannot start the website service automatically,

You can set the website services such as Apache and MySQL to "automatic (delayed startup.

In this way, the system will run the service after loading.

 

 

 

 

Ultimate general solution:

If none of the above methods works, you can create a bat file for the Service to be started with the system, and then add the startup Item.

 

For examplePHPWAMP Integration EnvironmentThe service names of Apache and mysql are respectively. Phpwamp_apache2.4And. Phpwamp_mysql,The corresponding bat code is as follows:

(For other integrated environments or self-installed environments, check the corresponding service name and check the check box)

[Php]View plain copy
  1. @ Echo off
  2. Set PHPWAMP_version = update date 20160226
  3. Title phpwamp % PHPWAMP_version % running-% ~ Dp0
  4. Net stop. phpwamp_apache2.4
  5. Net stop. phpwamp_mysql

 

 

 

Of course, you can alsoPHPWAMPOther services are also written.

[Php]View plain copy
  1. @ Echo off
  2. Set PHPWAMP_version = update date 20160226
  3. Title phpwamp % PHPWAMP_version % running-% ~ Dp0
  4. Net stop. phpwamp_apache2.2
  5. Net stop. phpwamp_apache2.4
  6. Net stop. phpwamp_mysql
  7. Net stop. phpwamp_nginx
  8. Net stop. phpwamp_php-cgi
  9. Net stop. phpwamp_svnserve
  10. Net stop. phpwamp_memcached
  11. Net start. phpwamp_apache2.2
  12. Net start. phpwamp_apache2.4
  13. Net start. phpwamp_mysql
  14. Net start. phpwamp_nginx
  15. Net start. phpwamp_php-cgi
  16. Net start. phpwamp_svnserve
  17. Net start. phpwamp_memcached

Friendly reminder: If the added service has not been installed, there may be corresponding error prompts when it is started, which can be ignored.

 

 

 

Open txt, copy the above Code, and save it as a bat suffix file,

Name the bat file as a start-up.bat, start-up is the meaning of the English start, the name is random.

 

 

 

Open this folder, as shown in.

 

 

Copy the start-up.bat file, so that every time you start, it will automatically start the services in bat.

(This operation is sensitive to anti-virus software. If it is blocked by anti-virus software, click/or close to kill software)

You can set other integration environments, or environments that you build independently.

 

 

 

Other solutions: integrated use of PHPWAMP's built-in functions

If you are usingPHPWAMPIf you encounter the above problems, you do not need to use the bat method to solve them directly with the built-in functions.

 

Enable the automatic task of restarting the computer (server) at regular intervals, and then enable the automatic task of restarting the service at regular intervals.

 

 

Generally, when we set to automatically restart the server (restart the computer), the system will automatically start the website service. If you encounter the above problem and cannot automatically restart the website service, you can restart the server first, then restart the website service. The two are staggered for a few minutes.

 

Case:For example, I want to automatically restart the server (restart the computer) at 03:18 on the 3rd and 5th every month, as shown in.

 

These two windows look very similar. You can easily differentiate the window title from the actual content. Note that the first window is to restart the server, and the second window is to restart the website service, I opened two scheduled tasks. The time can be staggered for several minutes. For details, see the red box in the image.

Note that the error opening time is correct. The first window is 3.18 minutes, and the second window is 03:28. The service starts later than the server.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.