I am using the Apache PHP MySQL phpMyadmin gold combination, so I will say that some server configurations have been accumulated since PHP: (This article is installed in the D disk with apache php mysql). A .apache : After installing your Apache server, Apache has been able to work normally, but the PHP program cannot be processed, further configuring the Apache enabled PHP program. Find file httpd.conf in the apache installation directory. The full path of files in this experiment is d: /apache/conf/httpd.conf, and open httpd.conf with Notepad, plus the following sentences: scriptalias / php4 / "D : / php / "addtype application / x-httpd-php .php .php3action application / x-httpd-php / php4/php.exe Note that the space in each statement cannot be small, and the file is saved after input. To make the configuration in the upper step, you need to restart Apache. Restart a variety of methods. The easiest way is from the start menu, as shown in Figure 13, or you can run the command NET Stop Apache to stop apache, then run Command NET Start Apache launches Apache. If you can't start, you have an error in the last configuration.
In addition, introducing a native Apache server authentication mechanism 1. First place a file named .htaccess in your directory you need to authenticate mechanism, usually only a suffix file cannot be created, you can edit with a very excellent program EDIT PLUS is built, if your apache is installed in D: disk, and your Apache server path is: D: / apache / htdocs, then this .htaccess's content is: AuthiSerfile "D: / Apache / BIN / Pass.txt "Authname AnynameAuthtype BasicRequire Valid-user2. Then put it under any of the D: / Apache / HTDOCS, then in" start "-" run "into" cmd ", then In C: /> D: D: /> CD bind: / apache / bin> HTPasswd.exe will appear: use: htpasswd [-cmdps] passwordfile usernamehtpasswd -b [cmdps] passwordfile username passwordhtpasswd -n [mdps] usernamehtpasswd -nb [mdps] username password-c Create a new file.-n Do not update file; display results on stdout.-m Force MD5 encryption of the password (default) .- d Force CRYPT encryption of the password.-p Do not encrypt the password (plaintext) .- s Force SHA encryption of the password.-b Use the password from the command line rather than prompting for it. On Windows, TPF and NetWare systems the '-m 'flag is buy by default. on all other systems, the' -p 'Flag Will Probably n Ot work.3. Then: d: / apache / bin> htpasswd -m pass.txt chainew password: ****** RE-TYPE new password: ****** Adding password for user chai4. and then D: / Apache / conf directory Locate httpd.conf This file found such a keyword "allowoverride" in this file, is it all the words behind, if any, change to all, then restart the Apache server Yes. Then you can enter your server directory in your browser so your authentication mechanism is achieved.
If you want to be on the database space of your server on HTTP, if there is a database management tool phpMyAdmin, you can implement the config.inc.php file under phpMyAdmin, the specific method is: found $ cfg in this file [ 'Servers'] [$ I] [' Auth_Type '] =' config '; // Authentication Method (config, http or cookie based)? Then modify it to: $ cfg [' Servers'] [$ I] [' Auth_type '] =' http '; // Authentication Method (config, http or cookie, "so your database can authenticate authentication. II.PHP Under normal circumstances, PHP is very good, that is, where you have a note: 1. If your mysql database is no problem, many of the data in MySQL exists, But I don't know why I can't query, and I can't submit information anyway (in the case of ensuring your program error), you can check "register_globals =" in your php.ini file, what is the side behind? If it is OFF, modify it into ON, the default register_global is OFF, in this case POST mode can not be used! You can only submit your form with GET mode! To change it to ON.2. That is, in a general PHP version, the default is also closed, so you should specify a folder in your installed disk, named phpsession, if you are on the D disk, then In your php.ini file, you should set the second session.save_path = d: / phpsession / so your session is open. Three. Mysql1. After your MySQL server is configured, you can enter D; / mysql / bin, find a thing named Winmysqladmin.exe, then double-click it, you will pop up a Mysql database username and Password dialog, the default username is root, the password is default is empty, you can modify here, then you can install your phpmyadmin this excellent database management software, you should put phpMyAdmin on your root directory, ie D: / APAHCE / HTDOCS / lower, it is best to create a folder named phpMyadmin, and then install it under PHPMYADMIN, but your phpMyAdmin software will appear, invalid user name or password.
At this time, you can enter this phpMyAdmin directory, find a file called config.inc.php, open the file ~ Find: $ cfg ['servers'] [$ I] [' user '] =' root '; // This is a database username $ cfg [' servers'] [$ I] ['password'] = ''; / / here is the database password (found first, modify ~!) To change the username and password you set, save it ~! 2. But sometimes, a relatively high MySQL version, there will be some problems, that is, when your username and password of your phpMyAdmin software are the same as the username and password of your MySQL database, they can't access your mysql database, so You can make the original settings in your config.inc.php file, namely: $ cfg ['servers'] [$ I] ['user'] = 'root'; $ cfg ['Servers'] [$ I] ['password'] = ''; then restart your MySQL database server, then you can enter htpmyadmin/index.php in your IE browser address bar. Go to the database, then find the mysql database, find the User table inside, then click "Host" "Host", "User", "root", then click "Edit" Then, then set "Password" option to "Password", then "Value" item fills in your MySQL database password, so your phpMyAdmin software is restored to normal. . 3. Also, if your computer reinstalls the system, you need to back up all things under D: / Apache / HTDOCS, but if you re-install the system, reconfigure Your PHP server, put the previous file into the corresponding directory, the information in the database still exists, but when you submit information, you will have an error, and you show "Table" Test "is read Only" This illustrates that the files of the database you back up are "read-only", you need to enter your D: / mysql / data to find the folder of the database you used to back up, click the "Properties" of the right click, see "Properties" - - The box front of "Reading" is selected. If it is selected, remove it, then "Read" "" Recommend "in the" Properties "of all the files under this folder Remove, only "Archive" attributes. Then restart your Apache and MySQL servers. 4. Sometimes you will find that your MySQL suddenly bright is not a green light, but a red light, in this case, you can delete the c: / winnt / down my.ini, then restart your mysql server , Then enter your d: / mysql / bin / down to find Winmysqladmin.exe, then double-click it to reset the mysql database username and password.