Php runtime environment (Apache configuration, Mysql) for non-integrated environment installation graphic tutorial, _ PHP Tutorial

Source: Internet
Author: User
Build and install a graphic tutorial in a non-integrated php runtime environment (Apache configuration, Mysql ,. Php runtime environment (Apache configuration, Mysql) for non-integrated environment installation graphic tutorial, this article shares with you the php runtime environment installation graphic tutorial for your reference, the specific content is not an integrated environment of the php runtime environment (Apache configuration, Mysql) to build and install a graphic tutorial,

This article shares with you the php runtime environment installation text tutorial for your reference. The details are as follows:

Install apache:

1. do not install it in a directory with Chinese characters:

2. install apache, php, and mysql in a directory to facilitate management.

3. try to delete the previously installed amp integrated installation environment and delete the configured environment variables:

This is the server name setting. you can enter the server name at will and use the IP address or localhost to access the server,

Enter the email address as needed to ensure that the email address format is correct.

The default homepage (site) after apache installation is:

Apache installation location/htdocs/

Localhost: a special domain name (site), which itself represents a "local server"

127.0.0.1 is a special IP address, representing the "local server"

Enter localhost,

Configure apache to run php web pages

After the initial installation of apache, the configuration item cannot run the php script (code ).

We need to customize apache configuration to achieve this goal: run the php script.

Location of the apache configuration file:

Apche installation directory/conf/

The main configuration file is httpd. conf.

Apache functions are run in a "modular" manner, with many default functional modules

So, php is actually one of the functional modules of apache!

But we have to configure it by ourselves (no default configuration code ).

The code is as follows:

Find the graph file in the PHP installation directory.

After the configuration file is modified, restart apache.

In step 2, there is another way: the file suffix can be set at will, such as. bc8,. phtml

Configure the basic runtime environment of php

The php configuration file is:

Php language pack/php. ini

In fact, the php initial language pack provides two recommended configuration files:

We only need to modify the suffix of one of them. Rename.

It is important to determine the location of the php configuration file (php. ini:

Use a simple php webpage with only one line of code:

After running, you can see

Therefore, we can specify the location of php. ini in the apache configuration file:

Restart apache and run phpinfo. php. The result is:

Configure the time zone:

Find the configuration line based on the keyword timezone:

Initial:

To:

Configure the database connection mechanism:

Although php is a module of apache, it is called by apache,

However, php, as a complete language pack, contains many "sub-modules.

The module configuration in php is as follows (in the php. ini file ):

Extension: the extension module.

Here, you can easily "open/close" a module.

To connect to the mysql database module, open it:

Actually, it's not enough!

Because we need to specify where the module is located

(Compare the syntax of apache to open the php module:

)

That is, the module location must be specified.

In php, the module location setting is a separate setting item, and all modules are put together:

Change to the following:

Restart apache.

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

Install mysql database

Start Installation:

After the installation is complete, if nothing is displayed when you connect to the database again, the connection is successful!

The above is all the content of this article. I hope you will like it.

Articles you may be interested in:
  • How to install the image and text in the Apache + MySQL + PHP running environment in Windows
  • How to configure the PHP 5.3.2 runtime environment under IIS7.0
  • CentOS 5.5 uses yum to install LAMP (php runtime environment)
  • Deployment of Apache + PHP + MySQL running environment in Windows
  • Win2008 php runtime environment build graphic tutorial
  • PHP runtime environment configuration and development environment configuration (graphic tutorial)
  • How to configure the PHP runtime environment in Windows 8 IIS
  • How to set up a php runtime environment on Windows server 2008 (php5.3)
  • Tutorial on setting up a php + mysql running environment on a VM instance (guard PHP suite)
  • Win2012 R2 IIS8.5 + PHP (FastCGI) + MySQL runtime environment setup tutorial

Tutorial (Apache configuration, Mysql) installation text tutorial, this article for you to share the php runtime environment build installation text tutorial, for your reference, the specific content...

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.