Svn self-help password modification (PHP script implementation), svn script

Source: Internet
Author: User

Svn self-help password modification (PHP script implementation), svn script
# Create a script directory
Mkdir-p/var/www/svn/svntools
# Create an apache configuration file
Touch/etc/httpd/conf. d/alias. conf

# Enter the following content:

Alias /svntools "/var/www/svn/svntools"<Directory "/var/www/svn/svntools">        Require valid-user        AuthType Basic        AuthName "svn tools"        AuthUserFile "/var/www/svn/project/conf/passwd"</Directory>

# Restart the apache service
Service httpd restart

# Create a php script to change the password <? $ Username = $ _ SERVER ["PHP_AUTH_USER"]; // username authenticated by AuthType Basic $ authed_pass = $ _ SERVER ["PHP_AUTH_PW"]; // AuthType Basic-certified password $ input_oldpass = (isset ($ _ REQUEST ["oldpass"])? $ _ REQUEST ["oldpass"]: ""); // The original password entered on the Interface $ newpass = (isset ($ _ REQUEST ["newpass"])? $ _ REQUEST ["newpass"]: ""); // the new password entered on the Interface $ repeatpass = (isset ($ _ REQUEST ["repeatpass"])? $ _ REQUEST ["repeatpass"]: ""); // repeated password entered on the Interface $ action = (isset ($ _ REQUEST ["action"])? $ _ REQUEST ["action"]: ""); // The actionif ($ action! = "Modify") {$ action = "view";} else if ($ authed_pass! = $ Input_oldpass) {$ action = "oldpasswrong";} else if (empty ($ newpass) {$ action = "passempty";} else if ($ newpass! = $ Repeatpass) {$ action = "passnotsame";} else {$ action = "modify" ;}?> <Html> 


Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

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.