I am using drupal 7, and i have a problem with the modules.The problem is when I login as an administrator i cant enter to the modules tab in the admin menu. there is a message say "500 - Internal server error. There is a problem with the resource you are looking for, and it cannot be displayed." how can i enable a specific module?and how i fix this issue?

Thanks for your cooperation.


500 Internal server error is normally at Server level. To fix this, you'll first need to check is the actual error which you can check either Drupal Logs (located at "Admin => Reports => Recent Log message") or Apache error log (located at "/var/log" in Linux OS).

  • the drupal logs says the following: type: php Message: Trying to get property of non-object in _drupal_session_write() user:Anonymous (not verified) – menu Jun 16 '17 at 7:20
  • Seems something is overwriting $user Object. Do you've any custom module written, which might be causing this issue. Check this similar issue. – Yogesh Jun 16 '17 at 8:39
  • but sometimes the page open! – menu Jun 16 '17 at 8:57
  • it seems that's not the problem, I give access to all the user to enter to the module page and not work. where i can check the Apache error log in the server ? – menu Jun 16 '17 at 9:34
  • You'll need to debug a little more as Trying to get property of non-object in _drupal_session_write() user:Anonymous is what causing this issue. You can try doing debug_backtrace() inside _drupal_session_write() function to see which all functions has been called before this, which will help you identify which function is playing with $user object. – Yogesh Jun 16 '17 at 9:38

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.