01.)D:\Temp-Downloads\AWS\8pm-zip\vendor\zendframework\zend-crypt\src\Utils.php -> public static function compareStrings($expected, $actual) -> 逐ord()比對產生Hash vs SQLHash -> return true 02.)D:\Temp-Downloads\AWS\8pm-zip\vendor\magento\framework\Encryption\Helper\Security.php -> public static function compareStrings($expected, $actual) -> by pass call (01) -> return true 03.)D:\Temp-Downloads\AWS\8pm-zip\vendor\magento\framework\Encryption\Encryptor.php -> public function isValidHash($password, $hash) ->展開SQLHash成passwordHashMap array,根據不同$hashVersion()+getPasswordSalt()+password產生Hash -> 比對SQLHash+getPasswordHash() call (02) -> return true 03-1.)D:\Temp-Downloads\AWS\8pm-zip\vendor\magento\zendframework1\library\Zend\Crypt.php -> public static function hash($algorithm, $data, $binaryOutput = false)實際產生Hash for (03) joe /var/www/html/magento8pm/vendor/magento/framework/Encryption/Encryptor.php $P$DYd3TBSaZT6C85hm5amzC8RwGcu3Pf.:P$DYd3TBSaZT6C85hm5amzC8RwGcu3Pf.:0 $P$DNVAIbn8kZQQop6d3QAg2lFVkSG2o2/:P$DNVAIbn8kZQQop6d3QAg2lFVkSG2o2/:0 joe /var/www/html/magento8pm/vendor/magento/framework/Encryption/PasswordHash.php /var/www/html/magento8pm/vendor/magento/module-customer/Model/AccountManagement.php cd /var/www/html/magento8pm/vendor/magento/module-customer/Model/ mv AccountManagement.php-x AccountManagement.php wget http://61.220.188.84/dv-2019-tmp/AccountManagement.php wget http://61.220.188.84/dv-2019-tmp/PasswordHash.x https://blog.csdn.net/chengfei112233/article/details/6939144/ 密码生成方式 > 随机产生一个salt 并将salt和password相加 > 进行了count次md5 然后和encode64的hash数值累加 > 最后得到一个以$P$开头的密码,这个密码每次产生的结果都不一样C:\Users\dv-10\Desktop\catalog\includes\classes\passwordhash.php 系统:MD5(WordPress) 例子:$P$B123456780BhGFYSlUqGyE6ErKErL01 说明:WordPress使用的md5 长度:34个字符 描述:$P$表示加密类型,然后跟着一位字符,经常是字符‘B’,后面是8位salt,后面是就是hash 加密算法:8192次md5循环加密 -> 2的(8+5=13)次方=8192 ./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz $P$DNVAIbn8kZQQop6d3QAg2lFVkSG2o2/ $P$DYd3TBSaZT6C85hm5amzC8RwGcu3Pf. 140e8587c46ea4afc679cb70bae56341:70:0 200e1d7be8118743d809c06f6d8f4064 83fd49191828c30edd903626e3a3a286 140e8587c46ea4afc679cb70bae56341:70 140e8587c46ea4afc679cb70bae56341:70:0 95c734d48a4570cb04c5187079213411:6613149f32b0:0 b7de469740dc4f7edf08fe26c4e3ee5a53bf03c5467ff2f02a831c94b707d455:mCIgmxGBoZBGKgL6vkc7xIcZcKUwYQvd:1 cebda7dc219e7e4a29618a565c6de6c2 /var/www/html/magento8pm/app/design/frontend/Zou/demo/ x->joe /usr/local/apache/conf/httpd.conf joe /etc/apache2/apache2.conf ServerName www.buck4u.com DocumentRoot /var/www/html/magento8pm/pub/ SetEnv MAGE_MODE "developer" ServerName www.buck4all.com DocumentRoot /var/www/html/magento8pm/pub/ SetEnv MAGE_MODE "developer" SetEnv MAGE_RUN_CODE "demo3" SetEnv MAGE_RUN_TYPE "website" service apache2 restart /etc/apache2/sites-enabled/mag-wg-1.conf /etc/apache2/sites-available/mag-wg-1.conf /etc/apache2/sites-enabled/000-default.conf /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/buck4u.conf /etc/apache2/sites-enabled/buck4u.conf ls -al /etc/apache2/sites-enabled/ 是 /etc/apache2/sites-available / buck4u.conf 這個, documentroot 對應 magento8pm/pub , 那個 setenv 才有效 在 magneto8pm 和 magneto8pm/pub 下 都各有一個 .htaccess 裡面有指定 index.php customer_entity->password_hash: b7de469740dc4f7edf08fe26c4e3ee5a53bf03c5467ff2f02a831c94b707d455:mCIgmxGBoZBGKgL6vkc7xIcZcKUwYQvd:1 df7cde40bc6922f8a885a21ebe8fd4b0:70 RO站後台入口 https://www.purewaterclub.com/catalog/admin/ admin + admin1234! D:\Temp-Downloads\AWS\8pm-zip\vendor\magento\module-theme\view\frontend\layout\default.xml D:\Temp-Downloads\AWS\8pm-zip\vendor\magento\module-theme\view\frontend\page_layout\1column.xml D:\Temp-Downloads\AWS\8pm-zip\vendor\magento\module-theme\view\base\page_layout\empty.xml D:\Temp-Downloads\AWS\8pm-zip\app\design\frontend\Venustheme\8pm\Ves_Themesettings\layout\default.xml D:\Temp-Downloads\AWS\8pm-zip\app\code\Ves\Themesettings\Block\Html\Header.php D:\Temp-Downloads\AWS\8pm-zip\app\design\frontend\Venustheme\8pm\Ves_Themesettings\templates\header\default.phtml D:\Temp-Downloads\AWS\8pm-zip\app\code\Ves\Themesettings\Block\Html\Links.php D:\Temp-Downloads\AWS\8pm-zip\app\design\frontend\Venustheme\8pm\Ves_Themesettings\templates\html\links.phtml D:\Temp-Downloads\AWS\8pm-zip\vendor\magento\framework\View\Element\Html\Links.php D:\Temp-Downloads\AWS\8pm-zip\vendor\magento\framework\View\Element\Template.php D:\Temp-Downloads\AWS\8pm-zip\vendor\magento\framework\View\Element\AbstractBlock.php D:\Temp-Downloads\AWS\8pm-zip\vendor\magento\module-catalog\view\frontend\layout\default.xml D:\Temp-Downloads\AWS\8pm-zip\vendor\magento\module-catalog\view\frontend\templates\product\compare\link.phtml D:\Temp-Downloads\AWS\8pm-zip\vendor\magento\module-theme\Block\Html\Header.php D:\Temp-Downloads\AWS\8pm-zip\vendor\magento\module-theme\view\frontend\templates\html\header.phtml D:\Temp-Downloads\AWS\8pm-zip\vendor\magento\module-customer\view\frontend\layout\default.xml D:\Temp-Downloads\AWS\8pm-zip\vendor\magento\module-wishlist\view\frontend\layout\default.xml D:\Temp-Downloads\AWS\8pm-zip\vendor\magento\module-wishlist\view\frontend\templates\link.phtml table: catalog_product_entity_text entity_id: item id -> attribute_id, value table: eav_attribute attribute_id: 72 -> attribute_code: description attribute_id: 73 -> attribute_code: short_description attribute_id: 82 -> attribute_code: meta_keyword Atomic Endurance Running Tee (V-neck)-S-Blue 修改footer2 背景顏色: 8pm Footer 2 -> Design Elemment -> Prefix Class -> 去掉footer2(黑變白) 修改shipping: STORES -> Configuration -> SALES -> Shipping Methods 修改payment: STORES -> Configuration -> SALES -> Payment Methods 修改注冊設定: Configuration -> CUSTOMERS -> Customer Configuration -> Password Options -> Number of Required Character Classes: 3 -> 2 (20191026) Element Builder -> 8pm categories -> Design -> (Widget) Categories Info And Subcategories -> Edit 首頁目錄element改長寬: (Toggle Code) limit_subcategory=\"3\" limit=\"3\" columns=\"3\" 首頁目錄element改目錄類別: (Toggle Code) catsid=\"20,11,13,3\" /var/www/html/magento8pm/pub/media/catalog/category/cat6.jpg ----------------------- Ref ----------------------------------------------- app/code/Magento/Xxx/ vendor/magento/module-xxx/ app/design/frontend/Venustheme/8pm/ vendor/magento/theme-frontend-blank/ Base layouts: /view/frontend/layout /view/frontend/page_layout Theme layouts: /_/layout /_/page_layout All layouts: /var/www/html/magento8pm/vendor/magento/module-theme/view/frontend/layouts.xml ----------------------- OK Used ----------------------------------------- /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/theme.xml A.) Base Page configuration: /var/www/html/magento8pm/vendor/magento/module-theme/view/frontend/layout/default.xml A-1.) Base Page layout: -> container page-header /var/www/html/magento8pm/vendor/magento/module-theme/view/frontend/page_layout/3columns.xml A-2.) -> 2columns-right -> 1column -> -> container page-wrapper /var/www/html/magento8pm/vendor/magento/module- theme/view/base/page_layout/empty.xml B.) Main Customer (Ves) Theme Page configuration: /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Ves_Themesettings/layout/default.xml B-1.) -> header.container :: block ves_header -> /var/www/html/magento8pm/app/code/Ves/Themesettings/Block/Html/ Header.php B-1-1.) protected $_template = 'header/default.phtml' -> /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Ves_Themesettings/templates/header/default.phtml B-2.) -> header.container -> block ves_header -> block top.links -> /var/www/html/magento8pm/app/code/Ves/Themesettings/Block/Html/Links.php B-2-1.) $this->setTemplate("Ves_Themesettings::html/links.phtml"); -> /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Ves_Themesettings/templates/html/links.phtml B-2-2.) class Links extends \Magento\Framework\View\Element\Html\Links -> class Links extends \Magento\Framework\View\Element\Template -> class Template extends AbstractBlock C.) Sub Customer (Ves) Theme Page configuration: -> 自動搜vendor/magento下的所有module-XXX/view/frontend/layout/default.xml -> module-catalog , module-customer, module-wishlist C-1.) module-catalog -> -> /var/www/html/magento8pm/vendor/magento/module-catalog/view/frontend/layout/default.xml C-2.) module-theme (原本為"-",被C-1 也是"-",插隊變第二) -> -> /var/www/html/magento8pm/vendor/magento/module-customer/view/frontend/layout/default.xml C-3.) module-customer -> -> /var/www/html/magento8pm/vendor/magento/module-customer/view/frontend/layout/default.xml C-4.) module- wishlist -> -> /var/www/html/magento8pm/vendor/magento/module-wishlist/view/frontend/layout/default.xml C-5.) register-link -> module- wishlist -> C-6.) authorization-link -> module- wishlist -> -> /var/www/html/magento8pm/vendor/magento/framework/View/Element/Html/Links.php /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Ves_Themesettings/templates/html/links.phtml ------------------------- X-- No Used --------------------------------------------------- /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Magento_Theme/page_layout/1column.xml -> /var/www/html/magento8pm/vendor/magento/module-theme/view/base/page_layout/empty.xml ----------------------------------------------------- (20190914) 社区 https://magento.stackexchange.com https://stackoverflow.com/ https://community.magento.com/ cd /var/www/html/magento8pm/ home page -> app/design/frontend/Venustheme/8pm/Ves_Themesettings/templates/html/links.phtml -> vendor/magento/framework/View/Element/Html/Links.php index.php -> app/bootstrap.php -> app/autoload.php -> vender/autoload.php -> vender/composer/autoloadreal.php 首頁: class Links extends \Magento\Framework\View\Element\Html\Links -> /var/www/html/magento8pm/vendor/magento/framework/View/Element/Html/Links.php class Links extends \Magento\Framework\View\Element\Template -> class Template extends AbstractBlock -> abstract class AbstractBlock extends \Magento\Framework\DataObject implements BlockInterface -> /var/www/html/magento8pm/vendor/magento/module-catalog/view/frontend/layout/default.xml /var/www/html/magento8pm/app/design/frontend/Venustheme/8pm/Ves_Themesettings/templates/header/default.phtml getChildHtml('top_links') ?> --> D:\Temp-Downloads\AWS\8pm-zip\vendor\magento\module-theme\view\frontend 首頁右上角人頭下拉選單: 選項 catalog.compare.link 定義頁 -> D:\Temp-Downloads\AWS\8pm-zip\vendor\magento\module-catalog\view\frontend\layout\default.xml -> D:\Temp-Downloads\AWS\8pm-zip\vendor\magento\module-catalog\view\frontend\templates\product\compare\link.phtml 去掉 Compare Products -> mv /var/www/html/magento8pm/vendor/magento/module-catalog/view/frontend/templates/product/compare/link.phtml 選項 wish-list-link 定義頁 -> D:\Temp-Downloads\AWS\8pm-zip\vendor\magento\module-wishlist\view\frontend\layout\default.xml -> D:\Temp-Downloads\AWS\8pm-zip\vendor\magento\module-wishlist\view\frontend\templates\link.phtml 去掉My Wish List -> mv /var/www/html/magento8pm/vendor/magento/module-wishlist/view/frontend/templates/link.phtml 改LOGO: http://www.buck4u.com/magento8pm/pub/media/logo/default/logo.png ls /var/www/html/magento8pm/pub/media/logo/default/logo.png cd /var/www/html/magento8pm/pub/media/logo/default/ wget http://61.220.188.84/dv-2019-tmp/logo.png 去掉首頁 panel tool: VES THEMESETTINGS -> General Settings -> Panel Tool -> Enable -> No 去掉 element->8pm-product 彈出 compare, review, price, addtocart: show_compare=\"1\" -> show_compare=\"0\" show_review=\"1\" -> show_review=\"0\" show_price=\"1\" -> show_price=\"0\" show_addtocart=\"1\" -> show_addtocart=\"0\" \Magento\Framework\Exception\LocalizedException cd /var/www/html/magento8pm/ (20191026) AWS 啟動實例 IP-> 3.17.62.14 -> 18.218.158.219 phpmyadmin: http://18.218.158.219/awsadmin/ root + revres88 (20190909) puttygen.exe + dv-1.pem -> dv-1.ppk ssh: putty + IP + dv-1.ppk -> sudo su phpmyadmin: http://3.17.62.14/awsadmin/ root + revres88 手工改mysql data base: magento8pm megamenu -> table ves_megamenu_item 首頁header -> Main Website -> Search Box, Language, Currency(取消) /etc/apache2/sites-enabled/mag-wg-1.conf <- 網址 mag.wg-1.com 的設定檔, 實際設定檔在 /etc/apache2/sites-abvilable/mag-wg-1.conf /etc/apache2/sites-enabled/000-default.conf <- 預設網址 www.buck4u.com 的設定檔, 指向到 /var/www/html 目錄 之前給的STORE網址, 直接連就已經是錯誤, mag.wg-1.com 我改指向到 /var/www/html/mag-wg-1/ 目錄, 再由 index.html 去指向到 測試網址 /etc/apache2/apache2.conf 和 /var/www/html/magento8pm/.htaccess 都已經復原 apache 的 conf /etc/apache2/apache2.conf DocumentRoot /home/httpd/www/magento8pm ServerName www.buck4u.com AllowOverride all Order allow,deny Allow from all ErrorLog /var/log/httpd/error_log CustomLog /var/log/httpd/access_log common DocumentRoot /home/httpd/www/magento8pm ServerName mag.wg-1.com AllowOverride all Order allow,deny Allow from all ErrorLog /var/log/httpd/error_log CustomLog /var/log/httpd/access_log common 兩個網址都對應到同一個目錄 joe /var/www/html/magento8pm/.htaccess RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.buck4u\.com$ RewriteRule ^(.*)$ dn1.html [L] RewriteCond %{HTTP_HOST} ^mag\.wg-1\.com$ RewriteRule ^(.*)$ dn2.html [L] dn1.html 改 www.buck4u.com 要對應的PHP網頁 dn2.html 改 mag.wg-1.com 要對應的PHP網頁, 或直接整個完整網址, 例 http://www.buck4u.com/magento8pm/stores/store/switch/___store/demo2