I installed a fresh copy of Drupal 4.7.3, set up the primary user, installed some themes and a few basic modules. I then installed the cpanel integration module and now whenever I create a new user by loading the site as an annonymous user and creating an account I get the following error message:

    * warning: array_keys(): The first argument should be an array in /home/external/public_html/modules/user.module on line 351.
    * warning: implode(): Bad arguments. in /home/external/public_html/modules/user.module on line 351.
    * 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 DISTINCT(p.perm) FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN () in /home/external/public_html/includes/database.mysql.inc on line 120.

I have searched the forums and tried all of the solutions related to this error. I have confirmed it is related to cpanel becuase when I have only the cpanel module loaded (along with default modules) it gives the error, when I disable the module it goes away.

The account is succesfully created in drupal and an email is sent to the user but the email is not created via cpanel. the watchdog errors are as follows:

user	Aug 9 2006 - 11:44pm	Error creating cPanel email account ...	Anonymous	
error	php	Aug 9 2006 - 11:44pm	You have an error in your SQL syntax; check the manual ...	Anonymous	
error	php	Aug 9 2006 - 11:44pm	implode(): Bad arguments. in ...	Anonymous	
error	php	Aug 9 2006 - 11:44pm	array_keys(): The first argument should be an array in ...	Anonymous	

I would be happy to assist in troubleshooting this problem,
Franco Nogarin

Comments

veeaa’s picture

I have exactly the same error, but I have not used Cpanel.

veeaa’s picture

Title: Problem with array_keys() » Problem solved, delicious module

I got rid of the error by disabling the delicious module.

ulyx451’s picture

I have exactly problem, exactly report...

spydmobile’s picture

Title: Problem solved, delicious module » No delicious module

Well, my problem cannot stem from the delicious module since it is not installed at all. Still looking for solutions for this....

njehlen’s picture

I'm having the same problem - I have the Service Links module installed along with cpanel.module, but disabling the Service Links module has no effect. Turning off the cpanel module gets rid of the errors.

romand’s picture

The same problem in 4.7.3 without additional modules
in server console:
select data from users; - no response

maybe MySQL refman-5.0-en.chm:
"When not running in strict mode, if you assign a value to a BLOB or TEXT column that exceeds the data type's maximum length, the value is truncated to fit. If the truncated characters are not spaces, a warning is generated. You can cause an error to occur and the value to be rejected rather than to be truncated with a warning by using strict SQL mode."?

data field - longtext, after altering to varchar select work good, but site still down:
Access denied
warning: array_keys() [function.array-keys]: The first argument should be an array in /home/portal/modules/user.module on line 351.

duaelfr’s picture

Status: Active » Closed (won't fix)

This version of Cpanel Integration is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.

This issue has been automagically closed by a script.