drupal

Drupal

in

| PHP< | MySQL< | Web< |

Legend:Read more

Drupal - FAQ

in
Drupal

Drupal problems

On the field that you are using for the calendar date information, enable multiple values.

Your recent log entries on watchdog show the following and you have no idea how to resolve...
Attempting to re-run cron while it is already running.
mysql_num_rows(): supplied argument is not a valid ...
Cron has been running for more than an hour and is most ...
Cron run exceeded the time limit and was aborted.

Try this...
Disable the mailhandler, scheduler and subscriptions modules if you have any of them installed.
If you have the search module enabled change it's settings for items to index per cron run to the lowest setting (10).
Run this sql query via phpmyadmin...

DELETE FROM `variable` WHERE name = 'cron_semaphore';
DELETE FROM `variable` WHERE name = 'cron_last';

If you have ssh access run this command from the directory where your cron.php resides...

HTTP_HOST=.www.domain.org. php -q cron.php

or go to your status report page under logs (admin/logs/status) and run cron manually.

Run it a few times until your search has been 100% indexed. It will be helpful to setup a cronjob and let it run every 10min overnight if you have many nodes to be indexed. On one of our projects we did a phpbb forum import which created around 4000 nodes. We set cron to run between 1am-6am for 5 days, which managed to get the nodes all indexed by the search module eventually. Cron is currently set to run every 15min on this site with the subscriptions, scheduler and search modules enabled. On average round 5 new nodes are created every hour by the fairly new but steadily growing community.

Last case scenario if all else fails is to run cron from command line...

cd to the folder that drupal is installed in, root in our case and simply call the cron file like this..

php ./cron.php

[update - 30/08/2007] - it appears that the cron was affected by a conflict between eAccelerator and Zend Optimizer. They both don't work well together. eAccelerator will also prevent cron from running if its installed as a php extension. This post relates to V9.5.1 of eaccelerator.

from link1<, link2<

The problem comes when the new functions are handed arguments intended for the old ones. I ran into it in a block and a node, both of which contained PHP snippets. Since I was upgrading the site from Drupal 5, these snippets expected the old function. And it turns out that the new function is none too happy when you pass it the wrong arguments.

Here's what it'll take to make the errors go away. I wouldn't suggest using this method unless you're bypassing an error in a module you didn't write, and you don't really feel like hacking around in it to fix things. Simply drop these two snippets into drupal/includes/common.inc<.

  /**
* Add this code right after the line that says:
*
* `function url($path = NULL, $options = array()) {`
*
* (currently on line 1368)
*/
// Convert arguments and move on... if (!is_array($options)) { $options = array(); $args = func_get_args(); if (isset($args[1])) $options['query'] = $args[1]; if (isset($args[2])) $options['fragment'] = $args[2]; if (isset($args[3])) $options['absolute'] = $args[3]; }  <
  /**
* And drop this surprisingly similar code right
* after the line that says:
*
* `function l($text, $path, $options = array()) {`
*
* (currently on line 1541)
*/
// Convert arguments and move on... $args = func_get_args(); if (count($args) > 3) { $options = array(); if (isset($args[2])) $options['attributes'] = $args[2]; if (isset($args[3])) $options['query'] = $args[3]; if (isset($args[4])) $options['fragment'] = $args[4]; if (isset($args[5])) $options['absolute'] = $args[5]; if (isset($args[6])) $options['html'] = $args[6]; }<

Your code should work exactly as intended. Note that this method is a dirty hack, but will get the job done (i.e. treat the symptoms). Don't come crying to me when something breaks later, because I'm warning you now.

from here<

Syndicate content