0

Why is it that when I enable error messages using these instructions: https://www.templatemonster.com/help/magento-how-to-display-error-messages.html

That my site completely stops work? Before, my homepage worked fine. But when I change index.php as the article suggests, I just get this error message on my home page:

Warning: fopen(/git/magento/var/locks/index_process_4.lock): failed to open stream: Permission denied  in /git/magento/app/code/core/Mage/Index/Model/Process.php on line 423

Why would it start failing all of a sudden? Does enabling error messages somehow cause warnings to become errors?

Thank you for your help.

EDIT:

The real question here is why does enabling error messages turn the warnings into errors? That's why I don't believe this question is a duplicate at all.

3
  • could you post your index.php? Maybe just the changed parts with a little buffer.. – Max Feb 10 '17 at 21:45
  • Thank you. I am able to fix the perms, I'm just wondering why enabling the error messages is causing the warning to block the page from loading. Normally it loads despite the warning. Is there a way to make it so only true errors (and not just warnings) prevent it from loading? – skb Feb 11 '17 at 5:36
  • @TejabhagavanKollepara Please do not vote to close questions blindly. Please read questions first. The question which you linked as duplicate has no connection with this one. – Rajeev K Tomy Feb 11 '17 at 5:54
0

Usually "Permission denied" errors happen because of file system permissions. I assume you are on OSX or Linux?

Here is a related thread. The recommended configuration for production is to restrict access for all users except the file owner. This is a bit restrictive for development; you may encounter permissions issues, such as what you are experiencing!

To confirm this would fix the issue, you can try globally writable permissions:

sudo chmod -R 777 ./var

from inside your magento directory. Note: I do not recommend leaving the configuration this way.

If that fixes it, then I would try a more fine-grained permission; perhaps 750 or 640. If the issue persists, well, there's more troubleshooting to go.

2
  • Thank you. I am able to fix the perms, I'm just wondering why enabling the error messages is causing the warning to block the page from loading. Normally it loads despite the warning. Is there a way to make it so only true errors (and not just warnings) prevent it from loading? – skb Feb 11 '17 at 5:36
  • Ah, I see. I recall dealing with a similar issue (maybe not identical) during Magento training. Take a look at this guide from HostGator. They note a customization to lib/Zend/Cache/Backend/File.php. As I recall this allowed this page to load instead of halt; hopefully this will help you. – nshiff Feb 13 '17 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.