sexta-feira, dezembro 11, 2015

Customer Login Doesn't Work in Magento 1.9

ce 1.9.0.1 - Customer Login Doesn't Work in 1.9 - Magento Stack Exchange



Customer Login Doesn't Work in Magento 1.9


The answer is that your theme does not supply a variable called form_key.
Just as stated above I have to add:
<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" />
<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" />

you add it right after <ul class="form-list">
to each one of my login.phtml files for the theme.
You may also have problems with update quantity of cart items
Take a look at http://iamvikram.com/magento-form-keys-in-version-1-8/ for more information
Here is the importance of form_keys:
Since the beginning of time, Magento's backend contained a form key that protected against XSS attacks [1]. With Magento 1.8 the form key has entered the frontend for pretty much the same reason: to protect against form submission from another website, using your browser. a malicious attacker can add stuff to your cart while you're in a different browser tab or even complete an order for you. This relies on predictable URLs, because the site will not have access to the actual HTML content in the browser tab where you have your Magento order waiting. Everything sent to the Magento store will however submit your cookies and thus use your session.
By adding a unique key to each form or to each link that generates an action on the server, the URL or form content becomes no longer predictable. The form key is stored in the session data and validated upon submission to the server. If they don't match, you get a form key error and the action is not completed.

Script to reset all customer passwords in Magento

Script to reset all customer passwords in Magento




Script to reset all customer passwords in Magento


The following script was created to reset all customer passwords in a Magento store. It creates the new password from the first 3 characters of the customer’s current e-mail address, and a random 3 digit number. The total password length is 6 characters, but it can easily be modified. It also stores all the passwords to a tab-delimited file, this way you can refer to it later. All of this is just subjective, so you will want to tailor it to suit your exact needs.

For obvious security reasons, you will want to remove this script after you use it, or at the very least put it in a protected directory of some kind.
<?php
/************************ * / '_ __/_ _/_
* ()()/(-( /( ()(/(-
* _/
* since 2007
*
* Created by Foundco
* All rights reserved unless otherwise specified under contract.
* http://www.foundco.com/
* @author Christopher Hogan <mailing address removed>
* @copyright 2012 and beyond.
******************************/


error_reporting(E_ALL | E_STRICT);
$mageFilename = 'app/Mage.php';
if (!file_exists($mageFilename)) {
echo $mageFilename." was not found";
exit;
}
require_once $mageFilename;
Varien_Profiler::enable();
Mage::setIsDeveloperMode(true);
ini_set('display_errors', 1);
umask(0);
Mage::app();

$passwordLength = 10;

/****
If you are just resetting one customer by customer_id:
****/

//$customer_id = 10;
//$customers = Mage::getModel('customer/customer')->getCollection()->addAttributeToFilter('entity_id', array('eq' => $customer_id));

/****
If you are resetting all customers:
****/

$customer_id = 10;
$customers = Mage::getModel('customer/customer')->getCollection();

/****
Now loop through the customers and create the passwords
****/

foreach ($customers as $customer){
// $customer->generatePassword($passwordLength)
// $customer->sendNewAccountEmail();
$password = strtoupper(substr( $customer->getEmail(), 0, 3)).rand(111,999);
$customer->setPassword($password)->save();
$line_data = $customer->getEmail(). "\t". $customer->getPassword();
$line[] = $line_data;
echo $line_data."\n";
}
$content = implode("\n", $line);

// store all the passwords to a file:
file_put_contents('./accounts.csv', $content);
echo "COMPLETE!";
?>

sexta-feira, dezembro 04, 2015

remover modulo pagseguro magento manualmente

remover modulo pagseguro magento manualmente - Pesquisa Google





Depois de muito pesquisar com esse link acima não achei nada que me ajudasse



Utilizo versão 1.8.1 do magento e havia instalado Modulo PagSeguro para magento, e para remover manualmente pois não havia modo de somente desabilitar



segue comandos do linux

cd /home/MAGENTO_HOME/public_html/

find . -name PagS* (apenas para indicar quais arquivos físicos existem)

rm -rf ./app/code/local/PagSeguro

rm -rf ./includes/src/PagSeguro*

rm -rf ./app/etc/modules/PagSeguro_PagSeguro.xml





Pulo do gato!!!



editar  vim includes/src/Mage_Adminhtml_Block_Sales_Order_Grid.php



comentar as linhas conforme abaixo



função -> protected function _prepareCollection()

comentar as linhas abaixo com //

 //'require_once(getcwd().'/app/code/local/PagSeguro/PagSeguro/Model/Updates.php');

//Updates::createTableModule($collection);


vim app/code/local/Mage/Adminhtml/Block/Sales/Order/Grid.php

    protected function _prepareCollection()
    {
        // COMMENT THIS require_once(getcwd().'/app/code/local/PagSeguro/PagSeguro/Model/Updates.php');
        $collection = Mage::getResourceModel($this->_getCollectionClass());

        // COMMENT THIS Updates::createTableModule($collection);





domingo, novembro 29, 2015

Instalação e Configuração do KODI com a lista oficial.



Instalação e Configuração do KODI com a lista oficial.



Download Kodi -> http://kodi.tv/download/


Confira o tutorial detalhado para instalação do KODI e configura-lo com a nossa lista oficial.
TUTORIAL KODI - IPTV BRASIL Group (Multi Plataforma. Serve em todos os sistemas operacionais)
• Faça o download e a instalaçao do programa de acordo com seu sistema operacional:
Programa pra Windows: https://iptvbr.org/index.php/downloads/programas/windows/5-kodi-14-2
Programa pro Android Arquitetura ARM (maioria dos aparelhos): https://iptvbr.org/index.php/downloads/programas/android/6-kodi-14-2-arm
Programa pro Android x86: https://iptvbr.org/index.php/downloads/programas/android/7-kodi-14-2-x86
Outras Plataformas: http://kodi.tv/download/

TRADUÇÃO DO APLICATIVO:
• Abra o Kodi e desliza até a opção system;
• Vai na opção apparence, clica em International, em language e muda pra português.
• Volta tudo, aí clica em sistema e clica em TV ao vivo e clica em ativado
• Da ok, Vai aparecer uma listagem, Clica em PVR IPTV SIMPLE CLIENT, e clica na opção ativar e depois clica em configurar.

ABA GERAL
• Clica na opção URL para lista de reprodução m3u.
• Em URL digita: https://lista.iptvbr.org   // http://lista.iptvglobal.com.br
• Clica em feito

ABA AJUSTE EPG
• Clica na aba Ajuste EPG e ai Clica na opção URL XML TV
• E digita: https://epg.iptvbr.org   //  http://epg.iptvglobal.com.br
• Clica em feito

ABA LOGOS DOS CANAIS
• Clica na aba logos dos canais e clica em URL Básica dos canais
• E digita: https://logos.iptvbr.org  // http://logos.iptvglobal.com.br
• Clica em feito
• E depois em OK

• Volta tudo Fecha o app e abre de novo
• Aí vai carregar um progresso no topo
• Procure a opção TV do lado esquerdo e divirta-se

terça-feira, novembro 17, 2015

Fixing Wi-Fi Issues in OS X El Capitan osx

Fixing Wi-Fi Issues in OS X El Capitan





Fixing Wi-Fi Issues in OS X El Capitan

Oct 16, 2015 - 80 Comments
Though Apple has largely resolved the wi-fi issues that persisted in some Macs with prior OS X releases, some users with OS X El Capitan may encounter wireless networking issues after updating to the latest OS X release. Typically the wi-fi problems are in the form of dropping connections or strangely slow speeds, and the good news is they’re usually an easy fix.
For most Mac users who are experiencing issues with wi-fi connections in OS X El Capitan, simply ditching old preference files, followed by creating a new network location with custom DNS settings and an MTU change is enough to resolve whatever wi-fi problems they may have had. This is a multi-step process but not particularly difficult.
You’re going to be deleting a few system level preference files and creating a new network location. Before getting started, you should start and complete a backup of the Mac with Time Machine. Don’t skip backups.

Trash Existing Wi-Fi Preferences in OS X to Start Fresh

  1. Create a new folder on your Desktop called ‘wifi prefs backup’ or something obvious
  2. Turn off Wi-Fi from the menu item in the upper right corner of OS X
  3. Go to the Finder (the smiley face icon in the Dock), and hit Command+Shift+G to bring up the Go To Folder command, choose the following path exactly:
  4. /Library/Preferences/SystemConfiguration/
  5. Hit return to go to that folder, then locate and select the following files:
  6. com.apple.airport.preferences.plist
com.apple.network.identification.plist
    com.apple.wifi.message-tracer.plist
    NetworkInterfaces.plist
    preferences.plist

    Trash old network prefs
  7. Move all of these files into the folder you created in step 1 on the desktop (you can also delete them if you’re confident and have made a backup)
  8. Reboot the Mac
  9. Turn on Wi-Fi from the wireless network menu again in the upper right corner of OS X
If your wi-fi works now, great, but for most users, you’re not quite finished yet! Now you need to create a new custom network location.

Create a New Wi-Fi Network Location with Custom DNS

  1. Quit any open apps that are using wi-fi or networking (Chrome, Safari, Mail, etc)
  2. Go to the  Apple menu and select “System Preferences”
  3. Choose the “Network” control panel, then choose Wi-Fi from the list on the left side
  4. Click the “Location” menu and select “Edit Locations”, then click the [+] plus button to create a new location, giving the new location an easily identifiable name like “Fixing My WiFi” and click “Done” to add it
  5. Create new network location in OS X
  6. Next to “Network Name” join the wi-fi network and authenticate with the router password as usual
  7. Next, select the “Advanced” button in the lower corner of Network preferences, then go to the “TCP/ IP” tab, choose “Renew DHCP Lease”
  8. Renew DHCP
  9. Next go to the “DNS” tab, and on the left side “DNS Servers” list, click the [+] plus button to add a new DNS server* – I use 8.8.8.8 and 8.8.4.4 for Google DNS but you can choose whatever you want
  10. Custom DNS to fix wi-fi speed issues
  11. Next, choose the “Hardware” tab, then next to ‘Configure’ choose “Manually”
  12. Change “MTU” to “Custom” and set the MTU number to 1453, then click on “OK”
  13. Set some custom MTU settings for the magic wi-fi fix
  14. Finally, choose the “Apply” button to set your network changes
* If you’re not sure what DNS to use, you can find the fastest DNS servers for your situation with a benchmarking utility. Typically the fastest servers are Google DNS and OpenDNS, but results may vary per region.
Now wireless connectivity should be working flawlessly in OS X, and back at full speed. Try things out by navigating around the web, doing a speed test, and just using the internet as usual.
The solution outlined above almost always works to resolve wireless networking issues in OS X, particularly if they occur after updating to a new version of system software or a point release.

Additional Wi-Fi Troubleshooting Tips

If you’re still having trouble with wi-fi in OS X 10.11 or later, try the following:
Have you had wi-fi issues or speed problems with OS X El Capitan? Did this work to resolve them for you? Let us know in the comments, or if you had another solution, let us know that too!

sexta-feira, novembro 13, 2015

Magento - Installing Mcrypt on Centos6

Magento - Installing Mcrypt on Centos6 :: Design that fits





magento Notice: Use of undefined constant MCRYPT_BLOWFISH - assumed 'MCRYPT_BLOWFISH' Mcrypt.php on line 67




Magento - Installing Mcrypt on Centos6


Some magento payment gateways require PHP's Mcrypt library in order to work correctly, here's how you set it up in Centos6.


We were migrating a Magento development website over to it's live environment the other day and came across the following errors when accessing a payment gateway:

Notice: Use of undefined constant MCRYPT_BLOWFISH - assumed 'MCRYPT_BLOWFISH' in /lib/Varien/Crypt/Mcrypt.php on line 56

Notice: Use of undefined constant MCRYPT_MODE_ECB - assumed 'MCRYPT_MODE_ECB' in /lib/Varien/Crypt/Mcrypt.php on line 60

To fix this you need to install PHP Mcrypt. On Centos6 you can usually use the following command:
yum install php-mcrypt*

You may find that the EPEL repository doesn't contain the relevant install files, in which case you will have to add new repos that contain the php-mcrypt install as follows:
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
sudo rpm -Uvh remi-release-6*.rpm epel-release-6*.rpm
yum update
yum install php-mcrypt*

And then finally, service httpd restart in order to restart your web server.

segunda-feira, novembro 09, 2015

Magento upgrade from 1.4, 1.5, 1.6, 1.7, or 1.8 to 1.9

Magento upgrade from 1.4, 1.5, 1.6, 1.7, or 1.8 to 1.9 | DUNTUK



Magento upgrade from 1.4, 1.5, 1.6, 1.7, or 1.8 to 1.9

NOTE: this upgrade process works the same way for Magento version 1.4, 1.5, 1.6, 1.7, 1.8, and 1.9

As many magento users will know, Magento is no fun to work with-- mainly due to poor community support (the developers help paying customers; i.e. Magento Enterprise ... Only payed support there... Great for business but bad for the average or beginning user...)
Anyhow...
So here's how we do it.

MAKE A BACKUP!

You can skip this step all together, however, please make a backup of everything prior to beginning the upgrade.
Create a test environment somewhere on your server (preferably away from your production installation)
  1. I usually create a subdomain on another domain and setup files there.
  2. cd /home/DEVUSER/public_html/DEVSUBDOMAIN
    # This following command will sync all files from /home/PRODUCTIONUSER/public_html/ (SOURCE) to /home/DEVUSER/public_html/DEVSUBDOMAIN/ (DESTINATION) 
    # the --delete switch tells it to delete any files on the DESTINATION that are NOT present on the SOURCE.
    # 'z'  tells it to compress the files in transfer so to use less bandwidth (in case you're doing external locations).
    # 'P' combines --progress and --partial ; which means it will show a progress bar and will resume partial transfers.
    rsync --avzP --delete /home/PRODUCTIONUSER/public_html/ /home/DEVUSER/public_html/DEVSUBDOMAIN/
    Again, just so you don't mess this up, the rsync command works like this:
    rsync -avzP --delete [SOURCE] [DESTINATION]
    BONUS: if you're updating an already existing DEV location, do the following instead, so to NOT overwrite app/etc/local.xml
    rsync -avzP --exclude=app/etc/local.xml --exclude=media/import --delete [SOURCE] [DESTINATION]
  3. Create a new database for this development domain--via whatever method you have available (usually through your web server control panel).

  4. Clean Magento Logs to minimize database backup size

    Under Admin, go to System --> Configuration --> (sidebar menu) Advanced --> System --> (main column) Log Cleaning and set "Enable Log Cleaning" to "Yes". I also set the "Save Log, Days" to "15"
    NOTE: if this is your first time enabling log cleaning, you will then want to run the following in SSH at your base magento installation--this will take a while if you haven't ever cleaned your logs:
    php -f shell/log.php clean –days 15
    Or... If you don't care about saving any logs and want to do this as fast as possible, then do this in phpMyAdmin:
    truncate dataflow_batch_export;
    truncate dataflow_batch_import;
    truncate log_customer;
    truncate log_quote;
    truncate log_summary;
    truncate log_summary_type;
    truncate log_url;
    truncate log_url_info;
    truncate log_visitor;
    truncate log_visitor_info;
    truncate log_visitor_online;
    truncate report_event;
    # truncate report_viewed_product_index 
    # truncate report_compared_product_index
  5. Make a backup of the current database in SSH via:mysqldump -u user -p --add-drop-table DB_NAME > DB-NAME.sql
  6. Dump the backup you just made into your new databasemysql -u user -p DB_NAME < DB-NAME.sql
  7. Change the database settings to point to new databasevi app/etc/local.xml
  8. Change your magento URLs to In phpmyadmin go to tablecore_config_data
    and change both to: http://YOURDEVDOMAIN.com/(link is external) (do NOT put 'https' for any, as this will create problems)
    web/unsecure/base_url
    and
    web/secure/base_url
  9. Also, change your web/cookie/cookie_domain from www.YOURPROUDCTIONDOMAIN.com(link is external) to www.YOURDEVDOMAIN.com(link is external)
    (If you don't, you won't be able to add products to your cart while testing)
    web/cookie/cookie_domain
  10. Side note: as an alternative, you can do a full search and replace of the backup to change the urls like so
    sed -i 's/www.PRODUCTIONDOMAIN.com/www.YOURDEVDOMAIN.com/g' ./DB-NAME.sql
  11. Turn on system.log logging, set from '0' to '1'
    system/log/enabled
    dev/log/active
    Turn on FULL PHP error reporting in index.php
    <?php/* change to or add the following--this will be scattered throughout the file */error_reporting(E_ALL);$_SERVER['MAGE_IS_DEVELOPER_MODE'] = true;ini_set('display_errors'1);?>
  12. REMEMBER to change all settings back to normal, after the upgrade is done and upgraded files and database are transferred to the production environment.

Upgrade Magento to 1.9

1. Download the latest version of Magento

Since Magento 1.9.2.0, you can no longer directly download the files. Hence you'll have to use https://www.magentocommerce.com/download(link is external) (and manually SFTP to your server OR use the github repo
git clone https://github.com/OpenMage/magento-mirror.git
Or an older version:
wget http://www.magentocommerce.com/downloads/assets/1.8.1.0/magento-1.8.1.0.tar.gz
wget http://www.magentocommerce.com/downloads/assets/1.7.0.2/magento-1.7.0.2.tar.gz   
wget http://www.magentocommerce.com/downloads/assets/1.6.2.0/magento-1.6.2.0.tar.gz  
wget http://www.magentocommerce.com/downloads/assets/1.5.1.0/magento-1.5.1.0.tar.gz  
 
tar xvfz magento-1.8.1.0.tar.gz
tar xvfz magento-1.7.0.2.tar.gz
tar xvfz magento-1.6.2.0.tar.gz 
tar xvfz magento-1.5.1.0.tar.gz 

Direct download of magento patches

wget http://www.magentocommerce.com/downloads/assets/ce_patches/NAME-OF-PATCH
 
# Example: SUPEE-4829 - This patch fixes an issue in which product images become larger when a shopper selects a swatch on a search result page. - Added Nov 26, 2014
# Note: This patch is applicable only to Magento Community Edition 1.9.1
 
wget http://www.magentocommerce.com/downloads/assets/ce_patches/PATCH_SUPEE-4829_EE_1.14.1.0_v1.sh

2. Disallow access to your site if doing the upgrade on a production environment (this is why you should do this on a test environment)

mv .htaccess .htaccess-bkp
cp magento/.htaccess .
cp .htaccess .htaccess-new
In your new .htaccess change the Order Allow to (at the bottom of file):
#Order allow,deny     
#Allow from all 
Order deny,allow 
Deny from all 
Allow from YOUR IP ADDRESS 
Also, up the memory usage (especially if your database backup is over 500MB--hopefully you're running magento on a dedicated server.)
php_value memory_limit 1024M
php_value max_execution_time 45000

3. Flush all caches

rm -rf var/cache/* var/session/* var/locks/* var/full_page_cache/* tmp/*
rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*
service httpd restart
service memcached restart
 
or
 
rm -rf var/cache/* var/session/* var/locks/* var/full_page_cache/* tmp/* && rm -rf downloader/pearlib/cache/* downloader/pearlib/download/* && service httpd restart && service memcached restart 

4. Remove the 'downloader' and 'app/design/frontend/base' directory

rm -rf downloader
rm -rf downloader
rm -rf app/design/frontend/base
rm -rf skin/frontend/base
This is the safest bet so mage/pear doesn't upgrade the wrong installation; trust me this happened to me a couple of times, EVEN after doing ' mage-setup'.
As for the 'base' directory, we remove that because deprecated files exist in there that may cause problems. E.g. One page checkout would not work for anon users, but would work for registered users--and this happened even when all the files were overwritten with magento 1.5.1; meaning magento was picking up deprecated files.
You may also want to clear out redundant theme files in app/design/frontend/default/YOURTHEME/ AND app/design/frontend/default/default/
The following are the only custom template files I use--it's better to use the least amount possible to avoid future upgrade headaches
  • app/design/frontend/default/YOURTHEME/layout/catalog.xml
  • app/design/frontend/default/YOURTHEME/template/callouts/left_col.phtml
  • app/design/frontend/default/YOURTHEME/template/catalog/product/view.phtml
  • app/design/frontend/default/YOURTHEME/template/checkout/success.phtml
  • app/design/frontend/default/YOURTHEME/template/page/1column.phtml
  • app/design/frontend/default/YOURTHEME/template/page/2columns-left.phtml
  • app/design/frontend/default/YOURTHEME/template/page/2columns-right.phtml
  • app/design/frontend/default/YOURTHEME/template/page/3columns.phtml
  • app/design/frontend/default/YOURTHEME/template/page/html/footer.phtml
  • app/design/frontend/default/YOURTHEME/template/page/html/head.phtml
  • app/design/frontend/default/YOURTHEME/template/page/html/header.phtml
Same goes for app/design/frontend/default/default/. You want to remove any redundant theme files in there as well. Basically, you'll ONLY want to keep any installed modules you may be using; get rid of the rest.
e.g. I only have the following in app/design/frontend/default/default/:
  • app/design/frontend/default/default/etc/widget.xml # I probably don't even need this
  • app/design/frontend/default/default/layout/vertnav.xml
  • app/design/frontend/default/default/template/vertnav/left.phtml

5. Copy 'downloader' and 'app/design/frontend/base' folder from magento-1.8.1.0

cp -a magento/downloader .
cp -a magento/app/design/frontend/base/ app/design/frontend/

6. Install/get 'mage'.

cp magento/mage .
chmod 755 ./mage
We do this because the 'pear' method doesn't work anymore--it only does an upgrade up to magento 1.4.2; it won't work upgrading any higher than that.

7. Do the upgrade

** IMPORTANT: make sure your Magento Connect Manager 'Preferred State' is set to 'Stable' **
./mage config-set preferred_state stable
Or, you can set it here:
https://www.YOURWEBSITE.com/downloader/index.php?A=settings
Do the copy 3 times. Yes, you read that correctly. For whatever reason, doing yes | cp -Rf magento/* . sometimes does NOT copy all files on it's first try; and you get no error or indication that this happened. I had this happen to me at least during 2 different upgrades.
yes | cp -Rf magento/* .
yes | cp -Rf magento/* . 
yes | cp -Rf magento/* .
./mage mage-setup .
./mage sync --force
./mage install http://connect20.magentocommerce.com/community Mage_All_Latest --force
rm -rf var/cache/* var/session/* var/locks/* var/full_page_cache/* tmp/*
rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*  
chmod 755 mage 
php shell/indexer.php reindexall 
#upgrade everything including third party modules
./mage upgrade-all --force 
8. Set the proper file permissions
mkdir -p var/package; mkdir -p var/cache; mkdir -p media/; mkdir -p var/locks; mkdir -p var/report; mkdir -p var/export;
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 777 {} \;
 
chmod 755 mage 
chmod o+w var var/.htaccess app/etc
chmod -R o+w media
chmod -R 777 var/package var/locks var/report var/export downloader
 
# or do the above on a single line
mkdir -p var/package; mkdir -p media/; mkdir -p var/cache; mkdir -p var/locks; mkdir -p var/report; mkdir -p var/session; mkdir -p var/log; mkdir -p var/export; find . -type f -exec chmod 644 {} \;; find . -type d -exec chmod 777 {} \;; chmod 755 mage; chmod -R 777 var/cache; chmod -R 777 var/log; chmod -R 777 var/session; chmod a+x cron.sh; chmod o+w var var/.htaccess app/etc; chmod -R o+w media; chmod -R 777 var/package var/locks var/report var/export downloader media;
 
# replace USER with whatever is the username of the account you're working under
chown -R USER:USER *
 
yes | cp -Rf magento/* . ;yes | cp -Rf magento/* . ;yes | cp -Rf magento/* .
9. Visit the home page of your upgraded site. This will trigger the magento upgrade process.
This can take anywhere from 2-30minutes, so be patient. You'll also likely get a browser error before the upgrade is done--don't worry about it, it's normal, and keep waiting...
Run top and watch mysql process until it stops using up high cpu usage--once it does, you'll know the database upgrade is done.
top
If everything goes well, you should NOT see any errors. If you do see the troubleshoot secion below.

Tidy up the upgrade

Apply Magento 1.9.2.0 patch SUPEE-4829

This patch fixes an issue in which product images become larger when a shopper selects a swatch on a search result page. - Added Nov 26, 2014
Note: This patch is applicable only to Magento Community Edition 1.9.1
wget http://www.magentocommerce.com/downloads/assets/ce_patches/PATCH_SUPEE-4829_EE_1.14.1.0_v1.sh
sh PATCH_SUPEE-4829_EE_1.14.1.0_v1.sh
 
As of Magento 1.8.1 you're going to get a google checkout error in the /admin section. Here is the official Magento fix:
Delete all files except config.xml from the following directory:
rm -rf app/code/core/Mage/GoogleCheckout/etc/adminhtml.xml && rm -rf app/code/core/Mage/GoogleCheckout/etc/system.xml && rm -rf app/code/core/Mage/GoogleCheckout/etc/wsdl.xml && rm -rf app/code/core/Mage/GoogleCheckout/etc/wsi.xml
 
rm -rf var/cache/* var/session/* var/locks/* var/full_page_cache/* tmp/* && rm -rf downloader/pearlib/cache/* downloader/pearlib/download/* && service httpd restart && service memcached restart 
11. Login to the magento admin section and mage sure the version number reflects the version you just upgraded to: https://YOURSITE.com/admin(link is external)
12. Change back your .htaccess to original value
cp .htaccess-new .htaccess
13. You'll probably want to use a file comparison program to see the difference in template files
  • download the latest version from magento connect if possible
  • if not possible and you made your own template, then the best thing to do is to DELETE all the unecessary custom template files from your custom template directory, and only keep the crucial ones.
  • Following use something like Beyond Compare and file compare between the /base/default app/design/frontend/base/default and/app/design/frontend/default/CUSTOM
14. Fix magento URLs
In the admin interface admin/system_config/edit/section/catalog/ set the following under Search Engine Optimization:
  • Autogenerated Site Map: enable
  • Popular Search Terms: enable
  • Product URL Suffix: blank
  • Category URL Suffix: blank
  • Use Categories Path for Product URLs: yes # or no depends on who you ask
  • Create Permanent Redirect for old URLs if Url key changed: yes
  • Page Title Separator: -
  • Use Canonical Link Meta Tag For Categories : yes
  • Use Canonical Link Meta Tag For Products: yes
Now re-index your url rewrite data in admin/process/list/: Catalog URL Rewrites
Or in SSH:
php shell/indexer.php reindexall

Troubleshooting

Now...
If something went wrong (and it probably did) you have several options.

If a non-release version is showing then mage installer grabbed the release candidate stuff instead.

The fix: Go back to Do the Upgrade and restart from there.

The site just hangs after upgrade (keeps loading for minutes on end):

Be patient, use
top
in SSH and wait for mysql high CPU usage to go down

PHP Fatal error: Call to a member function toHtml()

edit app/design/frontend/default/YOURTHEME/layout/page.xml
or edit app/design/frontend/default/default/layout/page.xml
Change from
<block output="toHtml" type="core/profiler">
</block>
to:
<block name="core_profiler" output="toHtml" type="core/profiler">
</block>

Cannot login to magento

edit app/code/core/Mage/Core/Model/Session/Abstract/Varien.php and comment out the following:
<?php/* 
$cookieParams = array( 
\'lifetime\' => $cookie->getLifetime(), 
\'path\' => $cookie->getPath(), 
\'domain\' => $cookie->getConfigDomain(), 
\'secure\' => $cookie->isSecure(), 
\'httponly\' => $cookie->getHttponly() 
);
if (!$cookieParams[\'httponly\']) { 
unset($cookieParams[\'httponly\']); 
if (!$cookieParams[\'secure\']) { 
unset($cookieParams[\'secure\']); 
if (!$cookieParams[\'domain\']) { 
unset($cookieParams[\'domain\']); 


}
if (isset($cookieParams[\'domain\'])) { 
$cookieParams[\'domain\'] = $cookie->getDomain(); 
}
call_user_func_array(\'session_set_cookie_params\', $cookieParams);
if (!empty($sessionName)) { 
$this->setSessionName($sessionName); 

*/ 
?>

Cannot add or update a child row: a foreign key constraint fails: googleshopping_setup

The only remedy I was able to find for my case when upgrading from magento 1.3.2 to 1.6.0 was i needed to do upgrade to magento 1.6.1-rc1.
./mage upgrade-all --force 

Cannot add products to cart at DEV/TESTING URL/Domain

This is caused by a mismatch of the development URL with what is set in your database under 'core_config_data' for 'web/cookie/cookie_domain'. Use phpMyAdmin and change the domain name to whatever you are using under your DEV url
Go to table:
core_config_data
Change the value to your dev url in:
web/cookie/cookie_domain

Blank screen or PHP Fatal error: Class 'Magento_Db_Adapter_Pdo_Mysql' not found at /admin

One cause of this that I ran into was the server's PHP or memcached caching. Solution: flush all magento caches and restart the apache and memcached.
rm -rf var/cache/* var/session/* var/locks/* var/full_page_cache/* tmp/*
rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*
service httpd restart
service memcached restart
 
or
 
rm -rf var/cache/* var/session/* var/locks/* var/full_page_cache/* tmp/* && rm -rf downloader/pearlib/cache/* downloader/pearlib/download/* && service httpd restart && service memcached restart 
 
 
Another strange reason was due to 'skin/adminhtml/default/default' not containing all files.
yes | cp -Rf magento/* .
yes | cp -Rf magento/* . 
yes | cp -Rf magento/* .
# yes 3x times; see above.

Fresh start: in case something went terribly wrong

Go into phpmyadmin and drop all the tables so your database is empty (you'll get errors in phpmyadmin about foreign keys; that's normal, just repeat till all tables are gone) (i prefer this over the SSH method, cause it's too easy to drop the wrong database by accident)
However, there's a good chance phpMyAdmin may run out of resources when doing this, so you may want to checkout this post instead: Drop all tables in MySQL via SSH
Now re-dump your database backup
mysql -u user -p DB_NAME < DB-NAME.sql
and copy over a fresh version of magento over your current install
yes | cp -Rf magento/* .
yes | cp -Rf magento/* . 
yes | cp -Rf magento/* .
# yes 3x times; see above.
 
 
rm -rf var/cache/* var/session/* var/locks/* var/full_page_cache/* tmp/*
rm -rf downloader/pearlib/cache/* downloader/pearlib/download/*
service httpd restart
service memcached restart
 
or
 
rm -rf var/cache/* var/session/* var/locks/* var/full_page_cache/* tmp/* && rm -rf downloader/pearlib/cache/* downloader/pearlib/download/* && service httpd restart && service memcached restart 
Visit your site again...

Bonus: Install Google Base (shopping) vis SSH

./mage install http://connect20.magentocommerce.com/community Mage_GoogleShopping --force
To uninstall an extension:
./mage uninstall http://connect20.magentocommerce.com/community Mage_GoogleShopping --force
If you get a permissions error trying to run './mage'
-bash: ./mage: Permission denied
easy fix:
chmod 750 ./mage
Look here for a complete listing of required Google Base attributes for different product categories: http://www.google.com/support/merchants/bin/answer.py?answer=1344057(link is external)
An interesting thing happened when I downgraded from PHP 5.4 to 5.3, I got the following error message "could not determine temp directory ..." Solution: make sure your php.ini has the following in it:
safe_mode = off

Google checkout error after upgrade to Magento 1.8.1.0

Delete all files except config.xml from the following directory:
rm -rf app/code/core/Mage/GoogleCheckout/etc/adminhtml.xml && rm -rf app/code/core/Mage/GoogleCheckout/etc/system.xml && rm -rf app/code/core/Mage/GoogleCheckout/etc/wsdl.xml && rm -rf app/code/core/Mage/GoogleCheckout/etc/wsi.xml
 
rm -rf var/cache/* var/session/* var/locks/* var/full_page_cache/* tmp/* && rm -rf downloader/pearlib/cache/* downloader/pearlib/download/* && service httpd restart && service memcached restart