Apache Server user authentication (3)

Source: Internet
Author: User
Tags auth sql mysql mysql client php script
apache| server Currently, Apache, PHP4, MySQL are the best partners to build a Web site under Linux, these three software are free software. The combination of the three, through the HTTP protocol, the use of PHP4 and MySQL, the implementation of Apache user authentication function. PHP4 can be authenticated when it is run in Apache module mode. To do this, you need to join the PHP4 module to compile when you compile Apache. Suppose PHP4 as the Apache module, compile, install Apache to/usr/local/apache directory, compile, install MySQL to/usr/local/mysql directory. Then proceed to the following steps: 1. Create a database member in MySQL, where you can create a table of users to hold the user name and password of the legitimate user. 1) with vi command in the/tmp directory to establish a SQL script file Auth.sql, content is: 2 start the MySQL client MySQL, execute the above SQL script file Auth.sql command, add two users in the table users record. 2. Write a php script header file Auth.inc, the program content is:? php echo "You must enter the correct username and password." n ";? > >

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.