search
HomeBackend DevelopmentPHP TutorialHow to install PHP development environment? PHP environment installation configuration_PHP tutorial

How to install the PHP development environment? This may be a troublesome thing for PHP beginners. He needs to install php, mysql, apache or php mysql iis. The editor will introduce the first method below.

Build a PHP development environment
Time: 8.1
Requirements:

Manually install the php environment (the integrated environment does not count, only winow is enough, linux is used as a reference, but the question can also be asked under linux).
Including mysql+php+apache+phpadmin, the version is not limited. It is required to be able to perform web testing.
Install development IDE, including (zend 5+ editplus+emeditor+dreamweaver)
Manual:
http://www.php.net/manual/zh/install.windows.php
http://www.php.net/manual/zh/install.windows.apache2.php
http://www.php.net/manual/zh/install.windows.extensions.php


Reference content:
http://www.php.net/manual/zh/install.unix.php
http://www.php.net/manual/zh/install.pecl.php

Follow content: phpinfo, whether the installation is successful or not, mainly depends on this!

======================================

1. Installation sequence of apache, mysql, php under windows
Answer: apache and mysql must be installed before php. The installation order of apache and mysql is arbitrary

2. After the php_curl extension is enabled, why is it prompted that the curl service is not enabled? How to solve it?
Answer: After moving the libeay32.dll, ssleay32.dll, php5ts.dll, php_curl.dll files in the PHP directory to the system32 directory, restart apache

3. Three ways to make php work in apache2.x under windows?
Answer: handler, cgi, fastcgi

Note: Generally, the module is installed as handler

========================================

1. After configuring apache php, enter http://localhost on the browser. The page does not respond because the default page DirectoryIndex is not configured

2. There will be such a problem when downloading the PHP package. There is no php5apache2_2.dll extension in the downloaded PHP package. This is because there are two types when downloading the package

3. Two sentences are usually added when configuring apache PHP
LoadModule php5_module E:/PHP/php-5.2.10/php5apache2_2.dll #PHP Directory
AddType application/x-httpd-php .php #File type for executing php
But sometimes an error will be reported. The reason is to see if there are more spaces in the two paragraphs added. There are spaces after x-httpd-php

==============================================

1. When installing the environment under Windows, when php and apache are combined and configured, the configuration files of php and apache are modified, and apache is restarted. How to solve the problem of "the requested operation has failed"?
Answer: When the above error occurs, it is impossible to determine which one is the problem. You can use the doc command to find out the cause of the error. First, you need to enter the directory where apache is located, and then type the command: httpd.exe -w -n "Apache2.2" -k start 
Detailed information will be provided below.
Note: Make sure the php5_apache2_2.dll file exists under the php directory;
When configuring apache, be sure to introduce this file and specify it in the correct directory;
Pay attention to the space problem when editing the apache configuration. If there are extra spaces, it may cause errors;

Annotation: I feel like your question is that there is no connection between php and apache at all, so it’s not very clear

2. How to configure the server to only handle get and post requests when installing the php+apache+mysql development environment under windows?
Answer: The configuration file for configuring apache is as follows:

Deny from all

Annotation: This one was not found

3. Myql installation is completed, but "Start service" cannot be displayed. Why is this?
Answer:

Comment: I don’t know if this is correct, it sounds like mysql has already been installed, but installing another one will cause conflicts

==========================================

1, add debugging code
Create a debug.php file. You can add $_GET, $_POST and other values ​​inside. Then set: include_path = "c:/php" in php.ini and put debug.php in this folder.
If you want to add public header and tail files, you can do the same:
Find in ini Automatically add files before or after any PHP document.

auto_prepend_file = auto_prepend_file.php; //Attach to the head
auto_append_file = auto_append_file.php; //Attach to the tail

2. How to prevent the string in Html/PHP format from being interpreted, but displayed as it is
Example:
PHP";

The code is as follows Copy code
Echo "Explained: ".$ str."Processed:";
 代码如下 复制代码
Echo "被解释过的: ".$str."经过处理的:";
Echo htmlentities(nl2br($str)); //两次转换后输出。
?>
Echo htmlentities(nl2br($str)); //Output after two conversions.

?>


3. How to configure the GD library
1: Copy all dll files in the dlls folder to the system32 directory c:windowssystem32
2: Open php.ini
Set extension_dir = "c:/php/extensions/"; 3:extension=php_gd2.dll; Remove the comma in front of extension. If there is no php_gd2.dll, the same is true for php_gd.dll. Make sure that this file does exist c:/php/extensions/php_gd2.dll

Note: Generally use environment variables, there is no need to move the dlls folder to c:windowssystem32

================================================== ====锫奕


1. When judging whether the $_POST global variable has passed parameters, can you use if?
Answer: It is recommended to use isset(). If is a judgment statement, and the variables in it must have been defined, so if cannot be used.

Note: Global variables are also called external variables, which are variables defined outside the function.

Note: isset() determines whether the variable is declared, and then determines others. If you are lazy, you can use empty()

$_POST is a global variable, which means it has been defined, so it can be used


2. When submitting the form, what content is submitted?

Answer: When submitting, what is submitted is the name and value attributes of the label, where name is the key value and value is the array element. If the label does not have a name attribute, it will not be submitted.

Comment: I don’t know what your submission refers to, but I know that if there is a submission address, he will find that address, and the value after submission will be empty. Is that what you mean?

Note: When the form is submitted, if it is get, it is get, if it is post, there is a difference in encoding method! You can pay attention to it! In addition, some even have a name, but when there is no value, the truth cannot be obtained using isset().



3. What is a session?

Answer: When a user visits a website, a session is established to communicate with the server. When all pages of the entire website are closed, the session ends and the session is released.

Annotation: As far as WEB development is concerned, a session is a call between you and the server through the browser, but this call is implemented by browsing with the browser

This is my Baidu. I don’t know if it’s correct, and I don’t really understand it either. But it looks like that, Tom explained

Note: A session is a session maintained between the browser and the server. The session is not global level, but user global level. Under normal circumstances, this will be the browser life cycle, the browser is closed, and the session ends! Of course this can also be configured. See the session section in php.ini. When you open a new window, a new session will be started, but if you open a new window from an old window, a new session will not be generated (you can test this).

================================================== ========


1. Can two Apache machines in the LAN access each other?
Yes
Just modify the configuration of httpd.conf.
The added IP is 192.168.0.1 (this is a LAN intranet IP)
Modify Listen configuration to
Listen 192.168.0.1:80 and then restart apache
In addition: First, the server's firewall must be turned off. If you are using an XP system, the system's own firewall must be turned off.

Second, configuration issues
 代码如下 复制代码

Order allow,deny
Allow from all
The code is as follows Copy code
Order allow,deny Allow from all

Annotations: 1. The added IP is 192.168.0.1 (this is a LAN intranet IP). Should this be added in WindowsSystem32driversetchosts?

Tom’s note: The domain name configuration only points the domain name of this machine to which IP, but when accessing, the host name will also be brought there!

The server needs to configure a virtual host to monitor this IP, and set up diversion according to the host name before it can be accessed.

2. Why should we modify this Listen configuration

Note: Indicates which port the server is listening on

2. Is there any other php extension library besides ext? For example, where should I find the DLL that connects to a database other than MySQL?
There are many extension libraries, such as curl, etc., or you can write your own. php_dba.dll and php_oci8.dll should come with PHP, and the commonly used ones should be in php/ext.

Note: Except for the dll library that comes with it, others need to compile the dll by others or themselves. The manual has how to compile it.

3.php How to publish a complete website project (windows/linux/unix)? Can it be placed directly in the www directory?
Answer (checked online)
a. Publish directly from the code repository
On the server svn export ....
b. If there are many servers,
(1) On a publishing server svn export ...
(2) Then push to other servers, rsync....

Comment: Can’t understand

Note: As long as it can be posted.
================================================== =====

1. The process of apache, mysql and php under windows
Answer: First install apache or mysql database. After both are successfully installed, finally install php

2. After the installation is completed, build the link online project locally. Since the database link uses pdo, how to enable the pdo extension?
Answer: Copy the php_pdo.dll file in the PHP directory to the system32 directory, then open php.ini and find extension=php_pdo.dll; remove the semicolon in front of extension

3. How to customize a local domain name to access local projects, such as building a local branch project
Answer: Link customization, for example, define the access address as: bendi.homelink.com.cn, open the directory: C:WINDOWSsystem32driversetc, find the hosts file and open it, add 127.0.0.1 bendi.homelink.com.cn to the last line, close and save !
Then open httpd.conf for editing and add:

ServerAdmin email address
The code is as follows
 代码如下 复制代码
NameVirtualHost *:80
   
ServerAdmin 邮箱地址
DocumentRoot 项目存放路径
ServerName bendi.homelink.com.cn

Copy code

NameVirtualHost *:80
DocumentRoot project storage path ServerName benti.homelink.com.cn

After joining, save and close, then restart apache and browser to access directly with the custom domain name http://www.bkjia.com/PHPjc/632847.html
www.bkjia.com
true
http: //www.bkjia.com/PHPjc/632847.htmlTechArticleHow to install the PHP development environment? This may be a troublesome thing for PHP beginners. He needs to install php, mysql, apache or php mysql iis, the editor will introduce the first one below. ...
Statement
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
如何在 Google Docs 中安装自定义字体如何在 Google Docs 中安装自定义字体Apr 26, 2023 pm 01:40 PM

GoogleDocs在学校和工作环境中变得很流行,因为它提供了文字处理器所期望的所有功能。使用Google文档,您可以创建文档、简历和项目提案,还可以与世界各地的其他用户同时工作。您可能会注意到GoogleDocs不包括MicrosoftWord附带的所有功能,但它提供了自定义文档的能力。使用正确的字体可以改变文档的外观并使其具有吸引力。GoogleDocs提供了大量字体,您可以根据自己的喜好从中选择任何人。如果您希望将自定义字体添加到Google文档,请继续阅读本文。在本文中

如何在技嘉主板上设置键盘启动功能 (技嘉主板启用键盘开机方式)如何在技嘉主板上设置键盘启动功能 (技嘉主板启用键盘开机方式)Dec 31, 2023 pm 05:15 PM

技嘉的主板怎么设置键盘开机首先,要支持键盘开机,一定是PS2键盘!!设置步骤如下:第一步:开机按Del或者F2进入bios,到bios的Advanced(高级)模式普通主板默认进入主板的EZ(简易)模式,需要按F7切换到高级模式,ROG系列主板默认进入bios的高级模式(我们用简体中文来示范)第二步:选择到——【高级】——【高级电源管理(APM)】第三步:找到选项【由PS2键盘唤醒】第四步:这个选项默认是Disabled(关闭)的,下拉之后可以看到三种不同的设置选择,分别是按【空格键】开机、按组

修复:在 Xbox 应用上的 Halo Infinite(Campaign)安装错误代码 0X80070032、0X80070424 或 0X80070005修复:在 Xbox 应用上的 Halo Infinite(Campaign)安装错误代码 0X80070032、0X80070424 或 0X80070005May 21, 2023 am 11:41 AM

<p><strong>HaloInfinite(Campaign)</strong>是一款第一人称射击视频游戏,于2021年11月推出,可供单人和多用户使用。该游戏是Halo系列的延续,适用于Windows、XboxOne和Xbox系列的用户X|S。最近,它还在PC版XboxGamePass上发布,以提高其可访问性。大量玩家报告在尝试使用WindowsPC上的<strong>Xbox应

Win11如何回退版本?Win11如何回退版本?Jun 30, 2023 pm 05:21 PM

Win11怎么退版本?很多朋友在升级了win11后认为其不好用,那么大家可以选择退回之前的版本哦。那么你知道该如何操作嘛?很多用户都不知道,其实方法并不难,下面小编给大家带来退回Win10的方法分享,一起来学习吧。退回Win10的方法分享1、进入“设置”。2、选择“WindowsUpdate”,然后点击“恢复”。3、在“恢复选项”中选择“以前版本的Windows”,点击“返回”。4、选择原因,然后点击“下一步”。5、你将看到“检查更新”的通知,选择“不,谢谢”。6、阅读需要了解的内容,然后点击“

Windows 11 Lite:它是什么以及如何在您的 PC 上安装它Windows 11 Lite:它是什么以及如何在您的 PC 上安装它Apr 14, 2023 pm 11:19 PM

我们深知MicrosoftWindows11是一个功能齐全且设计吸引人的操作系统。但是,用户一直要求Windows11Lite版本。尽管它提供了重大改进,但Windows11是一个资源匮乏的操作系统,它可能很快就会使旧机器混乱到无法顺利运行的地步。本文将解决您最常问的关于是否有Windows11Lite版本以及是否可以安全下载的问题。跟着!有Windows11Lite版本吗?我们正在谈论的Windows11Lite21H2版本是由Neelkalpa的T

神舟炫龙m7e8s3如何启用独立显卡直连?神舟炫龙m7e8s3如何启用独立显卡直连?Jan 04, 2024 am 09:24 AM

神舟炫龙m7独显直连怎么开要开启神舟炫龙m7的独立显卡直连功能,您可以按照以下步骤进行操作:1.首先,确保您已经安装好了独立显卡的驱动程序。您可以前往神舟官方网站或独立显卡厂商官网下载并安装适合您显卡型号的最新驱动程序。2.在电脑桌面上,右键单击空白处,在弹出的菜单中选择“NVIDIA控制面板”(如果是AMD显卡,则选择“AMDRadeon设置”)。3.在控制面板中,找到“3D设置”或类似命名的选项,点击进入。4.在“3D设置”中,您需要找到“全局设置”或类似命名的选项。在这里,您可以指定使用独

如何辨别耐克鞋子的真假鞋盒(掌握一招轻松识别)如何辨别耐克鞋子的真假鞋盒(掌握一招轻松识别)Sep 02, 2024 pm 04:11 PM

耐克作为全球知名的运动品牌,其鞋子备受瞩目。然而,市场上也存在大量的假冒伪劣商品,其中就包括假冒的耐克鞋盒。辨别真假鞋盒对于保护消费者的权益至关重要。本文将为您提供一些简单而有效的方法,以帮助您辨别真假鞋盒。一:外包装标题通过观察耐克鞋盒的外包装,可以发现许多细微的差异。真正的耐克鞋盒通常具有高品质的纸质材料,手感光滑,且没有明显的刺激性气味。正品鞋盒上的字体和标志通常清晰、精细,并且没有模糊或颜色不协调的情况。二:LOGO烫金标题耐克鞋盒上的LOGO通常是烫金工艺,真品鞋盒上的烫金部分会呈现出

拯救者y7000p玩cf分辨率多少(拯救者y7000玩cf怎么调全屏)拯救者y7000p玩cf分辨率多少(拯救者y7000玩cf怎么调全屏)Jan 07, 2024 am 10:13 AM

拯救者y7000p玩cf分辨率多少拯救者Y7000P玩CF的分辨率为1920*1080。因为该电脑配备了GTX1650显卡和i5-9300H处理器,性能较为优秀,足以满足CF这类游戏的需求。同时,1920*1080是目前主流电竞显示器的分辨率,画质清晰度足够。另外,如果有更高要求的玩家,可以适当降低游戏画质的设置,以获得更加流畅的游戏体验。为了享受更清晰的视觉体验,你可以将拯救者y7000p的分辨率调整为2560*1400。这样,你将能够享受到更高质量的图像显示。拯救者Y7000P2022款搭载

See all articles

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 agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools