This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Log to your own logfile | |
Mage::log('My log entry', null, 'mylogfile.log'); | |
#Log to the system logfile | |
Mage::log('My log entry'); | |
#Log to the exception logfile | |
Mage::logException($e); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Troubleshooting Mod_Security 2.5: | |
The first step is to identify which rule is blocking your users or breaking your site. To see what is happening, check your Apache Error log or your Mod_Security log. In your logs, you will see something like this: | |
Pattern match "(?:cd |\;|php |echo |perl |killall |python |rpm |yum |apt-get |emerge |lynx |links |mkdir |elinks |wget |lwp-(?:download|request|mirror|rget) |id|uname |cvs |svn |(?:s|r)(?:cp|sh) |net(?:stat|cat) |rexec |smbclient |t?ftp |ncftp |curl |telnet |g?cc |cp ..." at REQUEST_URI. [file "/etc/modsecurity/10_asl_rules.conf"] | |
[line "587"] [id "340037"] [rev "3"] [msg "Atomicorp.com - FREE UNSUPPORTED DELAYED FEED - WAF Rules: Generic command injection"] [severity "CRITICAL"] | |
yoursite.com 81.99.13.12 340037 [07/Jan/2011:22:43:29 --0800] | |
Pattern match "(?:cd |\;|php |echo |perl |killall |python |rpm |yum |apt-get |emerge |lynx |links |mkdir |elinks |wget |lwp-(?:download|request|mirror|rget) |id|uname |cvs |svn |(?:s|r)(?:cp|sh) |net(?:stat|cat) |rexec |smbclie |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysqldump --user username --password='password' databasename | gzip -9 > ./backup_database.sql.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### IMAGE PROTECTION #### | |
#protect images from hotlinking | |
RewriteEngine on | |
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?domainname.com [NC] | |
RewriteRule \.(jpg|jpeg|png|gif|bmp|tiff|svg)$ - [NC,F,L] | |
#protect images from hotlinking send new image | |
RewriteEngine on | |
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?domainname.com [NC] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install: | |
wget --no-check-certificate https://wordpress.org/latest.tar.gz | |
tar xvzf latest.tar.gz | |
cp -rf wordpress/* . | |
rm -r wordpress | |
rm latest.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Remove Link Outlines */ | |
a, a:active, a:focus { outline: none; -moz-outline-style: none; } | |
:-moz-any-link:focus { outline: none; -moz-outline-style: none; } | |
*, *:focus, *:active { outline: none; -moz-outline-style: none; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After upgrading: | |
delete all files except config.xml from the following directory: | |
/app/code/core/Mage/GoogleCheckout/etc | |
go to www.mywebsite/downloader then reinstall the package called Lib_Varien | |
go to /app/design/frontend/base/default/template/checkout/onepage/ file payment.phtml | |
(add this id to the fieldset) | |
<fieldset id="checkout-payment-method-load"> | |
<?php echo $this->getChildHtml('methods') ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ===================================== */ | |
/* Add This to Wordpress's /wp-content/yourtheme/functions.php file */ | |
define('MAGENTO_ROOT', '/Volumes/Storage/www/heartandsun/store/'); | |
define('MAGENTO_LOADER', MAGENTO_ROOT.'app/Mage.php'); | |
if (!class_exists('Mage')) { | |
require_once(MAGENTO_LOADER); | |
umask(0); | |
Mage::app("default"); | |
}; | |
/* ===================================== */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * FROM core_config_data WHERE path LIKE "carriers/matrixrate%"; | |
-- If you are happy that the result set is that which you want to delete (should be around 15 rows) do following: | |
DELETE FROM core_config_data WHERE path LIKE "carriers/matrixrate%"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Note: Whenever possible keep the name favicon and put in the web root as browsers look there by default even without the link tags. --> | |
<!-- Note: Only types png, gif, and ico support animation. --> | |
<!-- Favicon - Alternate Icon Types (Mixed Browser Support in order from least to most supported.) --> | |
<link rel="icon" href="/favicon.bmp" type="image/bmp" /> | |
<link rel="icon" href="/favicon.jpg" type="image/jpeg" /> | |
<link rel="icon" href="/favicon.gif" type="image/gif" /> | |
<link rel="icon" href="/favicon.png" type="image/png" /> | |
<!-- Favicon - IE 5 --> | |
<link rel="address bar icon" href="/favicon.ico"> | |
<!-- Favicon - IE 6 --> |