


Tutorial on setting up a PHP development environment under Windows (Apache PHP MySQL), apachemysql
Jul 06, 2016 pm 02:24 PMTutorial on setting up PHP development environment under Windows (Apache PHP MySQL), apachemysql
Since it is often necessary to re-establish the PHP environment after changing computers or reinstalling the system, this time I will briefly record Windows Below is the process of setting up a PHP environment. For specific steps, please refer to online information
Preparation:
To manually build a PHP environment under Windows, you need to download the corresponding software first. It should be noted that the versions of Apache and PHP must be consistent (both 32-bit or 64-bit). If the versions are inconsistent, the integration of Apache and PHP will be unsuccessful. That is, after modifying the configuration file, when starting Apache, the error shown in the figure below is reported:
In fact, there is a very detailed description at http://windows.php.net/download/. Readers can choose the corresponding version according to their own needs
The software version downloaded by the author this time is shown below:
Installation process:
1. Install Apache
Double-click installation, no different from installing other Windows software
There are no special requirements when filling in Server Information, as long as the information entered conforms to the format
After the installation is completed, enter http://localhost in the browser. If It Works! is displayed, it means that Apache is installed successfully.
2. Install PHP
Extract php-5.3.10-Win32-VC9-x86.zip to a directory. The author’s installation directory is: D:SoftwarePHP
3. Install MySQL, MySQL-Front
4. Integrate Apache PHP MySQL
(1) Allow Apache to parse php files
(2) Modify the Apache site directory
(3) Modify the php configuration file, set the specific directory of the PHP extension package, enable the corresponding library function, and set the time zone
5. Test
Create a new index.php file in the Apache site directory configured above. The code in index.php is as follows:
Copy code The code is as follows:
Enter http://localhost/ in the browser address bar. If the page displays PHP version information, it means the integration of Apache and PHP is successful
PHP Development Tools
The establishment of the PHP environment is briefly described above. As a PHP developer, you must have a suitable development tool. There are many powerful PHP development tools on the market, http://www.downcc.com/k/phpkaifa/ Some development tools are introduced. Here are two PHP development tools used by the author
(1) Zend Studio
This software is a paid software and can be tried for free. For cracking methods, please refer to http://www.imuum.com/zend-studio12-0-2-key-cracked-registration-key-download.html
The author’s local installation version: Zend Studio12.0.1
Workspace:
Project Overview:
Access address: http://localhost/Zend-workspaces/test/index.php
(2) EclipsePHP Studio
The author’s local installation version: EclipsePHP Studio 4.0
Workspace:
Project Overview:
Access address: http://localhost/EPP-workspaces/test/application/index.php
The aforementioned installation requires manual installation of various software. In fact, there are many integrated environments that can simplify these operations
Reference material: Building a PHP development environment under Windows (Apache PHP MySQL)
The above is the entire content of this article. I hope it will be helpful to everyone in learning PHP programming.

Hot AI Tools

Undress AI Tool
Undress images for free

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

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

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

The most direct way to find the last occurrence of a substring in PHP is to use the strrpos() function. 1. Use strrpos() function to directly obtain the index of the last occurrence of the substring in the main string. If it is not found, it returns false. The syntax is strrpos($haystack,$needle,$offset=0). 2. If you need to ignore case, you can use the strripos() function to implement case-insensitive search. 3. For multi-byte characters such as Chinese, the mb_strrpos() function in the mbstring extension should be used to ensure that the character position is returned instead of the byte position. 4. Note that strrpos() returns f

The reason why header('Location:...') in AJAX request is invalid is that the browser will not automatically perform page redirects. Because in the AJAX request, the 302 status code and Location header information returned by the server will be processed as response data, rather than triggering the jump behavior. Solutions are: 1. Return JSON data in PHP and include a jump URL; 2. Check the redirect field in the front-end AJAX callback and jump manually with window.location.href; 3. Ensure that the PHP output is only JSON to avoid parsing failure; 4. To deal with cross-domain problems, you need to set appropriate CORS headers; 5. To prevent cache interference, you can add a timestamp or set cache:f

When encountering the "SYSTEM_SERVICE_EXCEPTION" blue screen error, you do not need to reinstall the system or replace the hardware immediately. You can follow the following steps to check: 1. Update or roll back hardware drivers such as graphics cards, especially recently updated drivers; 2. Uninstall third-party antivirus software or system tools, and use WindowsDefender or well-known brand products to replace them; 3. Run sfc/scannow and DISM commands as administrator to repair system files; 4. Check memory problems, restore the default frequency and re-plug and unplug the memory stick, and use Windows memory diagnostic tools to detect. In most cases, the driver and software problems can be solved first.

When encountering the problem of "You need permission to perform this operation", it is usually because the Windows permission management mechanism restricts the operation. The solutions include: 1. Run the program as an administrator, right-click to select "Run as an administrator" and confirm the UAC prompt; 2. Obtain file/folder ownership, change the owner to the current user in "Properties → Security → Advanced" and replace the subcontainer; 3. Adjust the permission settings, and give yourself "full control" permissions through "Properties → Security → Edit"; 4. Check whether the file is occupied, close the relevant programs or use Unlocker and LockHunter to unoccupi. Try it one by one to solve the problem.

The COALESCE function is used to return the first non-null value in the parameter list and is suitable for processing NULL data. 1. The basic usage is to replace the NULL value, such as replacing the empty field with the default contact method; 2. It can be used to set the default value in aggregate query to ensure that 0 is returned instead of NULL when there is no data; 3. It can be used in conjunction with other functions such as NULLIF and IFNULL to enhance data cleaning and logical judgment capabilities.

The primary key is a field or combination that uniquely identifies records in a database table. Four principles must be followed when selecting: 1. Priority is given to using self-incremental integers such as INT or BIGINT to improve efficiency; 2. Avoid long strings such as UUID or mailboxes to avoid affecting performance; 3. Use business fields with caution, such as ID number due to poor stability; 4. Try not to use composite primary keys to maintain due to their complexity. At the same time, pay attention to the self-value-added configuration, delete the ID and do not recycle it, and do not manually insert the self-added field.

TooptimizecomplexJOINoperationsinMySQL,followfourkeysteps:1)EnsureproperindexingonbothsidesofJOINcolumns,especiallyusingcompositeindexesformulti-columnjoinsandavoidinglargeVARCHARindexes;2)ReducedataearlybyfilteringwithWHEREclausesandlimitingselected

When encountering Windows startup loop problem, you can try the following methods to fix it: 1. Enter safe mode to uninstall new drivers, updates or software; 2. Use the system restore point to roll back; 3. Execute the chkdsk and sfc commands to repair disks and system files; 4. Finally, consider resetting or reinstalling the system. The above steps are operated in sequence, and most cases can solve the problem without the need to format and reinstall it immediately.
