Portfolio
SQL

WinNMP – Config

February 27, 2018Category : Code/Web IT & Network

How to send emails using PHP WinNMP has 2 options for processing emails sent by PHP’s mail() function: mSmtp and mailToDisk (default). To change the option, edit confphp.ini and modify sendmail_path: For Development use mailToDisk (the default): sendmail_path = ‘”C:/WinNMP/bin/php” -n -f “C:/WinNMP/include/tools/mailtodisk.php”‘ Emails will be saved to logmail-XX.txt For Production use mSmtp: sendmail_path = ‘”C:/WinNMP/bin/msmtp/msmtp.exe” -C “C:/WinNMP/conf/msmtp.ini” -t’ You also need to edit confmsmtp.ini in order to configure SMTP server options   How..

Read more
01.

Phân tích hệ thống tiki.vn 2014

September 21, 2017Category : Code/Web

Tổng quan hệ thống Mọi lời nói không thể thay thế bằng hình ảnh rõ ràng được :) Tiki sử dụng Magento version 1.x Source code Magento sẽ được deploy lên 4 server web app, server Media và request sẽ được load balance qua 4 server này Database sử dụng là Percona MySQL được cấu..

Read more
02.

EasyEngine & WordPress

September 18, 2017Category : Code/Web IT & Network

EasyEngine là gì? EasyEngine là một *UNIX script dành cho hệ điều hành Ubuntu/Debian giúp bạn tự động cài đặt một webserver sử dụng NGINX và PHP-FPM hoàn chỉnh phục vụ riêng cho WordPress. Điều này có nghĩa là nó sẽ tự tối ưu hóa cho NGINX để làm việc với WordPress tốt nhất. Bởi vì chúng ta..

Read more
03.

[VPS] Rclone – Backup toàn bộ VPS lên Google Drive – Script sao lưu backup vps

September 28, 2016Category : IT & Network

Rclone là một công cụ đồng bộ hóa dữ liệu tương tự Rsync nhưng lại được tập trung phát triển chức năng kết nối với các dịch vụ lưu trữ đám mây. Ưu điểm của việc sử dụng dịch vụ lưu trữ đám mây đó là tốc độ cao (do có server được đặt trên khắp thế..

Read more
05.

Direct sql quiries in magento

September 1, 2016Category : Code/Web

Database Connections In Magento By default, Magento will automatically connect to it’s database and provide two separate resources which you can use to access data: core_read and core_write. As you can probably guess, core_read is for reading from the database while core_write is for writing to the database. It is important to ensure that you..

Read more
06.

Magento import produdct – fix product not show

September 1, 2016Category : Code/Web

SQL <?php /** * @author Linhdh * @website http://181988.xyz * @project update price and specialPrice */ error_reporting(E_ALL | E_STRICT); define(‘MAGENTO_ROOT’, getcwd()); $mageFilename = MAGENTO_ROOT . ‘/app/Mage.php’; require_once $mageFilename; Mage::app(); $ids = Mage::getModel(‘catalog/product’)->getCollection()->getAllIds(); Mage::getSingleton(‘catalog/product_action’)->updateAttributes( $ids, array(‘status’=>1, ‘visibility’=>4), 0 );  

Read more
07.

Magento remove duplicate img

September 1, 2016Category : Code/Web

SQL <?php /** * @author Linhdh * @website http://181988.xyz * @project update price and specialPrice */ include(‘app/Mage.php’); //Mage::App(‘default’); Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); error_reporting(E_ALL | E_STRICT); Mage::setIsDeveloperMode(true); ini_set(‘display_errors’, 1); ob_implicit_flush (1); $mediaApi = Mage::getModel(“catalog/product_attribute_media_api”); $_products = Mage::getModel(‘catalog/product’)->getCollection(); $i =0; $total = count($_products); $count = 0; foreach($_products as $_prod) { $_product = Mage::getModel(‘catalog/product’)->load($_prod->getId()); $_md5_values = array(); //protected base image $base_image..

Read more
08.

Magento SQL update price and special price form csv

September 1, 2016Category : Code/Web

SQL <?php /** * @author Linhdh * @website http://181988.xyz * @project update price and specialPrice */ $mageFilename = ‘app/Mage.php’; require_once $mageFilename; Mage::setIsDeveloperMode(true); ini_set(‘display_errors’, 1); umask(0); Mage::app(‘admin’); Mage::register(‘isSecureArea’, 1); Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID); set_time_limit(0); ini_set(‘memory_limit’,’1024M’); /***************** UTILITY FUNCTIONS ********************/ function _getConnection($type = ‘core_read’){ return Mage::getSingleton(‘core/resource’)->getConnection($type); } function _getTableName($tableName){ return Mage::getSingleton(‘core/resource’)->getTableName($tableName); } function _getAttributeId($attribute_code = ‘price’){ $connection = _getConnection(‘core_read’); $sql..

Read more
09.

Magento bulk product import with images

August 30, 2016Category : Code/Web

I recently had to transfer the inventory of an old Shop Factory site into Magento 1.7. Magento offers a powerful facility to do this via CSV using its DataFlow profiles but this is not without its quirks and pitfalls so I thought I’d share my experiences. Importing product data First, you will need to know..

Read more
010.

Kiểm Soát Truy Cập File Server Với File System Auditor (FSA)

June 30, 2014Category : IT & Network

Như chúng ta được biết trong môi trường doanh nghiệp việc chia sẽ file tài nguyên mạng giữa các nhân viên các bộ phận giúp cho thuận tiện trong công việc làm việc theo nhóm, cũng như bảo mật và backup dự phòng. Nhưng điều này cũng dẫn đến tình trạng có nhiều người có..

Read more
013.

[Magento] Optimize magento database by Cleaning log

January 3, 2014Category : Code/Web

Optimize magento database Log Cleaning Magento maintains several tables for logging. These tables log things such as customer accesses and which products have been compared. Magento has a mechanism for cleaning these logs regularly, but unfortunately this feature is disabled by default and most customers do not turn it on. There are three ways to..

Read more
014.

Script backup MSSQL

July 12, 2012Category : IT & Network

Đôi khi những thứ có vẻ phức tạp lại dễ dàng hơn nhiều khi bạn tận dụng sức mạnh của T-SQL để thực hiện các công việc lặp đi lặp lại. Một trong những công việc này có thể là cần phải sao lưu tất cả các cơ sở dữ liệu trên máy chủ của..

Read more
015.

Kế hoạch khôi phục thảm họa Active Directory

June 19, 2012Category : IT & Network

Ngăn chặn lỗi Active Directory chính là thành phần chủ yếu trong bất cứ kế hoạch khôi phục thảm họa nào. Tuy có nhiều cách có thể giảm được thảm họa cho Active Directory nhưng cách tốt nhất để tối thiểu thời gian chết của máy móc chính là cần phải có một kế hoạch..

Read more
016.
© Oliver / All rights reserved.
To top