Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detailed tutorials for building a MYSQL+PHP website

2025-01-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly gives you a brief introduction to the detailed tutorials of building a MYSQL+PHP website. You can check the relevant professional terms on the Internet or find some related books to supplement them. We will not dabble here, so let's go straight to the topic. I hope this article can bring you some practical help. I hope this article can bring you some practical help.

Purpose: to master the construction process of MYSQL+PHP website.

Preparation for the experiment:

One Server, one Client.

Preparation before the experiment:

Set up a web CVM (process omitted)

The steps of the experiment:

Step one

1. Install PHP packet

Extract the php-5.1.4-Win32 package, extract it into your own folder, then change the package name of the extracted php folder to php- > then set the property information of the extracted php folder and give the local users user write permissions-> then open the php folder and find go-pear.abt And double-click the file to perform the installation-> you need to press enter four times in succession, and then after any key, the php package is installed.

two。 This step is very critical: first, copy the libmysql.dll file in C:php to C:\ windows\ windows32, then copy the php_mysql.dll file under C:\ php\ ext to C:\ windows\ windows32, and finally copy the php.ini-dist file in C:\ php to C:\ windows, and modify the copied file to php.ini. It's not finished yet, and here you have to modify the contents of this file. Put the contents of this file with The semicolon in front of this line of extension=php_mysql.dll needs to be removed.

3. Add the executable file C:\ php\ php5isapi.dll to the settings in the master configuration of the default website, and add a path C:\ php\ php5isapi.dll to the web service extension

Step two

Install MYSQL

1. Extract the MYSQL package, unzip it to your own directory, then enter the extracted folder, find the setup.exe execution file inside, double-click and execute the file Next is "next"-> Select "Typical"-> "install"-> select "Skip-Sign-Up"-> "next"-> tick "configure the mysql server now"-> "finish".

two。 Continue with "next"-> Select "standard configuration"-> "next"-> check "include bin directory in windows path"-> "next"-> here check "modify security settings" and configure the password for this selected root user-> Click "execute" to start execution-"finish".

3. Open the installed mysql---- > type "show databases;" at the command line to view the current database, then enter the database with the database name with use, and then use show tables; to view all the current files

Step three

Use the test php-test.php file to test

Copy this file into C:\ inetpub\ wwwroot and type: http://localhost/php-test.php in the address bar to verify that the MYSQL database is installed successfully

Step 4

1. Decompress the dynamic forum first

two。 Then import the extracted dynamic forum web page file into the "local path" under the home directory of the web CVM, and test the access

3. Then decompress and discuss this forum.

4. Import the extracted dynamic forum web page file into the "local path" under the home directory of the web CVM, and test the access

Here is how the experiment works:

Copy the files from the real machine to the virtual machine by network file sharing, as follows:

Change the access path.

Set asp to forbidden

Use local access

Give the following write permissions in the local user

Double-click the "go-pear.bat" execution file to start installing the php package

Press enter 4 times in a row, and then press any key to install ok.

The following is to copy the libmysql.dll of C:\ php into C:\ widnows\ system32

Copy the file php_mysql.dll in C:\ php\ ext to C:\ windows\ system32

Copy the php.ini-dist under C:\ php to C:\ windows, and change the file to php.ini

Not finished, but also to open this file, and in the editor's search to find the php_mysql.dll file, and remove the previous semicolon

Find options in configuration in the Home Directory of the default Web site, and then add

The following is the file C:\ php\ php5isapi.dll found in the file path in the web CVM extension

Let's take a look at it and find that it can't be accessed.

To install MYSQL, double-click setup.exe to begin the installation

Select "skip sign-up"

Select "standard configuration"

Check "include bin directory windows path" below

Next, check "modify security settings" and enter the password of root

Use the show command to view the database created first, use the use command to apply the database, use "show tables;" to view the files of the database, and use select * from with the specific folder of the database to view the specific file contents of the files.

Enter "services.msc" in "run" to view the created database service

Using netstat-na to check the port number opened by the mysql service, we find that the port number opened by mysql is port 3306.

Now stop the mysql service on the service side.

We found that there is no port 3306 open right now.

Now that the database is installed, let's test whether there is a problem with the database.

Now that it is found that it can be accessed, it means no problem.

Modify the suffix name of the file

Found that it is still accessible.

Change to txt document form

Found that it is still accessible.

The following is to first extract the php web page file package of the dynamic forum into a folder, and then put the uploadscopy in this folder to the wwwroot under inetpub

Found directory list reject

Now add a document "index.php"

Found that the visit is still failed.

Next, find the storage place of the database file and send it to install.php under install

Found no permission

Now that you can access it, you can begin the installation

Fill in some configuration information and save the configuration information

A database error is found, indicating that there is no database file, so we can now create a database under mysql called dvbbs

As follows:

Now the interview found that a lot of mistakes were reported.

Now check the "modify" item in the internet guest account under wwwroot, and then advanced

Check "replace the permission items of all sub-objects with the items shown here that can be applied to sub-objects" in the advanced box.

Fill in the configuration information again

Now that the check has passed, you can now begin to perform the installation

Found that the table was created successfully

Check it with mysql and find that it is also successful.

Now install the basic information of the forum

Dvbbs Forum installed successfully

Now you have to delete the file "install.php" before you can access it

Found that you can access it now.

Log in with the client

Enter http://192.168.2.1/admin on the client side to enter the background

Now you can manage the forum, and you can add plates to it.

The following is the game block created by yourself

Now to install another package with php, unzip the discussion forum package, unzip it into a folder, copy the package, and copy it to C:\ inetpub\ wwwroot\ discuz discussion forums utf8

The following is to visit and find that you cannot access the local area.

Find the database file "install.php" below

Now it is found that it can be accessed.

Choose to accept the following conditions

Some changes need to be made here.

You can start the installation now.

Database table established successfully

Also check on mysql and find that there is a database called dname.

It is found that the creation of the data list is successful.

This is the end of the detailed tutorial on building the MYSQL+PHP website. If you want to know about other related issues, you can continue to pay attention to our industry information. Our section will capture some industry news and professional knowledge to share with you every day.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report