array_keys array_fill implode SQL syntax errors AND comment wierdness
I feel like Drupal is slowly coming apart in front of my eyes, and none of the advice on the web, here or elsewhere, has begun to give me an explanation or fix. I do hope there's a simple fix.
I first noticed this error recently, but there's no telling how long it's been an issue. It all started because my Comments module isn't working properly, which may or may not be related to the error messages. I can't see any anonymous comments in the approval queue and they don't show up in the admin->content->comments screen. I briefly turned on the Recent Comments block and discovered I had spam comments. I checked the comments in phpmyadmin and discovered I had about 8000 spam comments, which I deleted. The problem still exists about the visibility of anonymous comments, and my administrative access to them. I have given myself full access in the access settings, to no avail.
Now that aside, the errors I'm getting (after saving my comments setting) are bountiful! They are:
1) array_keys() [function.array-keys]: The first argument should be an array in /home/xxx/xxx/modules/user/user.module on line 378.
2) array_fill() [function.array-fill]: Number of elements must be positive in /home/xxx/xxx/modules/user/user.module on line 379.
3) implode() [function.implode]: Bad arguments. in /xxx/xxx/xxx/modules/user/user.module on line 379.
4) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 query: SELECT DISTINCT(p.perm) FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in /home/xxx/xxx/includes/database.mysql.inc on line 172.
These errors log three(!) times every time I try to save my comment settings.
Here are my stats:
Drupal 5.2
Configuration file Protected
Cron maintenance tasks Last run 13 sec ago
Database schema Up to date
File system Writable (public download method)
MySQL database 4.1.22
PHP 4.4.7
Unicode library PHP Mbstring Extension
Web server Apache/1.3.39 (Unix) mod_fastcgi/2.4.2 mod_gzip/1.3.26.1a mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.30 OpenSSL/0.9.7a PHP-CGI/0.1b
My installed modules (all 5.x versions) are:
Aggregator
Blog
Blog API
Book
Color
Comment
Contact
Drupal
Forum
Help
Legacy
Locale
Menu
Path
Ping
Poll
Profile
Search
Statistics
Taxonomy
Throttle
Tracker
Upload
Block
Filter
Node
System
User
Watchdog
Gallery
XML Sitemap
Pathauto
Service links
Similar By Terms
Taxonomy Theme
Text Link Ads Integration
Theme Settings API
TinyMCE
Feedburner
Tagadelic
I have attempted to narrow down any modules that may be causing my headaches by turning them on and off, but nothing has helped. I tried running the module update script, with no success.
Please help if you have ANYTHING you can offer. I've already spent too much time considering another CMS and I just can't do it. I like Drupal- I just want it to work right, especially the comments because I'm trying to develop a community at the site (grandtradition.net).
Thanks in advance for any help you may be able to offer.
Best regards,
Greg

Anyone?
Does anyone have anything? Am I on my own here? Please help! Am I missing an easy solution?
Thanks in advance,
Greg
One more try...
Anyone? Anything?
I'm at a loss for what is happening. I thought it might have something to do with my Gallery2 sync, but after completely reinstalling, upgrading, and re-syncing, no change with the error messages when saving comment settings.
Thanks in advance,
Greg
I had the same errors
I had the same errors when I incorrectly called "global $user" and proceeded to accidentally overwrite it later in the particular function. I guess that was enough to upset user_access, which would also need to know the contents of $user to query for the users roles.
Are you calling "global $user" at any point in the comment settings page function?