Solving common error problems in WAMP environment construction

Source: Internet
Author: User

1th, the correct choice for Apache + PHP + MySQL version

Question: Some teaching videos on the internet are already very early, and then many people follow them, exactly as they say in the video, but the result is that they are not successful.

Cause of the problem: three-piece version selection is incorrect, for example, there is no PHP version of the corresponding Apache module (shape: Php5apache2_2.dll) and then in the configuration of the time to throw the module to write

Solution: Because they are also collected on the Internet, so you can search the Internet "Wamp version of the choice" within the search

2nd: Basic Configuration installation (apache2.4 PHP7 example)

1.apache:

                              
    Open apache24/conf/ httpd.conf

     Modify: ServerRoot "D:/web/apache24"

     Modified: DocumentRoot "d:/web/www/"

    Add: (note phpinidir item above) PHP7 processing interface to Apache

     Phpinidir "d:/web/php-7.0.0-win32-vc14-x86/"

    LoadModule php7_module "d:/web/ Php-7.0.0-win32-vc14-x86/php7apache2_4.dll "
  add: Php minetype:

    <ifmodule Mime_module>

        typesconfig conf/mime.types

         addtype application/x-httpd-php. PHP
   2. Configure PHP.ini.

Open the PHP directory, copy the 1 php.ini-development, and modify it to php.ini.

Open php.ini, find; extension_dir = "D:/web/php-7.0.0-win32-vc14-x86/ext", remove the semicolon from the front.

(You must specify an extension path, otherwise PHP7 will not start.) Normally after opening the Ext extension directory, you can successfully start PHP7 on the command line, if it is still unsuccessful, your PHP path is not added to the environment variable (or your environment variable is used in the old PHP version))
Writes----path are written according to their own installation path

Find Exrension=php_mysql.dll exrension=php_mysqli.dll exrension=php_gb2.dll exrension=mb_string.dll ... To remove the---from the front; this is the connection between PHP and MySQL.

Usually a function such as mysql_connect () can be used to check if the connection is successful, or it can be installed phpMyAdmin

3. Error messages

①warning:date (): It is not safe for rely on the system ' s timezone settings. You is *required* to use the Date.timezone setting or the Date_default_timezone_set () function. In case you used any of those methods and you is still getting this warning, your most likely misspelled the timezone Iden Tifier. We selected the timezone ' UTC ' for now and please set Date.timezone to select your timezone

Modified php.ini: Found;d ate.timezone modified to DATE.TIMEZONE=PRC

Ii

phpMyAdmin missing mysqli extension. Please check your PHP configuration. <a href= "Documentation.html#faqmysql" target= "Documentation" ></a>

Elaborate:

You can check these methods in the following ways:

1. check php.ini, Extension=php_mysqli.dll is not already enabled is to remove the front;

2. check php.ini Extension_dir address is not point to the PHP directory in the EXT directory This step is the key I am in this step of the problem I put Extension_dir = "E:\www\php54\ext" Set it to your own directory.

3. Check that the Lib_mysql.dll has not been copied to the Windows directory this DLL file has a variety of forms with no underlined libmysql_d.dll so watch yourself.

4. Check the PHP installation directory ext directory, Php_mysqli.dll file is not present online also description best Use ZIP package decompression will not appear file loss

5. View php Details page <?php phpinfo ();?, and see if MySQL and mysqli have been started this step is to check if you have turned on mysqli
If not, you can find the MYSQLI keyword is no longer available on the PHP detail page.

The last to restart Apache

--------------------------I did a couple of tests, I thought it was true, but there was no success, and there was a way.

1, put. /mysql/lib/libmysql.dll copy to your PHP and copy it to your PHP directory/ext directory
2, copy Libmysqldll Php5ts.dll two files to Windows/system32
3. Copy the php.ini under your PHP directory root directory to the Windows directory (provided the php.ini must be configured)

4. Copy php_mysql.dll Php_mysqli.dll php_mbstring.dll libmysqldll php5ts.dll to Windows of course this file will be copied to Windows/system32 Why do I have to write 4th, because I did the first three steps today but still wrong, I simply also copy in the window directory, before on the Internet to see because the operating system is not the same so some are placed under the window can be some is placed under the windows/system32 can therefore I'll just have to copy it in two directories.

Solving common error problems in WAMP environment construction

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.