Just another WordPress.com weblog

Archive for May, 2012

client denied by server configuration: app/etc/local.xml

client denied by server configuration: PROJECT_DIR/app/etc/local.xml

It seems that magento is testing to see if the file can be accessed each time a page is loaded and alerts 
you to the fact that this file contains your MySQL database password is readable. 

So it is correct but seems odd that every page should check this filling the log with error messages 
instead of just doing it once at the login page.

To resolve the above error not shown in error_log at cpanel

To get rid of this security check, do not attempt to hack the Magento core (as some forum threads have
 suggested in the past). Instead, you can just modify the admin-theme to remove this check. 
Open up the following file or create it if it does not exist:
"app/design/adminhtml/default/default/layout/local.xml"

Add below code in local.xml of adminhtml/layout

<layout>
 <default>
 <remove name="notification_security" />
 <remove name="notification_survey" />
 </default>
</layout> 

This removes the blocks notification_security and notification_survey from the backend-pages entirely, 
skipping therefor the security check. No core hacks involved. 

Thanks,
Bijal Bhavsar :) 
Advertisements

how to get order object by increment id?

Hello,

 

We can get order object by increment id using following code:

$orders = Mage::getModel('sales/order')
  ->getCollection() 
  ->addAttributeToFilter('increment_id', 100000001)
  ->getFirstItem();

 

Thanks,

Bijal Bhavsar 🙂