Hi,
I tried to install Drupal according to the install.txt: I extracted files from *.gz, moved them to my site using FTP, created MySQL database in UTF8 coding using web-based control panel, and set the parameters in sites/default/settings.php. When I started the process by writing the base url of my website to the browser, I got many warnings like:
Warning: Table '.test_url_alias' does not exist query: SELECT COUNT(pid) FROM test_url_alias in …/includes/database.mysql.inc on line 172
and error:
Fatal error: Call to undefined function: block_list() in …/includes/theme.inc on line 1013
When I tried to start the install.php manually I got:
Fatal error: Allowed memory size of 10485760 bytes exhausted (tried to allocate 23040 bytes) in …/modules/user/user.module on line 1547
A week ago I installed Drupal successfully; it worked with some downloaded and installed modules, and with TinyMCE. But by installing modules for view I got the same problem with the memory and helped nothing, even removing some modules, and I had to remove the whole installation.
Why I have the memory problem already by the installation now? Is the limit 10M (I am not able to change it) not enough for the basic installation? Or did I forget to set something?
Thanks
Best regards,
Miro
Comments
In Drupal 5 you *must not*
In Drupal 5 you *must not* set $db_url and $db_prefix in settings.php yourself, because then Drupal thinks that it is already installed and expects that the tables have been created. That is why the url_alias table was not found. Just start over with a fresh settings.php.
About the php memory problem, normally 8M should be enough for a core install -- I don't know what happened. With more modules, it depends on which modules. Have you tried the suggestions in http://drupal.org/node/29268 for increasing your php memory? None of the 3 methods works?
How to find out the memory requirements of the modules?
Thanks for your hint; I'll try it without modified settings.php
Yes, I tried all the 3 methods and no one works by me. I asked the provider to increase the limit, but the answer was negative...
Is a way how to decrease the memory requirements of the Drupal? Or, do I have to live with the 8M requirements of the core installation and only with a few additional modules?
By the way, is any method how to find out the memory requirements of a module, or just 'try and you will see'?
Actually, I am a newbee in this area and what I am trying to find, are some additional modules, which could fulfill my requirements:
• XHTML WYSIWYG editor for my father, which does not know XHTML (e.g. TinyMCE)
• Friendly URLs (in core of Drupal)
• Pages with a constant content, which is put together from 2-3 blocks
• Pages have to have possibility to be shown only from date1 to date2
• Block of news with a short period of lifespan, which can be exported in RSS format, or sent to subscribed users
• Advertisement
• And some minor requirements
There are many modules in Drupal and because I have a memory limitation, it would be helpful to know the approximate memory requirements of the modules and the current memory consumption.
10M memory limit seems to be not enough for core installation
Today I downloaded the newer version 5.2 of Drupal.
Your hint helped, I did not get warnings or errors as before, but it seems that 10M is not enough for core installation:
Fatal error: Allowed memory size of 10485760 bytes exhausted (tried to allocate 92160 bytes) in .../modules/user/user.module on line 1260
Somewhere I read that Drupal loads all the available modules, enabled or disabled. Which modules are in a core installation they are optional and not enabled? Is a list of them somewhere? I can try to remove them before installation and try to install Drupal again.
I don't know of any way to
I don't know of any way to figure out how much memory each module takes up. The devel module can tell you how much memory is used in total (but of course the devel module takes up memory too)
It is not true that Drupal 5 loads all modules in memory. Drupal 4.7 did that, but only when you visited the modules installation page.
But if you want to try that anyway, the optional modules are all the modules which Drupal allows you to disable in the modules installation page.
If you ask me, the problem is your host. Most hosts allow you to increase php memory in some way.
I found the solution
Yes, it is possible I read about loading all modules in a discussion about memory limits in the version 4.7. I do not remember yet.
Anyway, I had a problem with the core installation with 10M memory limit. I know that optional modules are all the modules which Drupal allows me to disable in the modules installation page. Even, there are blocks ‘core – required’ and ‘core-optional’ in the modules installation page. Problem was, I could not install the Drupal, so I could not see the modules installation page.
But I found this information in the file *.info for each module. Although there was no information if the module was implicitly enabled or disabled (for optional modules), but I hoped that if the module was optional, I could remove it from the core installation.
This step helped and I successfully installed Drupal 5.2.
This issue can be closed then…
PHP Memory Limit in Mac Leopard 10.5 Update
For those folks upgrading their Macs to 10.5 Leopard, that also had local Drupal sites configured and running on their machines under 10.4, you'll probably get the same error message as mentioned above, that is:
Fatal error: Allowed memory size of 10485760 bytes exhausted (tried to allocate 23040 bytes) in …/modules/user/user.module on line 1547
"But it was all working before the upgrade!" you say.
The change happens because the Leopard installer also installs PHP 5.2.4 as well as apache2, with the default config files (which overwrote your previous system's php.ini and http.conf files) set to an 8MB limit, to ignore pnp.ini files in the Drupal directory (a handy way to up your memory limit on some hosts), and with PHP disabled in apache.
You can edit your apache2 config file at /etc/apchae2/httpd.conf (you might have to use sudo to have the write perms on the file) - enable the line "LoadModule php5_module libexec/apache2/libphp5.so" (remove the '#' at the start).
Also, edit /etc/php.ini, search for "memory_limit = 8M, change it to 32M, and save.
Restart the web server in the System Preferences, Sharing, Web Sharing (uncheck the box then re-check it), and your old sites should come up flying just fine. Oh, assuming they were Drupal 5 sites. I'm not sure the effect all this would have on Drupal 4 sites.
This web page helped me in figuring this out:
http://www.procata.com/blog/archives/2007/10/28/working-with-php-5-in-ma...
Incidentally, mysql was running just fine after my update to 10.5. No changes needed, it auto-started, all was well.