Laravel Framework Learning Notes (i) the environment constructs the _php example

Source: Internet
Author: User
Tags configuration php mysql in php development environment

Why the Laravel framework is chosen because the Laravel framework is currently the most popular framework for PHP, and deep research reveals and asp.net the MVC framework is essentially about in functionality. Just different ways to implement them.

PHP development environment under Windows build

1. Download PHP address http://windows.php.net/download/Note the relevant version of my server iis7.5 32 system

VC11 x86 Non Thread Safe

After decompression, put to the corresponding directory, configuration php.ini file, here Notice the DLL enabled in the relevant configuration, this online has not much to say.

2.iis Configuration

I use the fastcgi deployed, need to download Phpmanager https://phpmanager.codeplex.com/

After installation Phpmanager Click on the IIS site will appear phpmanager icon

After the click of the following interface will appear, the relevant settings are relatively simple, you need to note that the PHP extensions, this and the above php.ini DLL enabled is consistent.

Configure the Php_wincache.dll to be enabled in IIS fastcgi mode. Remember to enable this.

3. Download the Laravel framework , where you need to download a composer similar to NPM with a PHP tool.

You need to select the version of PHP when you install. If you need to change the PHP version, reinstall it.

Extract the Laravel compressed package to the Laravel folder, shfit+ right-click in the Laravel folder to open the Command window

Input Compser Intsall automatically downloads the dependent dependencies into the vendor folder

Installation of 4.mysql

MySQL installation here is not described in detail, basically not much of a problem.

A laravel eloquent ORM modeling error can be encountered later.

Need to put MySQL in the

# Set The SQL mode to strict
#sql-mode= "Strict_trans_tables,no_auto_create_user,no_engine_substitution"

Modified into

Sql-mode= "No_auto_create_user,no_engine_substitution"

Also find solutions online, if no problem is best.

5. Configure the IIS PHP site after all components have been downloaded

As configured with. NET sites, note that the root directory of the site is not the Laravel folder, but the following public folder.

Configure the host file and the domain name of the Web site.

Configuration complete, click the Check Phpinfo () in Phpmanager, and view the installation

The program pool does not need to be changed, and the 2.0 integration mode is OK.

6. The installation of all components is basically done at this time .

Access the domain name of the site that was set up in the previous step. You can see the Laravel welcome page.

There is also a particular point to note here, because the URL generated by Laravel is not a suffix, there will be 404 error,

IIS Url Rewrite component needs to be installed

After the installation is complete

Enter the rewrite interface click the right import rule

Then select the. htaccess file under the public file

Apply the rule after the import is complete.

The above steps basically build up Laravel in Windows IIS running the environment

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.