I have transfer the magento site to another server. Fist of all I have installed fresh magento and upload the all files and folder. I have updated database as well. Previously the error was different. But I have searched in the web and fount some solution (http://www.magentocommerce.com/boards/viewthread/71051/) and now the error coming like this.
I have already uploaded lib/Varien/SimpleXML folder of magento 17.
Can't retrieve entity config: core/store_group
Trace:
/homepages/20/d317798792/htdocs/imedicia/site/app/code/core/Mage/Core/Model/Resource.php(140): Mage::throwException('Can't retrieve ...')
/homepages/20/d317798792/htdocs/imedicia/site/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(228): Mage_Core_Model_Resource->getTableName('core/store_grou...')
/homepages/20/d317798792/htdocs/imedicia/site/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(211): Mage_Core_Model_Mysql4_Abstract->getTable('store_group')
/homepages/20/d317798792/htdocs/imedicia/site/app/code/core/Mage/Core/Model/Mysql4/Collection/Abstract.php(83): Mage_Core_Model_Mysql4_Abstract->getMainTable()
/homepages/20/d317798792/htdocs/imedicia/site/app/code/core/Mage/Core/Model/Mysql4/Collection/Abstract.php(69): Mage_Core_Model_Mysql4_Collection_Abstract->_initSelect()
/homepages/20/d317798792/htdocs/imedicia/site/app/code/core/Mage/Core/Model/Config.php(790): Mage_Core_Model_Mysql4_Collection_Abstract->__construct(Object(Mage_Core_Model_Mysql4_Store_Group))
/homepages/20/d317798792/htdocs/imedicia/site/app/code/core/Mage/Core/Model/Config.php(832): Mage_Core_Model_Config->getModelInstance('core_mysql4/sto...', Object(Mage_Core_Model_Mysql4_Store_Group))
/homepages/20/d317798792/htdocs/imedicia/site/app/Mage.php(345): Mage_Core_Model_Config->getResourceModelInstance('core/store_grou...', Object(Mage_Core_Model_Mysql4_Store_Group))
/homepages/20/d317798792/htdocs/imedicia/site/app/code/core/Mage/Core/Model/Abstract.php(200): Mage::getResourceModel('core/store_grou...', Object(Mage_Core_Model_Mysql4_Store_Group))
/homepages/20/d317798792/htdocs/imedicia/site/app/code/core/Mage/Core/Model/Abstract.php(205): Mage_Core_Model_Abstract->getResourceCollection()
/homepages/20/d317798792/htdocs/imedicia/site/app/code/core/Mage/Core/Model/App.php(373): Mage_Core_Model_Abstract->getCollection()
/homepages/20/d317798792/htdocs/imedicia/site/app/code/core/Mage/Core/Model/App.php(244): Mage_Core_Model_App->_initStores()
/homepages/20/d317798792/htdocs/imedicia/site/app/Mage.php(427): Mage_Core_Model_App->init('', 'store', Array)
/homepages/20/d317798792/htdocs/imedicia/site/app/Mage.php(446): Mage::app('', 'store', Array)
/homepages/20/d317798792/htdocs/imedicia/site/index.php(52): Mage::run()
{main}
Check core_store_group table, and also for files.
May be files are missing.
Flush cache.
This is definitely an issue with the app/etc/local.xml and app/etc/config.xml
Try replacing these files with some other running version of same app
This has done the trick for me every time I setup my new machine
I hope this would be helpful for others
I encountered this issue when deploying Magento 1.9.3.10 to a store that was previously running 1.9.3.9.
In the process, I was also replacing the Inchoo PHP7 compatibility module with the "official" Magento-core-team provided patch.
When I deployed the code update, I began getting an exception message on every page. The exception was Can't retrieve entity config: core/store_group (same as the OP).
In my case, the solution was to manually delete all redis keys for that store using redis-cli. Trying to clear the cache with Magento's CLI tool did NOT work (probably the cache was too corrupted).
After clearing redis, the store came back online and worked properly, so if you encounter this error, I recommend clearing your cache without relying on Magento tools.
If you use filesystem cache, that means rm -rf {magento_root}/var/cache.
For redis, if you have only one store using that redis DB, it means redis flushall
If you have multiple stores using the same redis DB, you need something like:
redis-cli -h '{redis_hostname}' KEYS '{redis_prefix}*' | xargs redis-cli -h '{redis_hostname}' del
* Tip: Get those values from /app/etc/local.xml.
Related
I Want to run my application in localhost with php artisan serve but I get this Error unserialize(): Error at offset 0 of 40 bytes where is my problem?
You have to set a news Key Generate because
php artisan key:generate
After that test again to run the Laravel Application
php artisan serve
I got the same error, when I upgrade a Laravel 5.5 app to 5.6. The error comes form the EncryptCookies-Middleware.
Delete the cookies in your browser and/or clear your session-files in your Laravel app.
I've faced same problem. I frequently faced this problem in Homestead-vagrant environment.
To solve this issue in Laravel 5.4,5.5,5.6 or more -
php artisan config:clear
php artisan view:clear
php artisan key:generate
I got the same error a couple of days ago when I pushed a production update to my Laravel project from Envoyer.
Immediate fix:
I tried to rollback to the previous commit but the issue persisted which means the issue was originating from the client side, cookies probably. I tried removing cookies and the issue was gone.
Later, I spent a lot of time looking for this issue but got nothing until I faced this issue again today with another deployment and i found this article on Laravel news about the security fix 5.6.30 update. I was able to identify that this issue occurs if i try to deploy previous (< 5.6.30) version of the laravel v5.6.26 for a project which was already using > v5.6.30 and cookies were already created ( not serliazed) which when <5.6.30 version of the framework tries to unserlize results in error because they're not properly serealized.
Installing laravel/framework (v5.6.26)
Loading from cache
From the upgrade guide:
Configuring Cookie Serialization Since this vulnerability is not able
to be exploited without access to your application's encryption key,
we have chosen to provide a way to re-enable encrypted cookie
serialization while you make your application compatible with these
changes. To enable / disable cookie serialization, you may change the
static serialize property of the App\Http\Middleware\EncryptCookies
middleware:
I was able to fix this issue permanently by clearing cache of composer so forcing it to load latest version of the framework instead of falling back to cache.
Hope this helps.
Bests,
Just Inspect the element in Browser, and go to application tab and select cookie and delete that all cookie. That's It.
In App\Exceptions\Handler under render function use this snippet, it will reset browser cookie.
if (str_contains($exception->getMessage(), 'unserialize')) {
$cookie1 = \Cookie::forget('laravel_session');
$cookie2 = \Cookie::forget('XSRF-TOKEN');
return redirect()->to('/')
->withCookie($cookie1)
->withCookie($cookie2);
}
In my case I did removed my composer.lock and did a composer install and voila...
$ cd project_root
$ rm composer.lock
$ composer install
I also encountered this issue when I happened to update my composer.
If you put
protected static $serialize = true;
inside App\Http\Middleware\EncryptCookies, the old cookie will break your system. So to prevent this, either you have to clear the cookie, or just don't unserialize the decrypted cookie.
I made a workaround for this:
Inside vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php
Above this line of decrypt() function:
return $unserialize ? unserialize($decrypted) : $decrypted;
add:
try {
return $unserialize ? unserialize($decrypted) : $decrypted;
} catch (\Exception $e){
return $decrypted;
}
This might be ugly, but you can temporarily put it there until you think the old cookies has gone.
In my case, I was trying to decrypt a hash with an wrong function.
I was creating encrypt using encryptString()
$hash = Crypt::encryptString('secret');
but I tried to decrypt using decrypt()
$value = Crypt::decrypt($hash);
the correct way is
$value = Crypt::decryptString($hash);
So when you encrypt using Crypt::encrypt() you must decrypt it using Crypt::decrypt(), and for Crypt::encryptString() use Crypt::decryptString()
The first thing you should do is clear the configuration cache file
php artisan config:clear
Then create a new key for the application
php artisan key:generate
Finally, restart the server.. I hope it will fix your problem.
In my case happened during local development.
The steps that caused the problem was:
I upgraded the laravel up to 5.8 on a seperate branch.
I switched into an another branch having laravel 5.2 (in my case I had to review a PR)
I also was logged in in my app and hence there was a session cookie as well. In that case I just cleared the browser's cookies and got fresh ones.
In firefox can be done via visiting then select about:preferences#privacy and select the appropriate option. as the following images show (in Greek)
Privacy setting and an indication where the user to click
An anothwer aproach to diagnose the issue it to open a private firefox window or use chrome's cognito mode.
yeah, for localhost you can just delete cookies, but for production put this in your error handler so users would not see whoops :
if (strpos($exception->getMessage(), 'unserialize(): Error at offset 0 of 40 bytes') === 0) {
unset($_COOKIE['laravel_session']);
unset($_COOKIE['XSRF-TOKEN']);
setcookie('laravel_session', null, -1, '/');
setcookie('XSRF-TOKEN', null, -1, '/');
abort(200, '', ['Location' => route('frontend.home')]);
}
PS. tested for laravel 5.6.
you will just run in terminal
composer global update
I know there are some questions almost identical but none of them seems to be my case.
I have a symfony 2.8.3 project that reads and imports data from an excel file into mysql database. Its all working nice on localhost but in the last 48 hours I've been trying to get it working on my server. Its a shared hosting, with no SSH access to the linux.
When I am trying to load it from the server I get this error: "You have requested a non-existent service "phpexcel"."
Looks like you want to use service from ExcelBundle. But that bundle is not loaded. Check if you have it added for production env.
$bundles = array(
// ...
new Liuggio\ExcelBundle\LiuggioExcelBundle(),
);
Don't forget to clear cache on production environment after any config (AppKernel.php also) change.
To clear cache run php app/console cache:clear. You can also add env parameter: --env=dev or --env=prod - depending on your env. If it don't help then just remove all content of app/cache/ directory (or var/cache/ in case of Symfony3 app)
Pawel answered correctly, but something is missing: after you add this line: new Liuggio\ExcelBundle\LiuggioExcelBundle(), to the AppKernel.php file, inside the $bundles array, don't forget to clear the cache: delete the file from app/cache/dev in case you're in developer mode or app/cache/prod in case on production mode.
The elasticSearch runs fine on my centos as a non-service. I run it as "sh bin/elasticsearch". The client I installed using composer is PHP v2.0. It just won't do anything it used to do before. I used this before and I could search, index documents, make index. Right now I cannot do anything because of this error. The strangest thing is that ElasticSearch seems to be running fine, and I can also call it with curl like:
curl localhost:9200
Please advise on the PHP API failure? I tried:
1. Opening port 9200 on my centos 6 for all
2. Used every method from the book in PHP API: search, index, delete index, etc...always get the same result and an exception is thrown in the Elasticsearch/Client class:
“No alive nodes found in your cluster”
3. Changed the owner of the directory nodes to centos, apache, elasticsearch - no use.
Resolved by installing a fresh latest tarball elasticsearch server and running it straight like this: sh bin/elasticsearch.
im trying to install Sylius with composer for an e commerce project however i just cant get it done..i follow the docs but i always get an other error when i fix one.
already fixed some errors eg. incl extension exception, paypal bundle renaming issues on git and memory size problem.
Now where im stuck:
When i fill the parameters with the interactive script
if i give any password for the database i get this:
Doctrine\DBAL\Driver\PDOException
Acces denied for user 'root'#localhost
if i dont give password then i get this:
Doctrine\DBAL\Driver\PDOException
SQLSTATE[HY000]Unknown database databasename_dev (it appends _dev prefix)
then in both cases it ends up with this: RunTimeException
An error occured when executing the ""cache:clear --no-warmup"" command
and the proccess is terminated with this exception..
i tried if i could continue with the $ cd acme
$ php app/console sylius:install commands but:
if i gave a password then get acces denied Doctrine\DBAL\Exception\ConnectionException
if didnt then Doctrine\DBAL\Driver\PDOException
SQLSTATE[HY000]Unknown database databasename_dev
i created the database manually which seems to solve the problem however get this: General error: 1007 cant create database databasename_dev; database exists
(i dont think this solution is the right one)
but after this it doesnt terminate yet and creates the database schema and then after some installation it terminates with this:
RuntimeException
The source file "C:\Users\user\acme\app/../web/bundles/cmfcreate/vendor/create/themes/midgard-tags/tags.css" does not exists
i checked the page if it may useable but got twig exception that currency not found and many components are missing from the page..
What's your workspace?
If you work on Windows with WAMP I'll give you some things to check :
set the database port to : 3306
create a new user for the database, juste for your sylius project
when you run create-project commande, in databaseport write : localhost
I hope it helps you.
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