Build a multi-rights server for local debugging

xiaoxiao2021-03-06  29

The so-called multi-rights here refers to a variety of parsing methods and permissions. Nowadays, many ambiguces have upgraded the system to Windows 2000 Pro Or Server in order to get better internet performance. And many webmasters often want to debug procedures. In order to improve efficiency and speed, save money, have established sites locally, make their own computers a server that supports ASP CGI PHP Access MySQL, now we will Take a look at how to implement it. We use ASP Access CGI PHP MySQL to build a multi-rights server for local debugging, improve your productivity, making your website more well. The whole process of this installation is conducted in the C drive, the operation platform is Windows2000 Server, which is ready to need. 1. ActivePerl-5.6.1.631-mswin32-x86.msi (Huajun has downloaded) 2. PHP-420-WIN32.ZIP (Http://www.php.net has download) 3. MySQL-3.23.46A-Win. Zip (http://www.mysql.com has downloaded)

First, the installation of the component

1. ASP Access support

Since Windows's IIS has built-in support for ASP Access, we don't need to manage it. The focus is CGI PHP MySQL.

2. CGI support

Because it is your own computer, the server is used to debug a variety of code locally, so there is no need to install the FTP server. First install ActivePerl-5.6.1.631-mswin32-x86.msi, installation is simple, follow the prompts to be installed to C: / Perl, open "Internet Service Manager" in the default site -> Property Enters the site configuration dialog Box, IP address selection you are using, such as 127.0.0.1, select the "Main Directory" tag, select the directory other than the system partition, such as E: / Sundic / Sangel, with a "configuration" below Button, after entering the "Application Configuration" dialog box, click Add "in the Application Mapping tab, enter" .cgi "in the extension name text box Click the Browse button, select the file type * .dll Select C: /perl/bin/perlis.dll, select "Limited to" in the action column, then enter GET, HEAD, POST, TRACE (Note "," with a half angle) in the back text box. As shown in Figure 1. Add ".pl" with the same method.

Figure one

This will support the CGI program. Let's write a simpler program to test it, open the notepad, write the following statement:

#! / usr / bin / perlprint "content-type: text / html / n / n"; Print "debugging success / n";

Then save to Test.cgi. Open the browser, type http://127.0.0.1/test.cgi, if the browser is successful, the browser outputs four words of "debugging success". But don't open Test.cgi from the file -> open, otherwise the above code is appeared. CGI does not need any CGI-BIN virtual directory, any directory can be executed, and if you need it, create a CGI-BIN does not affect the run.

3. PHP support

Use decompression software to extract PHP-420-WIN32.ZIP to C: / PHP, then copy php.ini-dist of D: / Winnt and renamed it is php.ini. Copy the php4ts.dll file under C: / PHP to C: / WinNT / System32. These two steps cannot be small, otherwise it will be wrong. Open the Internet Service Manager Site Configuration dialog box Click Add in the ISAPI Filter tab, enter "PHP" in Filter Name, "Executable File" by browsing C: / PHP / SAPI / PHP4ISAPI.DLL, as shown in Figure 2

Select "Main Directory" tab -> Configuration -> Add, Enter ".php" in the extension text box, executable input "c: / php/sapi/php4isapi.dll ". The action is "limited to", add GET, HEAD, POST, TRACE, some programs in the text box, so add ".php3" in the same way (but if you don't need it, now there are very few If you use the CGI program, you don't have to use .pl, you don't have to add it, you don't say it is a cumbersome. Figure three

Figure three

We continue to write a script to test whether to successfully support PHP. Open the notepad, write the following statement:

There is an e: / sunidc / sangel, file name is Test.php, and all information of PHP will appear in 127.0.0.1/test.php in the address bar of the browser. Figure four

Figure four

4. Install the mysql database

This part is the top priority. Everyone must be careful, I have a lot of suffering when I first installed. I also ask a lot of masters. Install MySQL in the default C: / MySQL, otherwise we have to start MySQL service, you have to do a complex setting, extract mysql-3.23.46a-win.zip, then install it to C: / MySQL, after installation, C: /mysql/my-example.cnf Copy to C: / Under, and rename my.cnf, then open with Notepad, put the following statement

#basedir = d: / mysql / change to Basedir = C: / mysql /

Then enter the c: / mysql / bin directory at the command prompt, enter

C: /mysql/bin/mysqld-nt.exe -install

Figure 5:

Figure 5

This will join the MySQL service to the service list, then enter the management tool to start the MySQL service, so that it is installed, the password at this time is empty, we write a script test to see if it is successful. Copy the following code to Notepad and save it as mysql.php

Put it in E: / Sunidc / Sangel, then run it in the browser, good, success is successful. Figure 6:

Figure 6

This will be debugged, because the setting password is very troublesome, so you can first try again to change the password to pass the server. Or use phpMyAdmin to manage. This is slight here.

Figure 7

转载请注明原文地址:https://www.9cbs.com/read-82065.html

New Post(0)