Non-integrated environment of PHP operating environment (Apache configuration, Mysql) install graphics and text tutorials _php Tips

Source: Internet
Author: User
Tags php language pack php script

This article for everyone to share the PHP operating environment to build installation graphics and text tutorials for your reference, the specific contents are as follows

Install Apache:

1, do not install into a Chinese-language directory:

2, try to install Apache,php,mysql to a general directory, easy to manage.

3, try to remove the previously installed AMP integrated installation environment and remove the configured environment variables:

Here is the server name settings, you can easily input, completed after the use of IP or localhost to access,

Fill in the mailbox, ensure the correct format of the mailbox

The location of the default home page (site) after the Apache installation is:

Apache Installation Location/htdocs/

localhost: is a special domain name (site), which itself represents the "native server"

127.0.0.1 is a special IP address that represents the "native server"

When you are done, enter localhost.

Configure Apache to run a PHP Web page

After the initial Apache installation, the configuration entries are not able to run the PHP script (code).

We need to customize the Apache configuration to accomplish this goal: run PHP scripts.

Apache Configuration file Location:

Apche installation directory/conf/

The main configuration file is: httpd.conf

Apache functions are run in a "modular" way, with many of the default function modules

So, 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 PHP installation directory.

You need to restart Apache after the configuration file has been modified.

In the second step, there is another way: file suffixes can be arbitrarily set, for example. bc8,.phtml

Configure PHP's Basic operating environment

The configuration file for PHP 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 and then prefix it. 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 see

So we can specify the location of the php.ini in the Apache configuration file:

Restart Apache, run phpinfo.php, and the result is:

To configure the time zone:

Locate the configuration line according to the keyword timezone:

Initial:

Modified to:

To configure the database connection mechanism:

PHP, though itself as a module of Apache, is called by Apache,

However, as a complete language package, PHP has many "sub modules" in it.

The modules in PHP are configured as follows (in the php.ini file):

Extension: Expansion of the meaning, that is, expansion module

This makes it easy to "turn on/Off" 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's syntax for opening a PHP module:

It is also necessary to indicate the location of the module.

In PHP, the location of the module is set as a separate setting, and all modules are put together:

Read as follows:

Restart Apache.

Don't worry now, because we haven't installed the database yet.

Installing the MySQL Database

To begin the installation:

Okay, the installation is complete, connecting to the database again if nothing is displayed, the connection is successful!

Wonderful topic sharing: MySQL different versions of the installation Tutorials mysql5.7 version Installation Tutorials

The above is the entire content of this article, I hope you like.

Related Article

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.