Magento admin panel not loading(404 error) after Changing Allow Magneto backend to run on frame - magento

I have changed System > Configuration > Advanced > Admin > Security > Allow Magento Backend to run in frame from it's default "Only from same domain" to "Enabled" and I am not able to login to my admin panel. it says 404 not found.
I want to reset back to "only from same domain" from the (script/.htaccess) backend.
Is it possible.
Thanks

This should not be a problem - you could try to clear your cache folders with rm -rf <YOUR MAGENTO ROOT>/var/*.
If that does not help you can set this setting back to "Only from same origin" via database query.
For that please run the following command on your Magento database:
UPDATE core_config_data SET value=2 WHERE `path`='admin/security/domain_policy_backend';

I have done the following steps to resolve this 404 error. Hope might help someone.This error has been resolved by programming.
Go to your cpanel and launch phpMyAdmin.
Locate your Magento Database and select the core_config_data table.
Locate and edit the following rows:
Scope:"Default" and Path:"admin/url/custom"
Select the NULL checkbox and save.
Scope:"Default" and Path:"admin/url/use_custom"
Change value from 1 to 0 and save.
Scope:"Default" and Path:"admin/url/use_custom_path"
Change value from 1 to 0 if it isn't already and save.
Locate and delete the following rows:
Scope:"Stores" and Path:"web/secure/base_url"
Scope:"Stores" and Path:"web/unsecure/base_url" (should be located on the last page)
Delete /var/cache folder

Related

Edit Magento Configuration settings by file (cant save)

I'm having an issue with a magento site where nothing will save, but my error logs are disabled in
System > Configuration > Developer > Log Settings
I can't update them via the admin panel as the issue i'm having will not let me enable them and save the changes, but I can't fix it because I have no error log. Its a vicious cycle!
How can I edit the config settings not using the admin panel? Either my xml file edit or changing the database variable?
You can connect to database and check if entry for developer log is exist or not.
Query to check is:
SELECT * FROM `core_config_data` WHERE `path` LIKE 'dev/log/active';
If it results you any record then update value to 1. Else you can add new entry in database with below insert query.
insert into `core_config_data` (scope, scope_id, path, value) values('default',0,'dev/log/active', 1);
After updating value in database make sure you will flush all magento caches.
The way that I ended up changing the setting was through the file located at
homedir/public_html/app/code/core/Mage/Core/etc and edited the following block in the config.xml file
<log>
<active>0</active>
<file>system.log</file>
<exception_file>exception.log</exception_file>
</log>
and changed <active> to 1

XAMPP configuration page missing

Today I installed XAMPP (v5.6.15). Everything seems to be okay but the old orange configuration page is missing (localhost/xampp/index.php).
Now I don't know how to change security settings (such as MySQL password...).
Is there a way to bring back configuration page?
The old orange XAMPP administration page is no longer included in current XAMPP versions. You cannot bring back the old orange start page unless you go back to using the older version.
As for changing the password without the Orange Page:
Start the Apache Server and MySQL instances from the XAMPP control panel.
Open phpMyAdmin: http://localhost/phpmyadmin.
In the phpMyAdmin window, select SQL tab from the right panel. This will open the SQL tab where we can run the SQL queries.
Now type the following query in the textarea:
UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
Click Go. You will see a message saying that the query has been executed successfully.
If you refresh the page, you will get an error message. The phpMyAdmin configuration file is not aware of our newly set root passoword. We have to modify the phpMyAdmin config file.
Open the file [XAMPP Installation Path] / phpmyadmin / config.inc.php in your favorite text editor.
Search for the string $cfg['Servers'][$i]['password'] = '';
Change to: $cfg['Servers'][$i]['password'] = 'password';
Here the 'password' is what we set to the root user using the SQL query.
Save the config.inc.php file and RESTART the XAMPP server.
Hope this helps!

flat category/product table error in Magento

After a few minutes on the site, we get the following error while loading a product page
Fatal error: Call to undefined method
Mage_Catalog_Model_Resource_Category_Flat::getProductsPosition() in
[...]/app/code/core/Mage/Catalog/Model/Category.php on line 318
I have done lots of research but don't seem to be able to fix it.
It seems to happen only when the user is idle on the site for a few minutes.
The same product page works fine if I re-enter the website.
Please monitor this issue for a fix ....
https://github.com/ajzele/Inchoo_Prevnext/issues/2
and here is the pull request.
https://github.com/ajzele/Inchoo_Prevnext/pull/3
You can also fix this by disabling flat catalog if you do not nessicarily need it:
System > Configuration > Catalog > Frontend > Use Flat Catalog Category: No
System > Index Management: reindex all
System > Cache Management: flush cache

Magento has a redirect loop

My Magento web site home page has a redirect loop error. When I try to open it it goes to my old server url and gives the error:
The webpage resulted in too many redirects. Clearing your cookies for this site or allowing third-party cookies may fix the problem. If not, it is possibly a server configuration issue and not a problem with your computer.
When I try to go into admin it takes to me old server admin url without any error.
I down loaded the fresh data base and connected my store to that it works fine but when i connect it my old data base it give same error.
Please advise me.
This isn't an ideal solution, but I was having issues with Magento 1.9.x.
The setup was: Nginx Proxy & SSL Terminator => Apache Webserver
No matter what I did enabling SSL caused a redirection loop. I narrowed the issue down to Magento rather than the Nginx configurations.
It was like Magento didn't know it was receiving a secure connection from Nginx even though the correct headers were set.
The dirty solution was to add some code to the very bottom of index.php within the magento root directory (ie. /var/www/magento) just before the Mage::run... line, like so:
if( isset($_SERVER['HTTP_X_FORWARDED_PROTO']) ) {
$_SERVER['HTTPS'] = 'on';
$_SERVER['SERVER_PORT'] = 443;
}
Mage::run($mageRunCode, $mageRunType);
Wrong permissions can also cause this to happen. So in addition to truncating the var/cache and var/session folders, go ahead and make sure that you have the proper permissions on the app, skin, and includes directories, sub-directories and files. I believe the suggested permission setting is 644. You can do this with a proper FTP client such as FireZilla.
Go to table core_config_data
Update these value to be your localhost url(or whatever url you are providing while installation):
web/secure/base_url //(new url)
web/unsecure/base_url // (new url)
Empty the var folder.
I got it fixed.
I manually deleted my cache i was unable to login in my amdin and it get fixed
My issue was Cloudflare, put it in Development mode and it worked. It was cache related.
Issue: ERR_TOO_MANY_REDIRECTS - redirected you too many times
This issue is related cookie domain name.
For ex: if you already installed Magento 2 in www.example.com, and now you change magento base path to sub domain path like www.subdomain.example.com means, then you need to update your cookie domain entry inside of core_config_data table. You cannot access magento 2 backend so you can use following query to check record exist else use insert query.
SELECT * FROM `core_config_data` WHERE `path` REGEXP 'cookie_domain'
if record exit then update subdomain.example.com to the value column.
else
INSERT INTO `core_config_data` (`scope`, `scope_id`, `path`, `value`) VALUES ('default', 0, 'web/cookie/cookie_domain', 'subdomain.example.com');
Then flush cache using command php bin/magento cache:flush
Refresh magento 2 admin, now you can access admin. try this. thanks.
Note: if you are not using cookie domain, then don't configure this settings, if you configuration wrong then also you can face this error, so to fix that error update value to default configuration.
I had the same issue and after reloading and reloading my page I noticed that the error message responded to www.mydomain.tld and sometimes to mydomain.tld. I'm using Plesk on the server and I remembered that I set the Domain to always be called without www. I just changed that to none in the hosting settings of the domain. Lucky me, that solved that issue. Hope that helps someone else.

Magento Admin 404

We recently migrated our Multi-domain magento setup from a shared host to a dedicated server.
All is working fine fronted, but when I try to go to the admin section I get a 404 error on anything after login.
It seems to work if I remove index.php from the url but then as soon as I click on another link in the admin section it 404's again with the index.php back in the URL.
-- You need to go your server directly and do this via SSH/ FTP
You have to delete the following file
app/etc/use_cache.ser
If you get an error after that like
Notice: Undefined index: 0 in
/srv/www/vhosts/javra.com/htdocs/munchad2/app/code/core/Mage/Core/Model/Mysql4/Config.php
on line 92
Then go to your Database Management.
Open PhpMyAdmin
Go to your database
Click SQL
Run the following SQL Query:
_
SET FOREIGN_KEY_CHECKS=0;
UPDATE `core_store` SET store_id = 0 WHERE code='admin';
UPDATE `core_store_group` SET group_id = 0 WHERE name='Default';
UPDATE `core_website` SET website_id = 0 WHERE code='admin';
UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;
Some thing strange happens with the cache when you move the databases from one server to another so it seems like you need to clear it out.
Check in this way
> http://www.yourstore.com/index.php/admin/
or
> http://www.yourstore.com/admin/
After migration from www.domain1.com/magento/ to www.domain2.com/magento/
I was getting 500 Internal Server Error.
So I just renamed my .htaccess to htaccess.txt.
And my frontend started working fine,
But at Backend http://www.yourstore.com/admin/ I was getting Same 500 Internal Server error.
After trying many option suggested online nothing worked for me and after that I tried to access admin via following URL and voilĂ  worked perfect, Hope this help others.
Try to access as this > http://www.yourstore.com/index.php/admin/
Does the dedicated server have mod_rewerite enabled? Does the apache configuration allow .htaccess files to make changes to configuration directives via AllowOverride? Both of those are common ways that the Magento config gets pooched up.
This is an old thread but I've also had an issue with ownership what was returning a 404 in admin.
I'd been doing some work on securing the server and some files were owned as root, not apache. So a chown -R apache:apache . fixed it right up.

Resources