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.