Apache2.4 php5.6 error solution: 1. Open the httpd.conf file and load the php configuration file; 2. Modify the configuration information in php.ini; 3. Specify the path to the expansion package.
Apache2.4 PHP5.6 configuration tutorial and solutions to problems such as the Apache service failing to start and the php configuration file not taking effect
When I first learned PHP, I used Apache2.2 php5.4 mysql5. 5 combination, because I am preparing to learn Laravel and have higher requirements on the PHP version, so I changed it to PHP5.6. At the same time, because Apache2.2 does not support PHP5.5 and above, I also need to change the Apache2.4 version. The following records the replacement process and commemorates the solutions to various problems encountered during the process. First is the download of php5.6, no doubt, download the latest php5.6 in the upper right corner of the php official website (www.php.net), and then select zip download. The download speed is generally OK. Here is 64-bit, and 32-bit is below. I can’t explain the diagram clearly. Check The results obtained from the data
#加载PHP LoadModule php5_module "D:/wamp/php5/php5apache2_4.dll" #分配工作给php模块 AddType application/x-httpd-php .php .phtml #加载php配置文件PHPIniDir "D:/wamp/php5"
Pay attention to your path and the symbols/spaces in the code, it will almost never take effect. At this point, the configuration of Apache is completed. You can use the ApacheMonitor program or httpd.exe or cmd command in the bin directory in the Apache directory (httpd.exe -w -n "Apache2.4" -k start, this command can also display the error reason for startup failure) or in the windows service Start the Apache service. After normal startup, you can access localhost with your browser. If It Works appears, it means Apache is running successfully. You can create a new php file in the default website root directory (htdocs directory under the Apache directory) and write phpinfo() in it. ;, open the browser to view the php version information. If the normal display shows that php has been successfully added to Apache
According to convention, some commonly used PHP extensions should be enabled below, generally including curl, mbstring, mysql, mysqli, PDO_mysql, etc. The method to enable them is to find a string of codes similar to extension=php_mysql.dll in php.ini, which will require Just remove the semicolon in front of the enabled extension. No explanation will be given.
A problem I encountered here is that after opening the extension, restarting the Apache server N times did not take effect! I once suspected that there was something wrong with the Apache configuration. After checking the information and constantly trying, I found a very low-level error, that is, php also has its default path c:\php. Anyway, it is on the c drive. I have the d drive here, so I need Specify the path of the extension package: extension_dir = "D:/wamp/php5/ext", and then find that the extension is finally enabled.
Since I have already installed Mysql5.5 before, I have forgotten the specific steps, so I won’t be stupid here.
To summarize, the most common problem I encountered during this upgrade process is that the default paths of Apache and PHP were not modified in time. Their default paths are all on the c drive. Generally, we will not change our own paths under Windows. The file is placed on the C drive, so I believe most people will experience these problems. I hope it will be helpful to you, and it will also be a reference for me to upgrade again in the future.
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of How to solve the error problem of apache2.4 php5.6. For more information, please follow other related articles on the PHP Chinese website!

The article compares ACID and BASE database models, detailing their characteristics and appropriate use cases. ACID prioritizes data integrity and consistency, suitable for financial and e-commerce applications, while BASE focuses on availability and

The article discusses securing PHP file uploads to prevent vulnerabilities like code injection. It focuses on file type validation, secure storage, and error handling to enhance application security.

Article discusses best practices for PHP input validation to enhance security, focusing on techniques like using built-in functions, whitelist approach, and server-side validation.

The article discusses strategies for implementing API rate limiting in PHP, including algorithms like Token Bucket and Leaky Bucket, and using libraries like symfony/rate-limiter. It also covers monitoring, dynamically adjusting rate limits, and hand

The article discusses the benefits of using password_hash and password_verify in PHP for securing passwords. The main argument is that these functions enhance password protection through automatic salt generation, strong hashing algorithms, and secur

The article discusses OWASP Top 10 vulnerabilities in PHP and mitigation strategies. Key issues include injection, broken authentication, and XSS, with recommended tools for monitoring and securing PHP applications.

The article discusses strategies to prevent XSS attacks in PHP, focusing on input sanitization, output encoding, and using security-enhancing libraries and frameworks.

The article discusses the use of interfaces and abstract classes in PHP, focusing on when to use each. Interfaces define a contract without implementation, suitable for unrelated classes and multiple inheritance. Abstract classes provide common funct


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version
Useful JavaScript development tools