Linux – Add or edit DNS-server

In most Linux distribution the nameservers are stored in the file /etc/resolv.conf So you can edit it via: $> sudo nano /etc/resolv.conf You will see something like that: nameserver 192.168.88.1 nameserver 0.0.0.0 As you can see all nameserver entries follow the pattern: nameserver IPADRESS When searching for an DNS-Server the list is processed top down. […]

Allow access from multiple IPs

Sometimes you’re working in a network that has multiple external IP’s that are multiplexed. So for Typo3 your IP seems to change with nearly every click. With the default configuration you’ll be kicked out every now and then. To get rid of this problem, you can add the following snipped to your /typo3conf/lLocalConfiguration.php or /typo3conf/AdditionalConfiguration.php: […]

Create a SSH key with 1024 Bit encryption

To generate a 1024 Bit encrypted SSH key you can use the following command: $> ssh-keygen -b 1024 -t rsa Normally the key is saved in ~/.ssh/id_rsa together with the corresponding public key (~/.ssh/id_rsa.pub). Attention: Make sure you can remember the paraphrase later on if you entered one.

Run PHP script with parameters within another PHP script

Recently I had to call a PHP script within another script with some arguments. Normally you pass these parameters by GET or POST. But how to do it within another script? Here is how to run PHP script with parameters within another PHP script: //set arguments $_SERVER[‘argv’][1] = ‘-action’; $_SERVER[‘argv’][2] = ‘unsetMaintenanceMode’; $_SERVER[‘argv’][3] = ‘-initRedis’; $_SERVER[‘argv’][4] […]

Magento – Put Category-IDs into category tree in backend

To show the category IDs in the category tree under Catalog->Categories->Manage Categories you can rewrite Mage_Adminhtml_Block_Catalog_Category_Tree in an own module. You have to rewrite the method buildNodeName like this: /** * Get category name * * @param Varien_Object $node * @return string */ public function buildNodeName($node) { $result = $this->escapeHtml($node->getName()); if ($this->_withProductCount) { $result .= ‘ (‘ . $node->getProductCount() […]

Magento – Define default values in config.xml

You can define system config value defaults in your modules config.xml like that. <?xml version=”1.0″?> <default> <myconfig_group> <settings> <test>1</test> <cronjobs>0</cronjobs> <client>0813</client> <serviceprovider>117</serviceprovider> <pricelist></pricelist> </settings> <productexport> <lux_kategorie>21</lux_kategorie> <store_view_german>1</store_view_german> <store_view_english>12</store_view_english> </productexport> </myconfig_group> </default> This sets the default value for all stores. If you want to set default values for a special store (scope), you can do it […]