① Custom Install (first to stop the Apache service in management, then uninstall Apache, and then install without restarting the computer)
Apache+php+mysql+phpmyadmin Self Installation
We recommend that you install to the same folder, use Management (folder not Chinese)
After installing one test.
1. Apache
Http://locahost after the end
2. Under the PHP core package (used to support PHP development, like the JDK in Java)
VC6 is Legacy Visual Studio 6compiler, which is compiled using this compiler.
VC9 is the Visual Studio 2008 compiler, which is compiled with the Microsoft vs Editor.
So how do we choose which version of PHP to download?
If you are using apache+php under Windows, please select the VC6 version;
If you are using iis+php under Windows, please select the VC9 version;
So what's non Thread safe?
Non thread safe is not threaded;
What is Thread Safe?
thread safe is threaded;
The authorities do not recommend that you apply non thread safe to the production environment, so we chose the thread safe version of PHP to use
The installation of the PHP core package is to unpack the upcoming
3. How to integrate Apache and PHP
That is to say, how can I let Apache handle PHP
① the httpd.conf loading module in the Apache conf directory to add the following code:
LoadModule php5_module PHP Installation path/php5apache2_2.dll(must be php5 and apache2.2 version!!!!!!!! )
Phpinidir PHP Module Installation path
AddType application/x-httpd-php. php. phtml
Description, as long as we wrap the red part, change to the actual PHP installation path can be
AddType refers to a request to a file with a suffix of. php. Phtml to invoke this tool to complete parsing.
② php.ini-development file changed to php.ini why change, because our PHP settings need to modify in php.ini
② can specify the corresponding function module in php.ini
Here we want to specify the extension library path for PHP
Extension_dir = PHP Module Installation path/ext (line No. 807)
Since PHP is already the Apache module, although php.ini is used by PHP modules, it is Apache that is responsible for loading. So you want to restart Apache.
Test to see if Apache and PHP are integrated successfully
Write such a piece of code
Phpinfo ();
?>
Reboot http://localhost/test.php
4, install the database MySQL (uninstall the database to clean up the registry, otherwise the installation will not respond)
Test whether MySQL can use
1. Write a section of PHP code to test whether success!
You don't understand at the moment, it's okay.
$conn =mysql_connect (Localhost,root,password);
if ($conn) {
Echo connects MySQL database OK;
}else{
echo Connection database failed;
}
?>
When we do not have the correct configuration of PHP, we will report
Fatal Error: Call to undefined function mysql_connect () in c:myenvapachehtdocs emp.phpon line 3
Reason: The MySQL feature is not currently enabled, in php.ini
Extension=php_mysql.dll
Extension=php_mysqli.dll
2. Install a phpMyAdmin (the site can actually better manage MySQL) to see if you can use
Extract the compressed package directly into the Htdocs directory, and then directly access
Http://localhost/phpmyadmin/index.php can be.
14. Now, we have to install a discuz forum on our own PHP development/running environment.
Http://jingyan.baidu.com/article/86f4a73e5bb53237d652693c.html
① Prepare a discuz forum code
② it to the Htdocs directory
③ Copy the Discuz upload file to the Discuz folder, and then delete the upload folder
④ Modify config.inc.php
[CH] The following variables should be modified according to the account parameters provided by the space provider, please contact the server provider if you have any questions
$dbhost = ' localhost '; Database server
$dbuser = ' root '; Database user Name
$DBPW = ' root '; Database Password
$dbname = ' discuz '; Database name
$pconnect = 0; Database Persistent Connection 0 = close, 1 = Open
[CH] Forum security Settings, adjust the following settings to enhance the security performance and defense performance of the Forum
$adminemail = ' admin@your.com '; System Administrator Email
$forumfounders = ' admin ';
⑤http://localhost/discuz
If you are prompted to be sorry, set the Short_open_tag in php.ini to ON, otherwise you cannot continue with the installation forum. is modified