Configure lamp development environment under Linux, and common small details

Source: Internet
Author: User

There was nothing to be said about the installation. But in Linux it is easy to get a variety of problems. After I install it causes various problems


For example, PHP does not parse properly, the database cannot be closed, Apache cannot open, etc...


So make me more depressed, now the process to share under, we do not on the detours


Finally, in this order, to avoid problems


[Plain]View Plaincopy
    1. sudo apt-get install mysql-server-5.0
    2. sudo apt-get install apache2
    3. sudo apt-get install php5 libapache2-mod-php5
    4. sudo apt-get install Php5-mysql
    5. Sudo/etc/init.d/apache2 restart

Need to be able to install a phpmyadmin.


It is important to note that:

1. After the installation of the test can be normal to use

Vim test.php in the/var/www/html directory

Input

[PHP]View Plaincopy
    1. <?php
    2. Phpinfo ();
    3. ?>

Access to see if you can output PHP to relevant information


2.php after the installation is complete, the default does not support page output error message, which is inconvenient for our development process

[Plain]View Plaincopy
    1. sudo vim/etc/php5/apache2/php.ini

[PHP]View Plaincopy
    1. Display_errors
    2. Default Value:on
    3. Development Value:on
    4. Production Value:off
    5. error_reporting   
    6. Default Value:e_all & ~e_notice & ~e_strict & ~e_deprecated
    7. Development Value:e_all
    8. Production Value:e_all & ~e_deprecated & ~e_strict

By removing the comments from the previous two paragraphs, you can display the error message. [PHP]View Plaincopy
    1. warning:mysql_connect (): Access denied for User ' Root ' @ ' localhost ' (using Password:yes) in/ var /www/html/test2.php on line 2
    2. Failed

There's a hint.

If there is a problem, it is best to uninstall the appropriate to the service and reinstall and configure it.


There are some problems that I can't remember for the time being. Met can self-toss a bit.

Since pretending to be Ubuntu, love tossing

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.