A non-integrated PHP runtime Environment (Apache configuration, Mysql) installation graphics tutorial,
This article for you to share the PHP operating environment installation and graphic tutorial, for your reference, the specific content as follows
Install Apache:
1, do not install in the Chinese directory:
2, try to install Apache,php,mysql to a total directory, easy to manage.
3, try to remove the previously installed AMP Integration installation environment and remove the environment variables that have been configured:
Here is the server name settings, can be entered freely, after completion of the use of IP or localhost to access,
e-mail to fill in, ensure the correct format of the mailbox
The location of the default home page (site) after Apache installation is:
Apache Installation Location/htdocs/
localhost: is a special domain name (site), which itself represents "native server"
127.0.0.1 is a special IP address that represents "native server"
When you are finished, enter localhost,
Configure Apache to run PHP Web pages
After the initial Apache installation, its configuration items are not yet running PHP scripts (code).
We need to make a custom configuration of Apache to accomplish this: Run the PHP script.
Apache Configuration file Location:
Apche installation directory/conf/
The main configuration file is: httpd.conf
Apache features are run in a "modular" way, with many default function modules
Well, PHP is actually one of the functional modules of Apache!
But we have to configure it ourselves (no default configuration code).
The code is as follows:
Locate the diagram file in the installation directory of PHP.
After the configuration file is modified, you need to restart Apache.
The second step, there is another way: file suffix can be arbitrarily set, for example. bc8,.phtml
Configure PHP's Basic operating environment
The PHP configuration file is:
PHP Language Pack/php.ini
In fact, the PHP initial language pack provides 2 recommended profiles:
All we have to do is take one of the modifications. Renamed under.
This is a very important point to determine the location of the PHP configuration file (php.ini):
Use a simple PHP page with only one line of code:
After running to see
As a result, we can specify the location of the php.ini in the Apache configuration file:
Restart Apache and run phpinfo.php with the result:
To configure the time zone:
Locate the configuration line according to the keyword timezone:
Initial:
Modified to:
To configure the database connection mechanism:
PHP, although itself as a module of Apache, was called by Apache,
However, as a complete language package, PHP has many "submodule" components inside it.
The modules in PHP are configured as follows (in the php.ini file):
Extension: The extension means that the extension module
This makes it easy to "open/close" a module.
We now need to connect to the MySQL database module, then open it:
Actually, it's not enough!
Because we need to specify where that module is
(Compare Apache to open PHP module syntax:
)
It is also necessary to indicate the module location.
In PHP, the module location is set to a separate setting, and all modules are put together:
Read as follows:
Restart Apache.
Don't worry, because we haven't installed the database yet.
Installing the MySQL Database
To start the installation:
All right, after the installation is complete, connecting to the database again will indicate that the connection is successful if nothing is displayed!
The above is the whole content of this article, I hope you like.
Articles you may be interested in:
- Installation graphics method for apache+mysql+php running environment under Windows
- How to configure PHP 5.3.2 operating environment under IIS7.0
- CentOS 5.5 uses Yum to install lamp (PHP operating environment)
- Deployment of Apache+php+mysql under Windows operating environment combat
- win2008 PHP Running Environment Construction Graphics tutorial
- Configuration of the PHP Runtime Environment and development environment (graphic tutorial)
- How to configure the PHP runtime environment in Windows 8 IIS
- Windows Server 2008 Build PHP running Environment diagram (php5.3)
- Cloud Host build Php+mysql running environment tutorial (Guardian God PHP Suite)
- Win2012 R2 iis8.5+php (FastCGI) +mysql Run Environment Construction tutorial
http://www.bkjia.com/PHPjc/1119963.html www.bkjia.com true http://www.bkjia.com/PHPjc/1119963.html techarticle non-integrated environment of PHP running environment (Apache configuration, Mysql) installation Graphics tutorial, this article for everyone to share the PHP operating environment installation Graphics tutorial, for your reference, specific content ...