XAMPP

Install XAMPP on localhost for Drupal 8

Step 1:

  • Download xampp & extract
  • Install xampp to C: or D:
  • Edit httpd.conf file xamp/apache/httpd.conf
    • change Listen 80 to Listen 8080
    • change ServerName localhost:80 to ServerName localhost:8080 
  • Reboot your computer & start the XAMPP Console (D:\xampp\xampp-control.exe)
  • Test the installation:  http://localhost:8080/
  • Type http://localhost:8080/phpmyadmin/ in the address field or click phpMyAdmin at the top of the page.
  • Create database
  • Click Server: 127.0.0.1>User Accounts>Edit Privileges for username root and hostname localhost
  • Click Change Password, then type your password & click GO
  • Set to the username & password you used above in C:OR D:\xampp\phpMyAdmin\config.inc.php.
    • $cfg['Servers'][$i]['user'] = 'root’;
    • $cfg['Servers'][$i]['password'] = 'yourpassword';
  • Install Drupal to xampp server, example: C:\xampp\htdocs\Drupal8
  • Click http://localhost:8080/*drupal8
    * your drupal site name

Step 2:

A) Adjust PHP memory and/or low maximum PHP execution time on file

1) File \xampp\php\php.ini

max_execution_time = 600 max_input_time = 600 memory_limit = 512M post_max_size = 64M upload_max_filesize = 64M mysql.connect_timeout = 600

2) File \xampp\mysql\bin\my.ini

max_allowed_packet = 64M
innodb_flush_log_at_trx_commit = 2

3) File \xampp\apache\conf\httpd.conf

Listen 127.0.0.1:80

# for drush and migrate:

SetEnv DRUSH_PHP /xampp/php

B) Now restart both "Apache" and "MySQL" using the XAMPP Control Panel

Step 3:

Install the drupal & follow the instruction

Source: https://www.drupal.org/docs/develop/local-server-setup/windows/quick-ins...


    Related problem & how to fix it:

    #1118 - The size of BLOB/TEXT data inserted in one transaction is greater than 10% of redo log size. Increase the redo log size using innodb_log_file_size.

    To resolve your issue you have to increase the value of the innodb_log_file_size option in your my.ini below the [mysqld] section. Its default value is 48M. Setting it to

    [mysqld]
    innodb_log_file_size=256M

    Be careful when changing the value of innodb_log_file_size that you do this safely:

    • You need to shut the server down cleanly and normally.
    • Move away (don’t delete) the log files, which are named ib_logfile0, ib_logfile1, and so on.
    • Check the error log to ensure there was no problem shutting down.
    • Then restart the server and watch the error log output carefully. You should see InnoDB print messages saying that the log files don’t exist. It will create new ones and then start.
    • At this point you can verify that InnoDB is working, and then you can delete the old log files.

    Source: https://stackoverflow.com/questions/25277452/how-to-configure-mysql-5-6-...


    #1231 - Variable 'sql_mode' can't be set to the value of 'NULL'

    Read this source

    hosts file ignored, how to troubleshoot?


    You are not running with administrator rights! This will work for most application stuff but whenever you do something with services there will be a security dialogue or things will break! So think about running this application with administrator rights!

    How to solve: just click start>all program>right click xampp icon and click run as administrator

     


    How to install multi drupal site on xampp (windows)

    ToDo-List

    Follow it step by step!

    1. Download XAMPP and install it at 'C:\xampp' (and NOT at 'C:\Program Files\xampp\' or similar!).
    2. Check for 'httpd.conf' file at 'C:\xampp\apache\conf' and
      change
      # Virtual hosts
      #Include "conf/extra/httpd-vhosts.conf"
      

      to

      # Virtual hosts
      Include "conf/extra/httpd-vhosts.conf"
      

      only, if the "#" was in that row!

    3. Now open 'httpd-vhosts.conf' from 'C:\xampp\apache\conf\extra' and add these lines
      <VirtualHost *:80>
          ServerAdmin postmaster@host.localhost
          DocumentRoot "C:/xampp/htdocs"
          ServerName localhost
          ServerAlias www.localhost
          ErrorLog "logs/host.localhost-error.log"
          CustomLog "logs/host.localhost-access.log" combined
      </VirtualHost>
      
      <VirtualHost *:80>
          ServerAdmin postmaster@dummy-host.localhost
          DocumentRoot "C:/xampp/htdocs/drupal"
          ServerName dummy-host.localhost
          ServerAlias www.dummy-host.localhost
          ErrorLog "logs/dummy-host.localhost-error.log"
          CustomLog "logs/dummy-host.localhost-access.log" combined
      </VirtualHost>
      
      <VirtualHost *:80>
          ServerAdmin postmaster@dummy-host2.localhost
          DocumentRoot "C:/xampp/htdocs/drupal"
          ServerName dummy-host2.localhost
          ServerAlias www.dummy-host2.localhost
          ErrorLog "logs/dummy-host2.localhost-error.log"
          CustomLog "logs/dummy-host2.localhost-access.log" combined
      </VirtualHost>
      

      If the file contains NameVirtualHost *:80 with a leading "#", remove the hash ("#").

    4. Restart/reload your web server.
    5. Now open file '%windir%\system32\drivers\etc\hosts' and add these 4 lines at end of file
      127.0.0.1    dummy-host.localhost
      127.0.0.1    dummy-host2.localhost
      127.0.0.1    www.dummy-host.localhost
      127.0.0.1    www.dummy-host2.localhost
      
    6. Now download the latest recommended Drupal release,
      create a folder name "drupal" inside 'C:\xampp\htdocs\'
      and put all content of this drupal release (including the folder structure and its content) in this folder.
      Now you can find e.g. the file 'C:\xampp\htdocs\drupal\sites\default\default.settings.php', you need it.
    7. Create 2 folder name
      a.) dummy-host.localhost
      and
      b.) dummy-host2.localhost
      inside of 'C:\xampp\htdocs\drupal\sites\'
    8. Create 2 databases for 2 drupal sites (e.g. with name dummyhost and dummyhost2) using http://127.0.0.1/phpmyadmin/.
    9. Open url
      a.) http://dummy-host.localhost/
      and
      b.) http://dummy-host2.localhost/
      and install them as standard drupal installation process (http://drupal.org/documentation/install).
    10. Now Drupal "multisite installation" is done, you should look at
      a.) http://dummy-host.localhost/
      and
      b.) http://dummy-host2.localhost/
      for further installation.

    Source: https://www.drupal.org/docs/7/multisite-drupal/multi-site-on-windows-usi...