4

I am facing a pretty strange problem. I have installed Drupal 7 on my site. Whenever I install a module and tries to access the module's configure page after enabling the module, it leads me to simply /admin/config page without showing the option for that particular module configuration.

sometimes when I do a clear cache the problem gets resolved and then I can access the module's config page. but sometime after installing a module, clear cache gives Internal Server Error 500 .. also I tried to flush the cache manually by making a php file into / directory with the following code:

<?php
include_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
drupal_flush_all_caches();
?>

but this also gives Error 500.

When I disable the installed module, clear cache works as usual... please help me.

closed as too broad by kiamlaluno Mar 9 '16 at 6:06

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What are the permissions on the root folder ? – aerozeppelin Sep 4 '12 at 18:57
  • @aerozeppelin I am using shared hosting so can not set permissions on root folder, btw .php files are working when placed in root folder – Deepak Sep 4 '12 at 19:11
  • I am not sure about this, but you could try increasing your php memory limit and then check if the problem still persists. – aerozeppelin Sep 4 '12 at 19:21
  • @aerozeppelin I have also tried by setting ini_set('memory_limit', '64M'); in settings.php but problem remains the same – Deepak Sep 4 '12 at 19:29
  • 1
    Try increasing it to 256M or 512M, and then check. – aerozeppelin Sep 4 '12 at 19:36
1

As directed by aerozeppelin I got the following error:

Fatal error: Allowed memory size of 50331648 bytes exhausted (tried to allocate 4096 bytes) in /home/htdocs/includes/database/query.inc on line 1857

So increasing the PHP memory limit is the cure; this link is useful for that.

0

In a file type

<?php
phpinfo();
?>

to know your php configuration. Here you can know the path of php error_log or type

<?php
print_r(error_get_last());
?>

to get the last error that occurred.

  • erro_log is set to no value unfortunately my hosting provider does not seem to provide that feature can I explicitly set it? – Deepak Sep 4 '12 at 20:08
  • whats the output of <?php print_r(error_get_last()); ?> – aerozeppelin Sep 4 '12 at 20:10
  • I am getting no output (blank) – Deepak Sep 4 '12 at 20:20
  • 2
    Try setting the error log using the following link, php.net/manual/en/errorfunc.configuration.php#ini.error-log. Without the error logs it would be a challenge to pin point the error. – aerozeppelin Sep 4 '12 at 20:36
  • So i guess increasing the php memory limit of your server fixed this problem. Right? – ANDiTKO Sep 5 '12 at 7:44
0

May be this is a late answer.But it will help for new people.

  1. Try to add this in .htaccess file.

php_value memory_limit 64M

I hope this will help you to solve the Internal Server Error in Drupal 7

  • It's rather improbable that a php.ini in the root directory would be used from PHP. – kiamlaluno Mar 9 '16 at 6:05
  • yes adding php.ini is not a good method.But i could find it in few projects! – Hari kris Mar 9 '16 at 6:28

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