PHP Extensions needed for Magento 2.0

These are the PHP extensions that are required to install Magento 2.0

  • PHP Extension curl.
  • PHP Extension dom.
  • PHP Extension mcrypt.
  • PHP Extension simplexml.
  • PHP Extension spl.
  • PHP Extension xsl.
  • PHP Extension intl.
  • PHP Extension mbstring.
  • PHP Extension ctype.
  • PHP Extension hash.
  • PHP Extension openssl.
  • PHP Extension zip.
  • PHP Extension xmlwriter.
  • PHP Extension gd.
  • PHP Extension iconv.

How to install in Ubuntu 16.04

apt-get install php-curl php-dom php-mcrypt php-simplexml php-spl php-xsl php-intl php-mbstring php-ctype php-hash php-openssl php-zip php-xmlwriter php-gd php-iconv 

node.xx already installed, it’s just not linked. Brew error

I’ve been trying to install node using brew on Mac and encountered an error.


brew install node
==> Downloading https://homebrew.bintray.com/bottles/node-6.8.1.el_capitan.bottle.tar.gz
Already downloaded: /Users/kalmario/Library/Caches/Homebrew/node-6.8.1.el_capitan.bottle.tar.gz
==> Pouring node-6.8.1.el_capitan.bottle.tar.gz
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
Could not symlink share/doc/node/gdbinit
Target /usr/local/share/doc/node/gdbinit
already exists. You may want to remove it:
  rm '/usr/local/share/doc/node/gdbinit'

To force the link and overwrite all conflicting files:
  brew link --overwrite node

To list all files that would be deleted:
  brew link --overwrite --dry-run node

Fixing the link issue

First is to change the /usr/local permission to your user

 sudo chown -R `kalmario` /usr/local/

Force the link between node and /usr/local

brew link --overwrite node

Execute the post install

brew postinstall node

And you are done!

my xfce terminalrc

.config/xfce4/terminal/terminalrc

FontName=Inconsolata Medium 12
MiscAlwaysShowTabs=FALSE
MiscBell=FALSE
MiscBordersDefault=TRUE
MiscCursorBlinks=FALSE
MiscCursorShape=TERMINAL_CURSOR_SHAPE_BLOCK
MiscDefaultGeometry=80x24
MiscInheritGeometry=FALSE
MiscMenubarDefault=TRUE
MiscMouseAutohide=FALSE
MiscToolbarDefault=FALSE
MiscConfirmClose=TRUE
MiscCycleTabs=TRUE
MiscTabCloseButtons=TRUE
MiscTabCloseMiddleClick=TRUE
MiscTabPosition=GTK_POS_TOP
MiscHighlightUrls=TRUE
ColorBackground=#151515
ColorForeground=#CECECE
ColorCursor=#207A29
ColorPalette1=#1b1b1b
ColorPalette9=#3d3d3d
ColorPalette2=#662b1e
ColorPalette10=#c5533a
ColorPalette3=#1e662b
ColorPalette11=#3ac553
ColorPalette4=#59661e
ColorPalette12=#acc53a
ColorPalette5=#2b1e66
ColorPalette13=#533ac5
ColorPalette6=#661e59
ColorPalette14=#c53aac
ColorPalette7=#1e5966
ColorPalette15=#3aacc5
ColorPalette8=#b5b5b5
ColorPalette16=#ffffff

SQL Backup of magento catalog Category, product, prices, description

I need to replicate my production data to a development server (without the images) and this command will have the tables listed.

You can also use the import/export tool within the admin panel of magento but i hate those tools because it takes too long to import back. The import/export took time to finish because it will properly set all your Foreign Keys and ensure that indexes are correct.

Be sure to re-index your data once you imported it back to you dev server

mysqldump -u user -p DB_NAME 
catalog_category_anc_categs_index_idx 
catalog_category_anc_categs_index_tmp 
catalog_category_anc_products_index_idx 
catalog_category_anc_products_index_tmp 
catalog_category_entity 
catalog_category_entity_datetime 
catalog_category_entity_decimal 
catalog_category_entity_int 
catalog_category_entity_text 
catalog_category_entity_varchar 
catalog_category_flat_store_1 
catalog_category_product 
catalog_category_product_index 
catalog_category_product_index_enbl_idx 
catalog_category_product_index_enbl_tmp 
catalog_category_product_index_idx 
catalog_category_product_index_tmp 
catalog_compare_item 
catalog_eav_attribute 
catalog_product_bundle_option 
catalog_product_bundle_option_value 
catalog_product_bundle_price_index 
catalog_product_bundle_selection 
catalog_product_bundle_selection_price 
catalog_product_bundle_stock_index 
catalog_product_enabled_index 
catalog_product_entity 
catalog_product_entity_datetime 
catalog_product_entity_decimal 
catalog_product_entity_gallery 
catalog_product_entity_group_price 
catalog_product_entity_int 
catalog_product_entity_media_gallery 
catalog_product_entity_media_gallery_value 
catalog_product_entity_text 
catalog_product_entity_tier_price 
catalog_product_entity_varchar 
catalog_product_flat_1 
catalog_product_index_eav 
catalog_product_index_eav_decimal 
catalog_product_index_eav_decimal_idx 
catalog_product_index_eav_decimal_tmp 
catalog_product_index_eav_idx 
catalog_product_index_eav_tmp 
catalog_product_index_group_price 
catalog_product_index_price 
catalog_product_index_price_bundle_idx 
catalog_product_index_price_bundle_opt_idx 
catalog_product_index_price_bundle_opt_tmp 
catalog_product_index_price_bundle_sel_idx 
catalog_product_index_price_bundle_sel_tmp 
catalog_product_index_price_bundle_tmp 
catalog_product_index_price_cfg_opt_agr_idx 
catalog_product_index_price_cfg_opt_agr_tmp 
catalog_product_index_price_cfg_opt_idx 
catalog_product_index_price_cfg_opt_tmp 
catalog_product_index_price_downlod_idx 
catalog_product_index_price_downlod_tmp 
catalog_product_index_price_final_idx 
catalog_product_index_price_final_tmp 
catalog_product_index_price_idx 
catalog_product_index_price_opt_agr_idx 
catalog_product_index_price_opt_agr_tmp 
catalog_product_index_price_opt_idx 
catalog_product_index_price_opt_tmp 
catalog_product_index_price_tmp 
catalog_product_index_tier_price 
catalog_product_index_website 
catalog_product_link 
catalog_product_link_attribute 
catalog_product_link_attribute_decimal 
catalog_product_link_attribute_int 
catalog_product_link_attribute_varchar 
catalog_product_link_type 
catalog_product_option 
catalog_product_option_price 
catalog_product_option_title 
catalog_product_option_type_price 
catalog_product_option_type_title 
catalog_product_option_type_value 
catalog_product_relation 
catalog_product_super_attribute 
catalog_product_super_attribute_label 
catalog_product_super_attribute_pricing 
catalog_product_super_link 
catalog_product_website 
cataloginventory_stock 
cataloginventory_stock_item 
cataloginventory_stock_status 
cataloginventory_stock_status_idx 
cataloginventory_stock_status_tmp 
catalogrule 
catalogrule_affected_product 
catalogrule_customer_group 
catalogrule_group_website 
catalogrule_product 
catalogrule_product_price 
catalogrule_website 
catalogsearch_fulltext 
catalogsearch_query 
catalogsearch_result 
> your_magento_backup.sql

Sublime Text Preferences

Sublime Text has released a new Beta for version 3. This means i need to migrate my sublime personal preference. This post will help me copy and paste this on different workstation. The one listed are the only one i use.

{
    // instead of prompting, always reload changed files on disk.
	"autoReloadChanged": true,
    // colorscheme of choice
	"color_scheme": "Packages/Color Scheme - Default/Pastels on Dark.tmTheme",
    // my favorite coding font
	"font_face": "Inconsolata",
	"font_size": 14,

    // always know what tabs are not saved yet
	"highlight_modified_tabs": true,
	"open_files_in_new_window": false,

    // prefered tabs configuration
	"tab_size": 4,
	"translate_tabs_to_spaces": true,
	"useTabStops": true,

    // annoying wordwrap remove
	"wordWrap": false,

    // Characters that are considered to separate words
	"word_separators": "./\()"'-:,.;<>~!@#%^&*|+=[]{}`~?"
}

Oracle Endeca Forge Failed but with no logs

Sometimes when you execute your baseline update, Forge fails and produces no logs.

[06.28.13 11:34:01] SEVERE: Batch component 'Forge' failed. Refer to component logs in /data/endeca/apps/usapseattlesmall/./logs/forges/Forge on host ITLHost.
Occurred while executing line 23 of valid BeanShell script:

20|
21| // archive logs and run ITL
22| Forge.archiveLogDir();
23| Forge.run();
24| Dgidx.archiveLogDir();
25| Dgidx.run();
26|

[06.28.13 11:34:01] SEVERE: Caught an exception while invoking method 'run' on object 'BaselineUpdate'. Releasing locks.

Caused by java.lang.reflect.InvocationTargetException
sun.reflect.NativeMethodAccessorImpl invoke0 - null
Caused by com.endeca.soleng.eac.toolkit.exception.AppControlException
com.endeca.soleng.eac.toolkit.script.Script runBeanShellScript - Error executing valid BeanShell script.
Caused by com.endeca.soleng.eac.toolkit.exception.EacComponentControlException
com.endeca.soleng.eac.toolkit.component.BatchComponent run - Batch component 'Forge' failed. Refer to component logs in /data/endeca/apps/usapseattlesmall/./logs/forges/Forge on host ITLHost.

[06.28.13 11:34:01] INFO: Released lock 'update_lock'.

Possible issue here are:

1. Pipeline has incorrect XML format due your custom calculations
2. Forge did not start because of Environment Variables

To help with the Issue you should inspect your logs at $ENDECA_CONF/logs: process.x.log , invoke.x.log , main.x.log will give you hints on what went wrong.

Check Validity of Pipeline’s XML Content

You can execute a linux command to check whether your XMLs are properly formatted by:

xmllint --noout *.xml

if anything was printed on your terminal there is an issue with XML formatting.

Installing Citrix Receiver ICAClient on Ubuntu 12.04 or 13.04

1. You need to install open motif libraries, so fire your terminal and install libmotif4

sudo apt-get install libmotif4 nspluginwrapper

2. Download Citrix Receiver

Remember that i386 are for intel based computers and the amd* are for AMDs

3. Open your site using firefox and it will show an error

You have not chosen to trust “AddTrust External CA Root”, the issuer of the server’s security certificate.

4. Copy your firefox certificates and add them to your citrix certificates
cp /usr/share/ca-certificates/mozilla/* /opt/Citrix/ICAClient/keystore/cacerts/

Starting Endeca Dgraph Manually

Sometimes Using the workbench is not enough to start a component. Below is the command to manually start your dgraph or any component

This command uses the Workbench to start the dgraph

sh /path/to/PlatformServices/6.1.3/bin/eaccmd.sh start --app app_id --comp Dgraph1

another way is to use the Dgraph command

${ENDECA_PATH}/MDEX/6.4.0/bin/dgraph  
--threads 6  
--whymatch  
--spl  
--dym  
--dym_hthresh 5  
--dym_nsug 3  
--stat-abins  
--unctrct -v  
--port 19003  
--pidfile ${ENDECA_PATH}/apps/usapseattlesmall/dgraph.pid  
--log ${ENDECA_PATH}/apps/usapseattlesmall/logs/dgraphs/Dgraph1/Dgraph1.reqlog  
--out ${ENDECA_PATH}/apps/usapseattlesmall/logs/dgraphs/Dgraph1/Dgraph1.log  
--spellpath ${ENDECA_PATH}/apps/usapseattlesmall/data/dgraphs/Dgraph1/dgraph_input  
--updatedir ${ENDECA_PATH}/apps/usapseattlesmall/data/dgraphs/Dgraph1/dgraph_input/updates  
--updatelog ${ENDECA_PATH}/apps/usapseattlesmall/logs/dgraphs/Dgraph1/Dgraph1.updatelog ${ENDECA_PATH}/apps/usapseattlesmall/data/dgraphs/Dgraph1/dgraph_input/usap

insertAfter XML on PHP, insert element after last child

I’ve been dealing with XML parsing today and I’ve been trying to add an element to the last sibling. The problem is there are no insertAfter() function on PHP, what you need is to get the last sibling and move to the next sibling before inserting your new element.


$lastChild = $searchInterface->lastChild;
$member = $this->doc->createElement('MEMBER_NAME');
$searchInterface->insertBefore($member, $lastChild->nextSibling);