Home Backend Development PHP Tutorial Solution to Apache server not working_PHP tutorial

Solution to Apache server not working_PHP tutorial

Jul 21, 2016 pm 03:10 PM
apa apache iis one occupy reason method server use port solve Thunder

Reason 1: Port 80 is occupied by, for example, IIS, and the other is Thunder. My apache server is disabled by Thunder and cannot be enabled!

Reason 2: Software conflict. Installing certain software will prevent apache from starting, such as Dr.com. Open the network connection->TcpIp Properties->Advanced->WINS tab and uncheck the lmhosts of netbios. , disable tcp/ip netbios. Then start it again and it should be fine.


Reason 3: httpd.conf configuration error. If the apache configuration file httpd.conf is wrong and you start it in windows, it will prompt the requested operation has failed. This is quite depressing because of the error checking. It takes a long time to see. In fact, you can use the command line mode to start apache and bring the parameters. Apache will prompt you which sentence is wrong, and then you can solve it in a targeted manner.

How to check for errors

Enter cmd and then enter the Apache installation directory (specifically your own installation directory) bin> httpd.exe -w -n "Apache2" - k start (change the Apache2 in quotation marks to your Apache service name. Mine is version 2.2.4, and the service name is Apache2. You can find it in the computer service)

When there is a problem with line 133 (prompt: Syntax error on line 133 of ...........), open the Apache installation directory confhttpd.conf and find the ServerAdmin on line 133 (if there is no tool to determine the number of lines, press ctrl+F and use the "ServerAdmin" keyword to search , there are usually two, the one below is). Leave a blank space after this line, and add a name at will. For example, after adding abc, it can be solved.

If it is a port occupation (tip: (OS 10048) Usually each socket address (protocol/network address/port) is only allowed to be used once). Exit Apache first, search for Listen 80 in httpd.conf, and change 80 to 8080 or other port numbers. Re-run Apache and it should be able to start now.

Solution to the incorrect website root directory setting


If the root directory of the website is not set correctly, it will not start. Apache has a lot of problems. There are two problems. Find Apache/htdocs in httpd.conf. Just modify it, such as K:/IDDCWEB/wwwroot. Generally, the "" in the file address should be changed to "/" in Apache. If you use the Apache2.24 version, you should choose php5apache2_2.dll in php to load.

Attached below are some settings for modifying httpd.conf. For your reference and comparison.

1. There are two ways to change the root directory of the website. Find DocumentRoot and Directory. Just modify it, such as D:/wwwroot; the main reason is that the "" in the general file address must be changed to "/" in Apache.

2. Home page settings, DirectoryIndex, just add relevant home page items, such as index.php ihdex.htm

3. Find LoadModule ssl, add two lines below, the first line is "LoadModule php5_module. D:/Server/php/php5apache2_2.dll" refers to loading php in module mode. The second line "PHPIniDir "D:/php"" indicates the location of php's configuration file php.ini. Of course, "D:/php" needs to be changed to the directory where php is decompressed that you selected previously.

4. Find AddType application/x-gzip .gz .tgz, and add the two lines "AddType application/x-httpd-php .php" and "AddType application/x-httpd-php .html" below. , you can also add more. The essence is to add file types that can execute php. For example, if you add a line "AddType application/x-httpd-php .htm", then the .htm file can also execute php programs. You can even You can also add the previous line "AddType application/x-httpd-php .txt" so that ordinary text file formats can also run php programs.

5. Search ServerName and change the port after the website name to the previously changed port. If it has not been changed, omit it.


D:Program FilesApache2.2bin>httpd -t. [Wed Jun 22 14:34:49 2011] [warn] module php5_module is already loaded, skipping Syntax error on line 503 of D:/Program Files/Apache2.2/conf/httpd.conf:
PHPINIDir takes one argument , Directory containing the php.ini file. This is very simple. Use Notepad to open "D:/Program Files/Apache2.2/conf/httpd.conf". Do you see a [PHPIniDir ""] in the last few lines? The reason for the error is that a parameter is missing within the double quotes.

Solution:
Find your php installation directory, for example, mine is D:/Program Files/PHP, you only need to add "D:/Program Files/" to the double quotes above PHP/php.ini"

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327003.htmlTechArticleReason 1: Port 80 is occupied by, for example, IIS, and the other is Thunder. My apache server is disabled by Thunder and cannot be enabled! Reason 2: Software conflict. Installing certain software will prevent apache from starting...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to set font size on mobile phone (easily adjust font size on mobile phone) How to set font size on mobile phone (easily adjust font size on mobile phone) May 07, 2024 pm 03:34 PM

Setting font size has become an important personalization requirement as mobile phones become an important tool in people's daily lives. In order to meet the needs of different users, this article will introduce how to improve the mobile phone use experience and adjust the font size of the mobile phone through simple operations. Why do you need to adjust the font size of your mobile phone - Adjusting the font size can make the text clearer and easier to read - Suitable for the reading needs of users of different ages - Convenient for users with poor vision to use the font size setting function of the mobile phone system - How to enter the system settings interface - In Find and enter the "Display" option in the settings interface - find the "Font Size" option and adjust it. Adjust the font size with a third-party application - download and install an application that supports font size adjustment - open the application and enter the relevant settings interface - according to the individual

Introduction to the specific process of setting up Thunder downloads in Google Chrome Introduction to the specific process of setting up Thunder downloads in Google Chrome May 09, 2024 pm 01:01 PM

First install Google Chrome and Thunder software. After installation, open Google Chrome and click on the Settings option. Then we select the extension in the settings options. Because we want to enable Thunder downloads, which is generally not available here, so click below to get more extensions. Then we enter Google's online app store and enter [Thunder] in the search box and select the first related search in the drop-down box. At this time, we find the extension column in the display results, and then find thunderdownload extension for chrome. Then click Free on the right to download and install. Then it will be displayed after the addition is successful. Next, enter the extension program. You will find that the newly added Thunder extension program is enabled, indicating that

How to choose a mobile phone screen protector to protect your mobile phone screen (several key points and tips for purchasing mobile phone screen protectors) How to choose a mobile phone screen protector to protect your mobile phone screen (several key points and tips for purchasing mobile phone screen protectors) May 07, 2024 pm 05:55 PM

Mobile phone film has become one of the indispensable accessories with the popularity of smartphones. To extend its service life, choose a suitable mobile phone film to protect the mobile phone screen. To help readers choose the most suitable mobile phone film for themselves, this article will introduce several key points and techniques for purchasing mobile phone film. Understand the materials and types of mobile phone films: PET film, TPU, etc. Mobile phone films are made of a variety of materials, including tempered glass. PET film is relatively soft, tempered glass film has good scratch resistance, and TPU has good shock-proof performance. It can be decided based on personal preference and needs when choosing. Consider the degree of screen protection. Different types of mobile phone films have different degrees of screen protection. PET film mainly plays an anti-scratch role, while tempered glass film has better drop resistance. You can choose to have better

What should I do if the video format does not support playback? Recommended video players that support many formats What should I do if the video format does not support playback? Recommended video players that support many formats May 09, 2024 am 08:19 AM

What should I do if the video format does not support playback? This situation usually occurs because the player lacks the corresponding decoding package. The video player that comes with the Windows system can support relatively few formats. It cannot play certain niche video formats. It is recommended that you download them here. KMPlayer software, after installation, the built-in decoder supports most video formats. KMPlayer is a professional and practical all-round audio and video player tool. KMPlayer supports video playback in various common formats and can be used to play local videos smoothly without lag. Question: What are the commonly used shortcut keys for KMPlayer? Answer: Software color adjustment increases U and decreases T. (Used when using the built-in decoder of kmp player)

How to conduct concurrency testing and debugging in Java concurrent programming? How to conduct concurrency testing and debugging in Java concurrent programming? May 09, 2024 am 09:33 AM

Concurrency testing and debugging Concurrency testing and debugging in Java concurrent programming are crucial and the following techniques are available: Concurrency testing: Unit testing: Isolate and test a single concurrent task. Integration testing: testing the interaction between multiple concurrent tasks. Load testing: Evaluate an application's performance and scalability under heavy load. Concurrency Debugging: Breakpoints: Pause thread execution and inspect variables or execute code. Logging: Record thread events and status. Stack trace: Identify the source of the exception. Visualization tools: Monitor thread activity and resource usage.

Application of algorithms in the construction of 58 portrait platform Application of algorithms in the construction of 58 portrait platform May 09, 2024 am 09:01 AM

1. Background of the Construction of 58 Portraits Platform First of all, I would like to share with you the background of the construction of the 58 Portrait Platform. 1. The traditional thinking of the traditional profiling platform is no longer enough. Building a user profiling platform relies on data warehouse modeling capabilities to integrate data from multiple business lines to build accurate user portraits; it also requires data mining to understand user behavior, interests and needs, and provide algorithms. side capabilities; finally, it also needs to have data platform capabilities to efficiently store, query and share user profile data and provide profile services. The main difference between a self-built business profiling platform and a middle-office profiling platform is that the self-built profiling platform serves a single business line and can be customized on demand; the mid-office platform serves multiple business lines, has complex modeling, and provides more general capabilities. 2.58 User portraits of the background of Zhongtai portrait construction

Equipped with AMD EPYC 4004 series processors, ASUS launches a variety of server and workstation products Equipped with AMD EPYC 4004 series processors, ASUS launches a variety of server and workstation products Jul 23, 2024 pm 09:34 PM

According to news from this website on July 23, ASUS has launched a variety of server and workstation-level products powered by AMD EPYC 4004 series processors. Note from this site: AMD launched the AM5 platform and Zen4 architecture EPYC 4004 series processors in May, offering up to 16-core 3DV-Cache specifications. ASUSProER100AB6 server ASUSProER100AB6 is a 1U rack server product equipped with EPYC Xiaolong 4004 series processor, suitable for the needs of IDC and small and medium-sized enterprises. ASUSExpertCenterProET500AB6 workstation ASUSExpertCenterProET500AB6 is a

How to leverage Kubernetes Operator simplifiy PHP cloud deployment? How to leverage Kubernetes Operator simplifiy PHP cloud deployment? May 06, 2024 pm 04:51 PM

KubernetesOperator simplifies PHP cloud deployment by following these steps: Install PHPOperator to interact with the Kubernetes cluster. Deploy the PHP application, declare the image and port. Manage the application using commands such as getting, describing, and viewing logs.

See all articles