windows7x64 apache php environment construction
php的在windows上的运行环境每次搭建一次脱层皮,各种折腾。
主要原因:
- apache server默认不支持windows
- php有好多个版本,下载下来不一定支持apache
- 都下载对了,还要配置php和apache
1、下载php
必须为thread safe版,否则没有php5apache2_4.dll,无法与apache集成。
同时要看下php提供的apache的dll的版本,方便下载对应版本的apache
2、下载支持windows的apache服务器
apache服务器,默认是不支持windows的,只提供源码包,下载下来自己编译,在linux上方便多了,在windows上,恶梦。
apache官方说明,有第三方组织,自愿编译提供windows版本的apache,可以找到后下载。
apache下载页
这个组织ApacheHaus的就不错
下载后解压,修改配置文件
#httpd-2.4.16-x64-vc11\Apache24\conf # 默认的Define SRVROOT "/Apache24"改为自己的apache目录 Define SRVROOT "E:\\php\\httpd-2.4.16-x64-vc11\\Apache24" ServerRoot "${SRVROOT}"
启动apache
httpd-2.4.16-x64-vc11\Apache24\bin\httpd.exe
访问 http://127.0.0.1
只要能出页面就表示服务器正常。
3、配置php
复制一份php.ini-development,改为php.ini即可,若用到数据库等扩展,稍后再改。
date.timez
4、配置apache
# 默认的Define SRVROOT "/Apache24"改为自己的apache目录 Define SRVROOT "E:\\php\\httpd-2.4.16-x64-vc11\\Apache24" ServerRoot "${SRVROOT}" #define php.ini PHPIniDir "E:\\php\\php-5.6.11-Win32-VC11-x64" LoadModule rewrite_module modules/mod_rewrite.so LoadModule php5_module E:\\php\\php-5.6.11-Win32-VC11-x64\\php5apache2_4.dll #define php.ini PHPIniDir "E:\\php\\php-5.6.11-Win32-VC11-x64\\" DocumentRoot "E:\\php\\wwwroot" <Directory "E:\\php\\wwwroot"> DirectoryIndex index.html index.php AddType application/x-httpd-php .php
5、phpinfo()
#wwwroot\phpinfo.php <?php phpinfo(); ?>
访问测试。
以上就介绍了windows7x64 apache php环境搭建,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

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

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

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

Hot Topics











AI can help optimize the use of Composer. Specific methods include: 1. Dependency management optimization: AI analyzes dependencies, recommends the best version combination, and reduces conflicts. 2. Automated code generation: AI generates composer.json files that conform to best practices. 3. Improve code quality: AI detects potential problems, provides optimization suggestions, and improves code quality. These methods are implemented through machine learning and natural language processing technologies to help developers improve efficiency and code quality.

Handling high DPI display in C can be achieved through the following steps: 1) Understand DPI and scaling, use the operating system API to obtain DPI information and adjust the graphics output; 2) Handle cross-platform compatibility, use cross-platform graphics libraries such as SDL or Qt; 3) Perform performance optimization, improve performance through cache, hardware acceleration, and dynamic adjustment of the details level; 4) Solve common problems, such as blurred text and interface elements are too small, and solve by correctly applying DPI scaling.

session_start()iscrucialinPHPformanagingusersessions.1)Itinitiatesanewsessionifnoneexists,2)resumesanexistingsession,and3)setsasessioncookieforcontinuityacrossrequests,enablingapplicationslikeuserauthenticationandpersonalizedcontent.

The main functions of ApacheHTTPServer include modular design, virtual host configuration and performance optimization. 1. Modular design implements functions by loading different modules, such as SSL encryption and URL rewriting. 2. Virtual host configuration allows multiple websites to be run on one server. 3. Performance optimization improves performance by adjusting parameters such as ServerLimit and KeepAlive.

HTML5 brings five key improvements: 1. Semantic tags improve code clarity and SEO effects; 2. Multimedia support simplifies video and audio embedding; 3. Form enhancement simplifies verification; 4. Offline and local storage improves user experience; 5. Canvas and graphics functions enhance the visualization of web pages.

To safely and thoroughly uninstall MySQL and clean all residual files, follow the following steps: 1. Stop MySQL service; 2. Uninstall MySQL packages; 3. Clean configuration files and data directories; 4. Verify that the uninstallation is thorough.

MySQL functions can be used for data processing and calculation. 1. Basic usage includes string processing, date calculation and mathematical operations. 2. Advanced usage involves combining multiple functions to implement complex operations. 3. Performance optimization requires avoiding the use of functions in the WHERE clause and using GROUPBY and temporary tables.

Cross-platform development in C is recommended to use VisualStudioCode, CLion and QtCreator. 1. VisualStudioCode is lightweight and flexible, suitable for multi-platform development, but the initial configuration is more complicated. 2. CLion integrates CMake, suitable for cross-platform projects, but licenses are expensive. 3.QtCreator supports cross-platform development, with built-in Qt library, but the learning curve is steep.
