[development] Evil hack: admin/modules without memory restrictions

Gerhard Killesreiter gerhard at killesreiter.de
Sat Jan 21 05:26:55 UTC 2006


Hi there!

There are quite a few people who'd like to run a lot of Drupal modules 
and have problems on admin/modules when they hit the php memory limit. 
Moshe pointed out that this has changed/ will change with the install 
files, but I needed something quick and dirty now.

Attached is a patch that will make Drupal

1) read the module files
2) looking for help, init, exit hooks
3) write these hooks to a file
4) include that file
5) delete the file

for all modules found.

The patch makes a few assumptions about how a module file looks like 
(namely coding conventions). A few contrib modules do not respect these 
or they do call some other functions from their help hooks.

These are:

adsense
contextlinks
cursor
g2
smartypants
textile
xstatic

(all taken from contrib HEAD).

I am surprised that the list is so short.

The patch isn't proposed to be included in Drupal, also people who don't 
know PHP should not use it. I will not support it. It is intended to be 
run in development setups where you might want to test a lot of modules.

Cheers,
    Gerhard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: evil_hack_no_php_limit_on_admin_modules.patch
Type: text/x-patch
Size: 1521 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/development/attachments/20060121/f5ff702c/evil_hack_no_php_limit_on_admin_modules.bin


More information about the development mailing list