Magento 1.7.0.2 Upgrade (From 1.6.2) - php

I have recently caught wind of the inherent Zend problem that Magento is built upon. I took that initiative to upgrade my sites from 1.6.2 to the newest 1.7.0.2 to resolve that problem. All my sites upgraded beautifully except 1. All the files are up to date on the server now, but when I try to access my site and it runs the upgrades, I get the below report saved in my reports folder without access to my site.
a:5:{i:0;s:216:"Error in file: "/home/xxxxx/public_html/app/code/core/Mage/Sales/data/sales_setup/data-upgrade-1.6.0.4-1.6.0.5.php" - SQLSTATE[42S22]: Column not found: 1054 Unknown column 'main.base_tax_refunded' in 'field list'";i:1;s:883:"#0 /home/xxxxx/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /home/xxxxxx/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(407): Mage_Core_Model_Resource_Setup->_modifyResourceDb('data-upgrade', '1.6.0.4', '1.6.0.7')
#2 /home/xxxxxx/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(286): Mage_Core_Model_Resource_Setup->_upgradeData('1.6.0.4', '1.6.0.7')
#3 /home/xxxxxx/public_html/app/code/core/Mage/Core/Model/Resource/Setup.php(269): Mage_Core_Model_Resource_Setup->applyDataUpdates()
#4 /home/xxxxxx/public_html/app/code/core/Mage/Core/Model/App.php(351): Mage_Core_Model_Resource_Setup::applyAllDataUpdates()
#5 /home/xxxxxx/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
#6 /home/xxxxxx/public_html/index.php(87): Mage::run('', 'store')
#7 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}
Or if I try to upgraded via the downloader I get:
Exception during cache and session cleaning: Error in file: "/home/xxxxxx/public_html/app/code/core/Mage/Sales/data/sales_setup/data-upgrade-1.6.0.4-1.6.0.5.php" - SQLSTATE[42S22]: Column not found: 1054 Unknown column 'main.base_tax_refunded' in 'field list'
This is a problem I have yet to run into with my many moons of administering magento. Lookin into the code for that php, everything seems standard, and matches the other sites i have installed the upgrade on.
Anyone run into such an issue?

Ben, I've upgraded four Magento stores now to 1.7.0.2 from 1.5.1.0 and 1.6.2.0. Not exactly the same problem, but two had some form of missing table (one was a captcha_log, the other was sales_order_tax_item. Once I created the 'missing' table each installation was fine. Not sure why they were or went missing. Might you just add the missing column or replace the table with a correct version? base_tax_refunded is in the sales_flat_order table.

My problem is solved.
Turns out my index.php file was set to 666. Ran a chmod to change it to 755 and all is well again!

I've had the same problem but the field was in my main orders table and changing permissions of files had no effect, so eventually after looking at the files that was given the errors more closely (i.e. data-upgrade-1.6.0.4-1.6.0.5.php) I added following columns to the following tables and at last I can get back into my admin panel.
Columns Added: base_tax_refunded,discount_refunded,base_discount_refunded
to Tables: sale_flat_creditmemo,sales_flat_creditmemo_item,sales_flat_order_item
Surely this kind of thing would be done automatically by the upgrade scripts? unless I missed some step...

Related

XAMPP and Magento - Need to change ports?

Today I tried to access localhost/magento and the page would not load. Then, I just tried using localhost/phpmyadmin and the same thing. I read somewhere that the default port could be in use and cause this issue, so I changed the listener to 100 and localhost:100/phpmyadmin worked. Now, Magento gets an error every time I try to access it.
I've tried changing the web/unsecure/base_url and web/secure/base_url tables to http://localhost:100/magento/ and manually deleting my var/cache folder contents... still no luck.
Is there something I'm missing or an extra step I need to do with magento?
By the way I have it installed on XAMPP with windows 7 64-bit. Everything was working fine the day before.
edit: error codes
Module "Practice_OneStepCheckout" requires module "Mage_CatalogInventorty".
Trace:
#0 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Config.php(849): Mage::throwException('Module "Practic...')
#1 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Config.php(812): Mage_Core_Model_Config->_sortModuleDepends(Array)
#2 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\Config.php(315): Mage_Core_Model_Config->_loadDeclaredModules()
#3 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\App.php(414): Mage_Core_Model_Config->loadModules()
#4 C:\xampp\htdocs\magento\app\code\core\Mage\Core\Model\App.php(343): Mage_Core_Model_App->_initModules()
#5 C:\xampp\htdocs\magento\app\Mage.php(684): Mage_Core_Model_App->run(Array)
#6 C:\xampp\htdocs\magento\index.php(87): Mage::run('', 'store')
#7 {main}
Thanks in advance for your help!
Is there something I'm missing or an extra step I need to do with magento?
Nope, it should work out of the box. What is the error you get?
I can recommend to use vhosts, that wil save you allot of time in the future: http://butlerccwebdev.net/support/testingserver/vhosts-setup-win.html
(Also, the most common port 80 issue under windows/xampp users is TeamViewer)

Error processing your request: SQLSTATE[42S01]: Base table or view already exists: in magento 1.9

I have installed magento 1.9 CE on my local server and it was working fine. Suddenly it stopped working and shows error like
There has been an Error processing your request.
When I check error report from report folder then I got logs like
a:5:{i:0;s:219:"Error in file: "C:\wamp\www\anzonline\app\code\core\Mage\XmlConnect\sql\xmlconnect_setup\upgrade-1.6.0.0-1.6.0.0.1.php" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'xmlconnect_images' already exists";i:1;s:950:"
#0 C:\wamp\www\anzonline\app\code\core\Mage\Core\Model\Resource\Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 C:\wamp\www\anzonline\app\code\core\Mage\Core\Model\Resource\Setup.php(437): Mage_Core_Model_Resource_Setup->_modifyResourceDb('upgrade', '1.6.0.0', '1.6.0.0.1')
#2 C:\wamp\www\anzonline\app\code\core\Mage\Core\Model\Resource\Setup.php(320): Mage_Core_Model_Resource_Setup->_upgradeResourceDb('1.6.0.0', '1.6.0.0.1')
#3 C:\wamp\www\anzonline\app\code\core\Mage\Core\Model\Resource\Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 C:\wamp\www\anzonline\app\code\core\Mage\Core\Model\App.php(417): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 C:\wamp\www\anzonline\app\code\core\Mage\Core\Model\App.php(343): Mage_Core_Model_App->_initModules()
#6 C:\wamp\www\anzonline\app\Mage.php(684): Mage_Core_Model_App->run(Array)
#7 C:\wamp\www\anzonline\index.php(87): Mage::run('', 'store')
#8 {main}";s:3:"url";s:11:"/anzonline/";s:11:"script_name";s:20:"/anzonline/index.php";s:4:"skin";s:7:"default";}
I have found several solutions from Google but none of those worked out for me example.
The error message is telling you that Magento tries to create a table which already exists. This takes place in an upgrade script and was probably caused by an incomplete previous run of said upgrade script. Magento executes upgrade scripts, but only marks them done when they complete without error. Even an incompletely run script can have created tables, though, and next time Magento tries to run that update script the exstance of those tables cause a problem.
So you can either do some Database work and do some tweeking like removing the tables in question (with saving the data if needed), or you redo your Magento Installation.
This can also be caused by recently installed extensions, if so uninstalling them with the Connect Manager and reinstalling them might work.
Use
DROP TABLE IF EXISTS xmlconnect_images;
then, refresh your brownser. It works for me.
You can clear cache if you dont see any changes:
To clear the cache, simply delete everything from the /var/cache directory and then reload your website in your browser.
rm -rf magento/var/cache/*
To clear all sessions, you can also delete everything from the /var/session folder within your Magento installation directory.
rm -rf magento/var/session/*

CakePHP: Error trying to generate a schema

I'm trying to start using CakePHP schema: app/Console/cake schema generate
I get the following error:
Welcome to CakePHP v2.3.0 Console
---------------------------------------------------------------
App : app
Path: /Applications/MAMP/htdocs/mysite/app/
---------------------------------------------------------------
Cake Schema Shell
---------------------------------------------------------------
Error: Database connection "Mysql" is missing, or could not be created.
This is confusing because the site is running fine, so the DB credentials in Config/database.php are correct.
Update:
Because I'm using MAMP, I added the following to my Config/database.php in the $defualt array:
'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock',
Now I don't get the original error, but rather some new ones:
Welcome to CakePHP v2.3.0 Console
---------------------------------------------------------------
App : app
Path: /Applications/MAMP/htdocs/mysite/app/
---------------------------------------------------------------
Cake Schema Shell
---------------------------------------------------------------
Generating Schema...
Notice Error: Schema generation error: invalid column type enum('normal','unlimited_time','admin','extra_time') for Attempt.type does not exist in DBO in [/Applications/MAMP/htdocs/mysite/lib/Cake/Model/CakeSchema.php, line 616]
Notice Error: Schema generation error: invalid column type enum('in_progress','complete','canceled') for Attempt.status does not exist in DBO in [/Applications/MAMP/htdocs/mysite/lib/Cake/Model/CakeSchema.php, line 616]
Notice Error: Schema generation error: invalid column type enum('MC','FI','CS','CQ','TF') for AttemptedQuestion.type does not exist in DBO in [/Applications/MAMP/htdocs/mysite/lib/Cake/Model/CakeSchema.php, line 616]
Notice Error: Schema generation error: invalid column type enum('1','2','3') for Category.category_order does not exist in DBO in [/Applications/MAMP/htdocs/mysite/lib/Cake/Model/CakeSchema.php, line 616]
Error: Table choices for model Choice was not found in datasource default.
#0 /Applications/MAMP/htdocs/mysite/lib/Cake/Model/Model.php(3217): Model->setSource('choices')
#1 /Applications/MAMP/htdocs/mysite/lib/Cake/Model/CakeSchema.php(260): Model->getDataSource()
#2 /Applications/MAMP/htdocs/mysite/lib/Cake/Console/Command/SchemaShell.php(149): CakeSchema->read(Array)
#3 /Applications/MAMP/htdocs/mysite/lib/Cake/Console/Shell.php(388): SchemaShell->generate()
#4 /Applications/MAMP/htdocs/mysite/lib/Cake/Console/ShellDispatcher.php(199): Shell->runCommand('generate', Array)
#5 /Applications/MAMP/htdocs/mysite/lib/Cake/Console/ShellDispatcher.php(67): ShellDispatcher->dispatch()
#6 /Applications/MAMP/htdocs/mysite/app/Console/cake.php(33): ShellDispatcher::run(Array)
#7 {main}
Looks like CakePHP is freaking out about the ENUM fields.
As described pretty definitively here...
Cakephp + enum support : unable to save or select enum 0 and 1
...CakePHP does not like ENUM fields. It looks like the Console tools related to the schema are going to work with them there.
Old question, I know. But I just fixed this issue yesterday while working in a really old project of mine.
If you still need this kind of solution, I posted on this git public repository.
https://github.com/matheuscmpm/cakephp-schema-enum
You basicly need to alter the Datasource/Database/Mysql.php file to insert the ENUM as an accepted type and them alter the Model/CakeSchema.php to handle them.
If you don't want to alter your cakephp 2.x files, you can copy them to your project app folder, just like I did. In this README.md file, you can see what exactly I changed in this both files, you can replicate the same solution to handle SET type fields as well.
I just did that to work with MySQL, so with you need to another database, you will also need to change a couple things in others datasource/database files.
Cheers.

Magento wants to reinstall after migration

In the last days I moved a Magento installation over a new staging server and a new production server. Everything went well on the production server, where the site is back againg, but I'm not able to make it work on the staging server... It keeps saying that the table "admin_assert" is already present (mysql error) and the error comes from the install script... but I don't want another install.
How's it possible that magento is trying to perform an installation over another preconfigured base?
I moved the whole base (source code), without performing a clean install, then I dumped the DB and changed the base urls.
Do you have any idea?
FYI this is the whole error log:
a:5:{i:0;s:193:"Error in file: "/home/lex/code/mycommerce/app/code/core/Mage/Admin/sql/admin_setup/install-1.6.0.0.php" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'admin_assert' already exists";i:1;s:920:"#0 /home/lex/code/mycommerce/app/code/core/Mage/Core/Model/Resource/Setup.php(645): Mage::exception('Mage_Core', 'Error in file: ...')
#1 /home/lex/code/mycommerce/app/code/core/Mage/Core/Model/Resource/Setup.php(421): Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '1.6.1.0')
#2 /home/lex/code/mycommerce/app/code/core/Mage/Core/Model/Resource/Setup.php(327): Mage_Core_Model_Resource_Setup->_installResourceDb('1.6.1.0')
#3 /home/lex/code/mycommerce/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates()
#4 /home/lex/code/mycommerce/app/code/core/Mage/Core/Model/App.php(412): Mage_Core_Model_Resource_Setup::applyAllUpdates()
#5 /home/lex/code/mycommerce/app/code/core/Mage/Core/Model/App.php(338): Mage_Core_Model_App->_initModules()
#6 /home/lex/code/mycommerce/app/Mage.php(640): Mage_Core_Model_App->run(Array)
#7 /home/lex/code/mycommerce/index.php(90): Mage::run('', 'store')
#8 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}
Not a big deal. You will find many more errors like this.
The error simple says your DB already has table name admin_assert.
You can ignore this by opening the install script and comment out the code which tries to re-create the table, and refresh the magento again.
Once everything is set up properly, don't forget to uncomment the commented create table script.
I ran into this issue as well with a rather large database and it turned out that PHPMyAdmin was unable to export the entire thing at the same time, so my data was incomplete. The solution in my case was to export tables in batches instead of all at once, and then import them in the same way.
tl;dr
Make sure that your databases match

What's wrong with this Magento install

When I installed the Magento program on my local environment, after finishing the install, I accessed the URL http://localhost/job/magento/ and it shows the following error.
There has been an error processing your request
Illegal scheme supplied, only alphanumeric characters are permitted
Trace:
#0 D:\www\job\magento\app\code\core\Mage\Core\Model\Store.php(712): Zend_Uri::factory('{{base_url}}')
#1 D:\www\job\magento\app\code\core\Mage\Core\Controller\Varien\Front.php(313): Mage_Core_Model_Store->isCurrentlySecure()
#2 D:\www\job\magento\app\code\core\Mage\Core\Controller\Varien\Front.php(161): Mage_Core_Controller_Varien_Front->_checkBaseUrl(Object(Mage_Core_Controller_Request_Http))
#3 D:\www\job\magento\app\code\core\Mage\Core\Model\App.php(349): Mage_Core_Controller_Varien_Front->dispatch()
#4 D:\www\job\magento\app\Mage.php(640): Mage_Core_Model_App->run(Array)
#5 D:\www\job\magento\index.php(80): Mage::run('', 'store')
#6 {ma
How to correct it? Thank you!
Please install magento with localhost Ip Address 127.0.0.1
Ex: http://127.0.0.1/job/magento/
Try loading https://localhost/magento.
Note the https instead of http.
Solved this problem by checking the third checkbox ("Skip Base URL validation before next step") in the first screen after the agreement.
I installed under a FQD on a LAMP server.
I fixed this problem changing the directory permission to 755, as it's said on installation guide
http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/magento_installation_guide
Solved this problem by checking the third checkbox ("Skip Base URL validation before next step") in the first screen after the agreement.
and using firefox
when i use chrome , i meet issue after installing.
i don't know why
Try this it will definitely helps you... https://127.0.0.1/magento/
You can try to change base_url variable directly from the database.
Use phpmyadmin or any other software to go to your magento database.
In "core_config_data" table find entry for web/unsecure/base_url and change it to either "{{base_url}}" or http://127.0.0.1
Do the same for web/secure/base_url
Have same problem on Wamp and XAMPP., nearly give up.
Finally find the solution, Magento 1.6 can not work properly with WAMP 2.1 and XMAPP 1.7, I guess it caused by Mysql version, not sure.
but after I change WAMP to 2.0 i, everything is fine. Magento 1.6 is running well.
Download WAMP2.0i : http://sourceforge.net/projects/wampserver/files/WampServer%202/WampServer%202.0/WampServer2.0i.exe/download
I failed to install on Chrome, but success on firefox.
Good Luck.
This usually happens to me when I install magento sample data after installing magneto, you should do it other way around (same data wipes out core_config_data table).
from http://www.magentocommerce.com/download:
sample data - Must be installed prior to the basic Magento Installation.
When you install 'configure' step of magento installation, you MUST use 'http://127.0.0.1/magento/' at base url textbox, instead of 'http://localhost/magento' do this.
Good Luck.
There has been an error processing your request SQLSTATE[28000] [1045] Access denied for user \\\’demo\\\’#\\\’localhost\\\’ (using password: YES)
This error will occur if there is no database connection .. First you need to check your local.xml file ... then check the url path in core_config_data in your database .... clear your cache session and locks .... if the error still appear after doing all these things \\"YOU JUST LOOK IN YOUR app/etc folder ...... if there is any extra xml file just delete that particular file ...... i got the same issue .. found a local_org.xml file in etc folder ....... JUST DELETE THAT FILE IT WILL WORK PROPERLY .......... grin

Categories