tags:

views:

651

answers:

6

I'm getting multiple error on some random pages (mostly on front page) of site. I'm getting this error only on production server, on local server site is running fine, remote server is IIS 6 and local server is xampp. I have updated drupal core and few modules ( each separately) and run update.php. Update run fine. I'm searching for solution for more than a week but able to find any solution.

* warning: array_fill() [function.array-fill]: Number of elements must be positive in E:\wwwroot\mysite\includes\database.inc on line 241.
* warning: implode() [function.implode]: Invalid arguments passed in E:\wwwroot\mysite\includes\database.inc on line 241.
* warning: array_keys() [function.array-keys]: The first argument should be an array in E:\wwwroot\mysite\modules\user\user.module on line 502.
* user warning: 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 p.perm FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in E:\wwwroot\mysite\modules\user\user.module on line 502.
* warning: array_keys() [function.array-keys]: The first argument should be an array in E:\wwwroot\mysite\modules\block\block.module on line 406.
* warning: array_fill() [function.array-fill]: Number of elements must be positive in E:\wwwroot\mysite\includes\database.inc on line 241.
* warning: implode() [function.implode]: Invalid arguments passed in E:\wwwroot\mysite\includes\database.inc on line 241.
* warning: array_merge() [function.array-merge]: Argument #2 is not an array in E:\wwwroot\mysite\modules\block\block.module on line 407.
* user warning: 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 ') OR r.rid IS NULL) ORDER BY b.region, b.weight, b.module' at line 1 query: SELECT DISTINCT b.* FROM blocks b LEFT JOIN blocks_roles r ON b.module = r.module AND b.delta = r.delta WHERE b.theme = '' AND b.status = 1 AND (r.rid IN () OR r.rid IS NULL) ORDER BY b.region, b.weight, b.module in E:\wwwroot\mysite\modules\block\block.module on line 407.
* warning: Invalid argument supplied for foreach() in E:\wwwroot\mysite\sites\all\modules\imce\imce.module on line 167.

site is at http://tinyurl.com/ckene8

+1  A: 

What number of user roles do your site have? You must have at least one.

Kuroki Kaze
It has 7 roles. What is the connection between errors and roles?
Sharique
Just looked into the function mentioned in warnings.AND (r.rid IN () OR r.rid IS NULL) This IN() is populated by role ids (rid).
Kuroki Kaze
A: 

At times like these what I find helpful is to go into the code at the first error you're seeing, and putting in some drupal_set_message(print_r(something, TRUE)); lines, seeing what data is causing the failure and working backwards through the code from there. Something seems to be interfering with it doing something with roles - it's not really possible to guess what without poking around in your code/database.

John Fiala
A: 

check if you have user with id 0 and user with id 1

Nir Levy
A: 

Do a file-tree comparison between your production site and your test site.

I had a similar situation with a test site when I goofed up a trial upgrade and ended up with multiple versions of drupal comingled in the same directory structure.

I'm picking that a file-tree comparison will show extra php files in odd places, or php files with different content.

If things are clean, you should have differences only in your \files\ folder (for uploads) and any cache folders (such as used by imagecache). The drupal core directories, and your custom modules and themes should be identical between test and production.

Bevan
A: 

After puzzling few days I have reset(re-developed) the site.

Sharique
A: 
fkaufusi

related questions