Magneto Fatal Error in Admin

Hi
I downloaded and reupped my site to a new server and changed the details to the new server the site comes up, but in the admin it says cannot use Base_url please change in config.

So I try to change it and I get an error

Fatal error: Call to a member function update() on a non-object in /home/one23gla/public_html/app/code/core/Mage/Admin/Model/Mysql4/User.php on line 286

Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 131: parser error : xmlParseEntityRef: no name in /home/one23gla/public_html/lib/Varien/Simplexml/Config.php on line 510
Trace:
#0 /home/one23gla/public_html/lib/Varien/Simplexml/Config.php(510): mageCoreErrorHandler(2, ‘simplexml_load_...’, ‘/home/one23gla/...’, 510, Array)
#1 /home/one23gla/public_html/lib/Varien/Simplexml/Config.php(498): Varien_Simplexml_Config->loadString(’loadFile(’loadModulesConfiguration(’/home/one23gla/...’)
#4 /home/one23gla/public_html/app/code/core/Mage/Core/Model/Config.php(289): Mage_Core_Model_Config->init(’config.xml’, Object(Mage_Core_Model_Config))
#5 /home/one23gla/public_html/app/code/core/Mage/Core/Model/Config.php(491): Mage_Core_Model_Config->reinit(Array)
#6 /home/one23gla/public_html/app/code/core/Mage/Core/Model/App.php(1088): Mage_Core_Model_Config->cleanCache()
#7 /home/one23gla/public_html/app/code/core/Mage/Adminhtml/controllers/System/CacheController.php(76): Mage_Core_Model_App->cleanCache()
#8 /home/one23gla/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(376): Mage_Adminhtml_System_CacheController->saveAction()
#9 /home/one23gla/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(248): Mage_Core_Controller_Varien_Action->dispatch()
#10 /home/one23gla/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(158): Mage_Core_Controller_Varien_Router_Standard->match(’save’)
#11 /home/one23gla/public_html/app/Mage.php(459): Mage_Core_Controller_Varien_Front->dispatch(Object(Mage_Core_Controller_Request_Http))
#12 /home/one23gla/public_html/index.php(65): Mage::run()
#13 {main}

Please help me with this, I am in really bad poo poo :’(

Fatal error: Call to a member function update() on a non-object in /home/one23gla/public_html/app/code/core/Mage/Admin/Model/Mysql4/User.php on line 286
LVL 4
cataleptic_stateAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

miked2004Commented:
What I would do is this.

1. Delete all files in "/var/cache" and "/var/session".
2. login to the database using phpmyadmin or what ever your host provides, and go to the core_config_data table. Make sure every instance of "web/unsecure/base_url" and "web/secure/base_url" have the correct url.
3. This error seems like it is a problem parsing the config xml files. Have you edited any of the config or layout xml files? Have you recently installed any modules or upgraded any modules?

What version of Magento are you using?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cataleptic_stateAuthor Commented:
hi miked2004,
I cant remeber what version it was but it was the last 2009 release from december.
I have not modified anything, I am just trying to upload everything i have from the other server.

My base_url when I login to the admin area shows the details from the old server.
I have changed these and thats when that error occurs.

I have not messed with the config xml file only to include the database connection.

I did notice that the password element/node was <password /> somehow I think it didnt transfer properly.

Anyway I corrected it and the database connection works fine.

I will do what you suggested. At the moment I am reuploading the files as I do not think they transfered properly.

I will keep you posted.

Thanks again for your message
0
cataleptic_stateAuthor Commented:
Ok I am now getting this:

Warning: simplexml_load_string() [function.simplexml-load-string]: Entity: line 131: parser error : xmlParseEntityRef: no name  in /home/one23gla/public_html/lib/Varien/Simplexml/Config.php on line 510
Trace:
#0 /home/one23gla/public_html/lib/Varien/Simplexml/Config.php(510): mageCoreErrorHandler(2, 'simplexml_load_...', '/home/one23gla/...', 510, Array)
#1 /home/one23gla/public_html/lib/Varien/Simplexml/Config.php(498): Varien_Simplexml_Config->loadString('loadFile('loadModulesConfiguration('/home/one23gla/...')
#4 /home/one23gla/public_html/app/code/core/Mage/Core/Model/App.php(263): Mage_Core_Model_Config->init('config.xml', Object(Mage_Core_Model_Config))
#5 /home/one23gla/public_html/app/Mage.php(434): Mage_Core_Model_App->init(Array)
#6 /home/one23gla/public_html/app/Mage.php(455): Mage::app('', 'store', Array)
#7 /home/one23gla/public_html/index.php(65): Mage::run('', 'store', Array)
#8 {main}                
0
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

miked2004Commented:
Due to this line:
#1 /home/one23gla/public_html/lib/Varien/Simplexml/Config.php(498): Varien_Simplexml_Config->loadString('loadFile('loadModulesConfiguration('/home/one23gla/...')

I believe that there is an error in one of the modules config.xml files.
What&nbsp; i would do is :
Go to the line mentioned in the error data listed above and wrap it in a try catch statement and see if you can use the exception to get more information as to which module is throwing the error.
0
cataleptic_stateAuthor Commented:
try catch?

Im sorry, I am not so good with php mysql
0
miked2004Commented:
You can wrap the code with a try catch and get more debugging info. so in home/one23gla/public_html/lib/Varien/Simplexml/Config.php on line 510 is where the error was, you can add a try catch around it to get more debugging info. See code below. It will just catch the exception(error) thrown and display more data about it. It is a php thing, has nothing to do with mysql.

But as I said it looks like a module config file is the problem.

Just to go over a few things again:
1. Is the frontend of the site working? can customers see products, add them to there cart and then checkout?
2. Is the backend of the site working? can add new products and edit products?
3. If I remember correctly the only time you got this error is when you tried to save a config setting in the admin. Is that correct?
try{
//This would be the code on or arround line 510 that you wraped in  the try/catch.
}catch(Exception $e){
print_r($e); die("<<<" Here is the error message.);
}

Open in new window

0
cataleptic_stateAuthor Commented:
Hi,
This is the response:


Strict Standards: include() [function.include]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/one23gla/public_html/lib/Varien/Simplexml/Config.php on line 515

Parse error: syntax error, unexpected T_STRING in /home/one23gla/public_html/lib/Varien/Simplexml/Config.php on line 515

And I cannot access the site via the index page or admin

line 515 is "print_r($e); die("<<<" Here is the error message.);"
0
miked2004Commented:
To get more detail now, you can wrap line 515 is a try catch and see what it tells you. By doing the try/catch, we are trying to see what xml file is actually throwing the error.

I also thought of something else. Moving your database might be causing these problems.
How did you move your database from your development server to the production server?

1. How did you export your database? phpmyadmin or command line?
2. How did you import the database? phpmyadmin or command line?

When moving the Magento databases I have found that you need to export the database using mysqldrop (command line). Also you MUST import the database using mysql command line, other wise inconsistency in data can occur.
0
cataleptic_stateAuthor Commented:
ok, i did a mysql dump from phpmyadmin exporting everything.
I imported it via the import tab in phpmyadmin

I had it on another server that is online, and i moved it to a new hosting server.

Why will it cause problems when its the same information?

Also I could install a new copy of Magneto, but I have modified product attributes that took me too long to input in the first place.

Now is there a way I can just import the edited database table for the attributes? or does everything need to run off eachother?
0
cataleptic_stateAuthor Commented:
ok I did try on line 515

and this came up

Strict Standards: include() [function.include]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/one23gla/public_html/lib/Varien/Simplexml/Config.php  on line 519

Parse error: syntax error, unexpected T_STRING in /home/one23gla/public_html/lib/Varien/Simplexml/Config.php on line 519

this line is the prob
print_r($e); die("<<<" Here is the error message.);

its the same
0
miked2004Commented:
How did you migrate your database? see questions 1 and 2 in my previous post.
0
miked2004Commented:
Sorry didn't see your first reply.

You must import and export using command line otherwise Id's in the database get messed up.
I bet if you export and import using command line(SSH) this will fix the problem.
0
cataleptic_stateAuthor Commented:
hmm ok i will have a look at the server
what would the commands be to get it working?
0
miked2004Commented:
to export a database you need to login using ssh. Ask your host to provide this info. THen

1. mysqldump -u YourUserName -p YourDatabaseName > NameOfFileToDumpDatabaseTo.sql
2. then it will prompt you for the password to the database.
3. If you entered the correct db connection information you will have a sql file created for the database. Move this file to the new server and Import it.

To Import the file.
1. mysql -u YourUserName -p YourDatabaseName < NameOfFileToDumpDatabaseTo.sql
2. Hit enter and it will prompt for your password. If all database info is the same then your database will be imported.

Note: no the new server the database must exist. It can be empty, but must exist.
0
cataleptic_stateAuthor Commented:
Hi,
I do not have ssh enabled, it will take a few days to get it going. My host is limited.
0
miked2004Commented:
I would allways get ssh access to a server, Just ends up to be very helpfull.

You might try the Back built into Magento.

From the admin: System->Tools->backup.

This will create a file that should work with phpmyadmin.
So you would need to use the backup tool to create a database backup then it will create a backup in the "var" directory somewhere. use this file when importing into the new database using phpmyadmin. Be sure to drop all the tables on the new servers database be fore importing this file.

I never use this Magento Feature because command line is so much quicker.
0
cataleptic_stateAuthor Commented:
Thanks for all your help, i'll let you know whats happend.

I do not think I will be using this shopping cart script ever again.
0
miked2004Commented:
Its a great cart, but development needs to be left to a developer with knowledge of Zend Framework, MVC Design Pattern, and such.

Its not good for a end user to set up.
0
cataleptic_stateAuthor Commented:
Hi,
I used the backup in admin, seems to have worked without errors when importing.
But the same problem is coming up.

Strict Standards: include() [function.include]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Chicago' for 'CDT/-5.0/DST' instead in /home/one23gla/public_html/lib/Varien/Simplexml/Config.php  on line 516

Parse error: syntax error, unexpected T_STRING in /home/one23gla/public_html/lib/Varien/Simplexml/Config.php on line 516




Can I change the Timezone to UK GMT?
0
miked2004Commented:
1. Have you tried re uploading all files found in "/app/code/"?
2. Are you sure that your original site still works?
3. What type of os is on the server. (new and old server). are they both A Unix/Linux based Os?
0
cataleptic_stateAuthor Commented:
i did try to upload the app/code again the other day. I will try again with a fresh copy off the current server.
The orginal works as I can navigate both ends and even make changes and backups.
both are linux based
0
cataleptic_stateAuthor Commented:
Hi,
I reuploaded a fresh copy from the version thats working on my old testing server
I changed the password and username for the database in local.xml

and now I get this:

SQLSTATE[28000] [1045] Access denied for user 'web230'@'localhost' (using password: YES)
Trace:
#0 /home/one23gla/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(211): Zend_Db_Adapter_Pdo_Abstract->_connect()
#1 /home/one23gla/public_html/lib/Zend/Db/Adapter/Abstract.php(441): Varien_Db_Adapter_Pdo_Mysql->_connect()
#2 /home/one23gla/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(230): Zend_Db_Adapter_Abstract->query('SET NAMES utf8', Array)
#3 /home/one23gla/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(281): Zend_Db_Adapter_Pdo_Abstract->query('SET NAMES utf8', Array)
#4 /home/one23gla/public_html/app/code/core/Mage/Core/Model/Resource/Type/Db/Pdo/Mysql.php(45): Varien_Db_Adapter_Pdo_Mysql->query('SET NAMES utf8')
#5 /home/one23gla/public_html/app/code/core/Mage/Core/Model/Resource.php(87): Mage_Core_Model_Resource_Type_Db_Pdo_Mysql->getConnection(Object(Mage_Core_Model_Config_Element))
#6 /home/one23gla/public_html/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(255): Mage_Core_Model_Resource->getConnection('core_read')
#7 /home/one23gla/public_html/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(270): Mage_Core_Model_Mysql4_Abstract->_getConnection('read')
#8 /home/one23gla/public_html/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(290): Mage_Core_Model_Mysql4_Abstract->_getReadAdapter()
#9 /home/one23gla/public_html/app/code/core/Mage/Core/Model/Mysql4/Collection/Abstract.php(68): Mage_Core_Model_Mysql4_Abstract->getReadConnection()
#10 /home/one23gla/public_html/app/code/core/Mage/Core/Model/Config.php(1086): Mage_Core_Model_Mysql4_Collection_Abstract->__construct(Object(Mage_Core_Model_Mysql4_Website))
#11 /home/one23gla/public_html/app/code/core/Mage/Core/Model/Config.php(1119): Mage_Core_Model_Config->getModelInstance('core_mysql4/web...', Object(Mage_Core_Model_Mysql4_Website))
#12 /home/one23gla/public_html/app/Mage.php(347): Mage_Core_Model_Config->getResourceModelInstance('core/website_co...', Object(Mage_Core_Model_Mysql4_Website))
#13 /home/one23gla/public_html/app/code/core/Mage/Core/Model/Abstract.php(200): Mage::getResourceModel('core/website_co...', Object(Mage_Core_Model_Mysql4_Website))
#14 /home/one23gla/public_html/app/code/core/Mage/Core/Model/Abstract.php(205): Mage_Core_Model_Abstract->getResourceCollection()
#15 /home/one23gla/public_html/app/code/core/Mage/Core/Model/App.php(405): Mage_Core_Model_Abstract->getCollection()
#16 /home/one23gla/public_html/app/code/core/Mage/Core/Model/App.php(268): Mage_Core_Model_App->_initStores()
#17 /home/one23gla/public_html/app/Mage.php(434): Mage_Core_Model_App->init('', 'store', Array)
#18 /home/one23gla/public_html/app/Mage.php(455): Mage::app('', 'store', Array)
#19 /home/one23gla/public_html/index.php(65): Mage::run()
#20 {main}                


I have changed the username but this still comes up: web230@localhost
0
miked2004Commented:
clear the "/var/cache" and "var/session" folders
0
cataleptic_stateAuthor Commented:
Still same problem
0
miked2004Commented:
You need to double check your "/app/etc/local.xml" file. Make sure the change is taking effect.
0
cataleptic_stateAuthor Commented:
Hi,
I checked it and its fine.

http://www.magentocommerce.com/boards/viewthread/8954/

says to delete a file in the folder that helped as the correct user@localhost is being seen now
but the problem is still there
0
cataleptic_stateAuthor Commented:
Hi,
I have the front page working, but I cannot get into admin
I get 404

Not Found

The requested URL /admin was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
0
cataleptic_stateAuthor Commented:
Hi,
I have figured out admin

I have to use:
index.php/admin

Something was wrong with the .htaccess file when i originally uploaded it. So I deleted the htaccess file from the route directory as it was giving Error code 500.
0
miked2004Commented:
in the local.xml file you set the admin url. is it set to "admin" in the local.xml file?
check in "/var/report" and see if there are any error logs with information related to this issue.
0
miked2004Commented:
ah
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.