How to install different PHP version in xampp in windows10

 


ScriptAlias /php710 "C:/xampp/php710"

Action application/x-httpd-php71-cgi /php710/php-cgi.exe

<Directory "C:/xampp/php710">

    AllowOverride None

    Options None

    Require all denied

    <Files "php-cgi.exe">

        Require all granted

    </Files>

</Directory>


<Directory "C:\xampp\htdocs\magento228">

    UnsetEnv PHPRC

    <FilesMatch "\.php$">

        SetHandler application/x-httpd-php71-cgi

    </FilesMatch>

</Directory>


https://windows.php.net/downloads/releases/archives/


Magento2 free support projects

Good news,

If you have any Magento2 commerce project, get free support from six years experienced Magento developer  FREE !!!

If you worried, why it is so.
Ask me suyash4756@gmail.com

I am from India, working on Magento and Magento2 projects last six years.

It is a one time offer. Please don't think too much.

It will be safe and easy.


Security Checklist For a Magento2 Site

10 points provided by OWASP,

A1: Injection
A2: Cross-Site Scripting (XSS)
A3: Broken Authentication and Session Management
A4: Insecure Direct Object References
A5: Cross-Site Request Forgery (CSRF)
A6: Security Misconfiguration
A7: Insecure Cryptographic Storage
A8: Failure to Restrict URL Access
A9: Insufficient Transport Layer Protection
A10: Unvalidated Redirects and Forwards

magento 2 template path hints

Go to admin panel:

1. For Front End:

Store > Configuration > Advanced > Developer > Debug > Enabled Template Path Hints for Storefront > Yes


2. For Admin :

Store > Configuration > Advanced > Developer > Debug > Enabled Template Path Hints for Admin > Yes

Cache In Magento 2

View the cache status

To view the status of the cache, enter
                magento cache:status 

A sample follows:
                    config: 1
                    layout: 1
                block_html: 1
               collections: 1
                    db_ddl: 1
                       eav: 1
                 full_page: 1
                 translate: 1
        config_integration: 1
    config_integration_api: 1
         config_webservice: 1


cache types in Magento2 :




  1. config
  2. layout
  3. block_html
  4. collections
  5. db_ddl
  6. eav
  7. full_page
  8. translate
  9. config_integration
  10. config_integration_api
  11. config_webservice
Enable or disable cache types
This command enables you to enable or disable all cache types or only the ones you specify. Disabling cache types is useful during development because you see the results of your changes without having to flush the cache; however, disabling cache types has an adverse affect on performance.

Command options:
magento cache:enable [type] ... [type]
magento cache:disable [type] ... [type] 

where

  • omitting [type] enables or disables all cache types at the same time.
  • type is a space-separated list of cache types.


To list cache types and their status, enter
                         magento cache:status

For example, to disable the full page cache and the DDL cache, enter
                 magento cache:disable db_ddl full_page

It changed cache status:
                    db_ddl: 1 -> 0
                 full_page: 1 -> 0

Enabling a cache type automatically clears that cache type.
Clean and flush cache types

To purge out-of-date items from the cache, you can clean or flush cache types:
Cleaning a cache type deletes all items from enabled Magento cache types only. In other words, this option does not affect other processes or applications because it cleans only the cache that Magento uses.

Disabled cache types are not cleaned.

Flushing a cache type purges the cache storage, which might affect other processes applications that are using the same storage.

Flush cache types if you’ve already tried cleaning the cache and you’re still having issues that you cannot isolate.

Command usage:
magento cache:clean [type] ... [type]
magento cache:flush [type] ... [type]

where
[type] is a space-separated list of cache types. Omitting [type] cleans or flushes all cache types at the same time.

For example, to flush all cache types, enter
                           magento cache:flush

Flushed cache types:

  1. config
  2. layout
  3. block_html
  4. collections
  5. db_ddl
  6. eav
  7. full_page
  8. translate
  9. config_integration
  10. config_integration_api
  11. config_webservice

Remember This Line always :     magento cache:flush

View the lists of indexer in Magento2

View the list of indexers

To view the list of indexers enter
          magento indexer:info

The list displays as follows:

catalog_category_product                 Category Products
catalog_product_category                 Product Categories
catalog_product_price                    Product Price
catalog_product_attribute                Product EAV
cataloginventory_stock                   Stock
catalogrule_rule                         Catalog Rule Product
catalogrule_product                      Catalog Product Rule
catalogsearch_fulltext                   Catalog Search

Magento 2 What is the meaning of "please re run magento compile command"

magento setup:di:compile


magento2 How to reindex and cache flush : 

1. Need comand for re-index
     magento indexer:reindex


2.  magento 2 cache flush command

    php bin/magento cache:clean and php bin/magento cache:flush


Install the base data for reference

php bin/magento sampledata:deploy
php bin/magento setup:upgrade

Need to compile after upgrade
magento setup:di:compile



Install Sample Data in Magento 2

You can use command line to install sample data by going to magento 2 root folder. Then,

1. download sample data: 
$php bin/magento sampledata:deploy


2. install sample data: 
$php bin/magento setup:upgrade

Magento2 installation stuck at 67 percent

1. Change in php.ini.

max_execution_time = 1800
max_input_time = 1800
memory_limit = 1024M


2. sudo a2enmod rewrite

Added the following lines to my /etc/apache2/sites-available/my.host.com

    <Directory /var/www/html/m2>
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
    </Directory>

Then ran:
     sudo service apache2 restart