Create a local PHP debugging environment

Source: Internet
Author: User

For windows, PHP provides an installer, but this installer cannot be directly run to build a personal server platform. Instead, it must be embedded into an existing server platform, such: windows nt iis or Windows PWS, and Apache. Based on my own experience, I wrote out the PHP debugging environment process for building a PWS-based personal server platform.

Experts give you some advice.
Before installation, download the PHP installation program in windows. The latest version is 4.0, which can be downloaded on a large website. You cannot find it. You can download it directly at the PHP site Http: // www.php.net. Then, you can get the updated information. The downloaded file is a compressed package, generally named: php-4.0.x-win32.zip, x represents the version number, you can see the corresponding version, of course, the newer the version better. Decompress the package to the c: PHP Directory (for details, see section 3rd.). You can see that the directory contains all the files required by PHP.
After the preparation is complete, you can start the installation. First of all, needless to say, install Microsoft PWS and set various PWS parameters and related network settings. For details, refer to relevant information, you may say that I have paid for the scam. After installation, you 'd better test it first. Otherwise, the following work will be hard. Next, perform PHP embedded installation in several steps.
1. go to the c: PHP folder and you can see some *. dll files and other related files. dll files starting with php _ can be stored in c: PHP. Other dll files must be copied to the system's search path, c: windowssystem folder is commonly used.
2. in the c: php folder, find the name php. ini-dist (no extension), change the file name to php. ini, open the file in notepad, and you can see the PHP system configuration information in it. For details, refer to the description in the examination. It is only in English, and it takes a lot of effort. After the corresponding information is modified, copy php. ini to the c: windows Folder. Note that the read-only attribute is removed.
Open the registry in the Registry Editor and follow the following path to specify the key value: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesw3svcparametersScript Map to create a new string value in this key value :". php "data is" C: PHPphp4isapi. dll "(Note: This token is used to decompress the php-4.0.x-win32.zip compressed file to the directory. If your extracted directory is inconsistent with mine, change it accordingly, the PHP File Settings are basically complete. Next we should set PWS so that the PHP script can be interpreted. Open PWS's personal web Manager-> click "advanced", in the tree map of the virtual directory, right-click the directory that needs to be supported by PHP. Here I select php and select "properties ", in the pop-up "Edit directory" window, check the "read", "execute", and "script" check boxes and click "OK" to exit. II.
5. restart the computer, OK, and you will be able to build your own server platform.
When debugging the PHP script, set the corresponding *. put the PHP file in a virtual directory with the execution permission (that is, the directory set in step 1). This is very important. Put it in another directory without the execution permission, PWS won't explain the PHP script. You can open the IE browser and enter the file name of the PHP script in the address bar. The method is the same as that of the Asp script, except that the extension of the script file is PHP, while that of Asp is Asp. For example, under the C: Inetpubwwwroot php Directory (the php Directory is the directory with the corresponding execution permission set in step 4), there is a directory named: 1. php script file, you can enter: http: // 192.168.0.1/php/1.php in the address bar of IE, you can see your own program, is there a sense of success?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.