Edit Magento Configuration settings by file (cant save) - magento

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

Related

no permission to see this field in strapi

I am unable to enter data to fields which I have created in user collection type in strapi.
I wanted to create extra fields in user collection in strapi so I created some extra fields from builder , but when trying to enter data , the newly created fields are not editable .
You can try following ways, and check if any one of them works -
Method 1
there can always be an issue with Strapi server,
I restarted the server manually and it is fixed.
Method 2
your user might not have permission to view that field.
you can change permission of a user by -
step 1 - Login to your strapi cms with Admin account and check if you are able to edit that field(the one with no permission), if so then continue with following steps, else this method wont work for you.
setp 2 - click on settings in left panel , select the user , from the list select the user that you want to change permission with, give read write , and other permissions you want to give.
re-login with your account from which you were facing the problem, it should work now
Method 3
There might be a sync issue with your DB, sometimes your data is not synced with your DB, try deleting the field and re creating it.
I hope one of this solves your issue
After I ran into the issue multiple times myself and couldn't fix it even after re-deploying again (and again...), I found the following worked for me:
In the deployed version, go to Content-Type Builder
Select the content type that contains the field causing problems
Click the Configure the view button
Change the position of an arbitrary field
Click Save
This worked for me and also didn't require a re-deployment of my app.

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

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

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!

Magento session reset on every request

I have a very critical issue with my Magento store. The session gets reset on every HTTP request, for example if I refresh the homepage it creates a new session.
Initially I thought it was from the php.ini settings but I set session.cookie_lifetime = 86400 ni my php.ini file and from magento backend as ewll. Then I also moved the session from files to db to try and resolve the problem but it keeps creating new sessions on every request. As a result of this I can't add any items to the cart or do anything else because my session gets destroyed every time.
I solved this issue by enabling "Use SID on Frontend" in 'system->web->session validation settings'.
Hope the following will helps you.
https://magento.stackexchange.com/questions/385/cart-dropping-all-items-cart-session-clears
I found the issue and located it in this file:
app/code/core/Mage/Core/Model/Session/Abstract/Varien.php
In order to fix it more elegantly one should override the specified file in the local code pool insted of modifying the core directly. Like below:
app/code/local/Mage/Core/Model/Session/Abstract/Varien.php
Also for the above to work php.ini setting session.cookie_secure must be commented or set to 0.
Make sure to check your php.ini
I had a similar problem and noticed that the .ini was trying to set a different save path for the sessions then Magento.
In short edit php.ini and comment out the save_path and cookie_secure:
;session.save_path =
;session.cookie_secure =
I'm sure there is a way in Magento to set the secure cookie param, as I would not want to suggest anything that maybe a security risk.
Then restart php or apache

Magento Admin Configuration Not Saving In Database

System -> Configurations -> General -> Countries Options
I am trying to save Default Country, Allowed Countries. When i hit submit it shows me it saved but when i come back again to see the configurations it has nothing that i saved.
I am using Magento 1.7.0.2 and I installed a fresh install.
Just faced with the same problem.
The problem was that we activated ssl in apache but Use Secure URLs option in magento still remains equal to No.
I found next workaround:
- go to System -> Configuration -> Web
- change Use Secure URLs in Admin to Yes
- open firebug in firefox
- find form node in html
- change action from http://... to https://...
- submit form
Without looking into code, not able to solve the issue.
But, you can update the Default Country, Allowed Countries value from data base side. Below the SQL Query to get all rows of General tab -> Countries Options and edit from here.
SELECT * FROM `core_config_data` WHERE `path` LIKE '%general_country%';
Hope this will help!
My case was a little different, I could find the following error:
PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0, referer: (url)
This particular page had a lot of input fields, changing max_input_vars did the trick

Resources