Create a local PHP debugging environment

Source: Internet
Author: User

Introduction: This is a detailed page for building a local debugging environment for PHP. It introduces the related knowledge, skills, experience, and some PHP source code.

Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 324833 'rolling = 'no'>

For Windows, PHP provides an installation Program However, this installer cannot directly run to build a personal server platform, but must be embedded into an existing server platform, such as IIS in Windows NT or PWS in windows, and Apache. Based on my own experience, I have written down the PHP debugging environment based on the PWS personal server platform. I hope you can give 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, the commonly used C: \ WINDOWS \ SYSTEM folder.
2. in the c: \ PHP folder, find 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, and remove the read-only attribute.

Open the registry in the Registry Editor. The key value indicated by the following path is HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ W3SVC \ Parameters \ Script map in this key value, create a new string value :". PHP "data is" C: \ PHP \ php4isapi. 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 ),

At this point, the PHP File Settings are basically complete. We should set PWS below to enable it to explain the PHP script. Open PWS's personal Web Manager-> click "advanced", in the tree of the virtual directory, right-click the directory that requires PHP support. 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: \ Inetpub \ wwwroot \ 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?

More articles on "Creating a local PHP debugging environment"

Love J2EE follow Java Michael Jackson video station JSON online tools

Http://biancheng.dnbcw.info/php/324833.html pageno: 14

Related Article

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.