Hello,
I've had this on the Drupal forum for almost a week with no reply. I hope someone here has an idea!
Using Drupal 5.3. Site is upgraded. Originally 4.6 (new), then to 4.7, then to 5.3 if that matters. Theme is BlueMarine.
When I go to the comment/settings page, I get these 4 errors reliably in the log:
Location: http://www.mydomain.com/admin/content/comment/settings Message: array_keys() [function.array-keyshttp://drupal.org/node/function.array-keys]: The first argument should be an array in /modules/user/user.module on line 368. -------- Location: http://www.mydomain.com/admin/content/comment/settings Message: array_fill() [function.array-fillhttp://drupal.org/node/function.array-fill]: Number of elements must be positive in /modules/user/user.module on line 369. -------- Location: http://www.mydomain.com/admin/content/comment/settings Message: implode() [function.implodehttp://drupal.org/node/function.implode]: Bad arguments. in /modules/user/user.module on line 369. -------- Location: http://www.mydomain.com/admin/content/comment/settings Message: 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 /includes/database.mysql.inc on line 172.
I've disabled ALL modules, yet the error persists. Not sure where to go with this next. Is it a problem with comments , something wrong in the database or the user database/module?
Thanks for any ideas!
Regards, Skip Taylor
did you try running upgrade.php?
Skip Taylor wrote:
Hello,
I've had this on the Drupal forum for almost a week with no reply. I hope someone here has an idea!
Using Drupal 5.3. Site is upgraded. Originally 4.6 (new), then to 4.7, then to 5.3 if that matters. Theme is BlueMarine.
When I go to the comment/settings page, I get these 4 errors reliably in the log:
Location: http://www.mydomain.com/admin/content/comment/settings Message: array_keys() [ function.array-keys http://drupal.org/node/function.array-keys]: The first argument should be an array in /modules/user/user.module on line 368.
Location: http://www.mydomain.com/admin/content/comment/settings Message: array_fill() [function.array-fill http://drupal.org/node/function.array-fill]: Number of elements must be positive in /modules/user/user.module on line 369.
Location: http://www.mydomain.com/admin/content/comment/settings http://www.mydomain.com/admin/content/comment/settings Message: implode() [function.implode http://drupal.org/node/function.implode]: Bad arguments. in /modules/user/user.module on line 369.
Location: http://www.mydomain.com/admin/content/comment/settings Message: 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 /includes/database.mysql.inc on line 172.
I've disabled ALL modules, yet the error persists. Not sure where to go with this next. Is it a problem with comments , something wrong in the database or the user database/module?
Thanks for any ideas!
Regards, Skip Taylor
Running update.php has made no difference so far. Just tried it again and it's the same errors.
On Nov 29, 2007 12:44 PM, sander-martijn lists@severeddreams.com wrote:
did you try running upgrade.php?
Skip Taylor wrote:
Hello,
I've had this on the Drupal forum for almost a week with no reply. I hope someone here has an idea!
Using Drupal 5.3. Site is upgraded. Originally 4.6 (new), then to 4.7, then to 5.3 if that matters. Theme is BlueMarine.
When I go to the comment/settings page, I get these 4 errors reliably in the log:
Location: http://www.mydomain.com/admin/content/comment/settings Message: array_keys() [ function.array-keys http://drupal.org/node/function.array-keys]: The first argument should be an array in /modules/user/user.module on line 368.
Location: http://www.mydomain.com/admin/content/comment/settings Message: array_fill() [function.array-fill http://drupal.org/node/function.array-fill]: Number of elements must be positive in /modules/user/user.module on line 369.
Location: http://www.mydomain.com/admin/content/comment/settings http://www.mydomain.com/admin/content/comment/settings Message: implode() [function.implode http://drupal.org/node/function.implode]: Bad arguments. in /modules/user/user.module on line 369.
Location: http://www.mydomain.com/admin/content/comment/settings Message: 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 /includes/database.mysql.inc on line 172.
I've disabled ALL modules, yet the error persists. Not sure where to go with this next. Is it a problem with comments , something wrong in the database or the user database/module?
Thanks for any ideas!
Regards, Skip Taylor
-- [ Drupal support list | http://lists.drupal.org/ ]
Quoting Skip Taylor avskip@gmail.com:
Running update.php has made no difference so far. Just tried it again and it's the same errors.
--8<--
Location: http://www.mydomain.com/admin/content/comment/settings Message: 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 /includes/database.mysql.inc on line 172.
I've disabled ALL modules, yet the error persists. Not sure where to go with this next. Is it a problem with comments , something wrong in the database or the user database/module?
Thanks for any ideas!
If you've answered this already, forgive me; what version of MySql?
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/
The MySQL version is 4.1.22
On Nov 29, 2007 2:20 PM, Earnie Boyd earnie@users.sourceforge.net wrote:
Quoting Skip Taylor avskip@gmail.com:
Running update.php has made no difference so far. Just tried it again
and
it's the same errors.
--8<--
Location: http://www.mydomain.com/admin/content/comment/settings Message: 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 /includes/database.mysql.inc on line 172.
I've disabled ALL modules, yet the error persists. Not sure where to
go
with this next. Is it a problem with comments , something wrong in
the
database or the user database/module?
Thanks for any ideas!
If you've answered this already, forgive me; what version of MySql?
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/
-- [ Drupal support list | http://lists.drupal.org/ ]
have you tried running the query through a linux shell (if you have ssh access) or through a front-end interface for your mysql (if that's what you use)? it will probably be more descriptive as to what your error is. also check your error logs. you can check them through drupal or if you have ssh access you can check them through that with a command like:
tail /var/log/httpd/error_log
----- Original Message ----- From: Skip Taylor avskip@gmail.com Date: Friday, November 30, 2007 9:49 am Subject: Re: [support] Comment/Settings page error To: support@drupal.org
The MySQL version is 4.1.22
On Nov 29, 2007 2:20 PM, Earnie Boyd earnie@users.sourceforge.net wrote:
Quoting Skip Taylor avskip@gmail.com:
Running update.php has made no difference so far. Just
tried it again
and
it's the same errors.
--8<--
Location:
http://www.mydomain.com/admin/content/comment/settings%3E >> > Message: 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 /includes/database.mysql.inc on line 172.
I've disabled ALL modules, yet the error persists. Not
sure where to
go
with this next. Is it a problem with comments , something
wrong in
the
database or the user database/module?
Thanks for any ideas!
If you've answered this already, forgive me; what version of MySql?
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Half of being smart is knowing what you're dumb at. -- David Gerrold
NOTICE: This email message is for the sole use of the intended recipient(s)and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
I have no idea how to run the query through the linux shell or any front-end interface (it would be PHPAdmin). Yes, it is MySQL.
I'll see if I can see the end of the logs and see if it's more specific.
Thanks! Skip
On Nov 29, 2007 3:56 PM, Sarah.Vardy@student.griffith.edu.au wrote:
have you tried running the query through a linux shell (if you have ssh access) or through a front-end interface for your mysql (if that's what you use)? it will probably be more descriptive as to what your error is. also check your error logs. you can check them through drupal or if you have ssh access you can check them through that with a command like:
tail /var/log/httpd/error_log
----- Original Message ----- From: Skip Taylor avskip@gmail.com Date: Friday, November 30, 2007 9:49 am Subject: Re: [support] Comment/Settings page error To: support@drupal.org
The MySQL version is 4.1.22
On Nov 29, 2007 2:20 PM, Earnie Boyd earnie@users.sourceforge.net wrote:
Quoting Skip Taylor avskip@gmail.com:
Running update.php has made no difference so far. Just
tried it again
and
it's the same errors.
--8<--
Location:
http://www.mydomain.com/admin/content/comment/settings%3E >> > Message: 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 /includes/database.mysql.inc on line 172.
I've disabled ALL modules, yet the error persists. Not
sure where to
go
with this next. Is it a problem with comments , something
wrong in
the
database or the user database/module?
Thanks for any ideas!
If you've answered this already, forgive me; what version of MySql?
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/
-- [ Drupal support list | http://lists.drupal.org/ ]
-- Half of being smart is knowing what you're dumb at. -- David Gerrold
NOTICE: This email message is for the sole use of the intended recipient(s)and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
-- [ Drupal support list | http://lists.drupal.org/ ]
On second look it appears $placeholders isn't getting populated, so you should look for what $placeholders SHOULD be.
Error: SELECT DISTINCT( p.perm) FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN ()
SQL code: SELECT DISTINCT(p.perm) FROM {role} r INNER JOIN {permission} p ON p.rid = r.rid WHERE r.rid IN ($placeholders)
and from the code you showed in a different email $placeholders should be an array of account role ids: $rids = array_keys($account->roles); $placeholders = implode(',', array_fill(0, count($rids), '%d'));
so view the content of your roles table - because apparently there aren't any roles or it's not getting populated for some other reason. If there are roles, try the following SQL in phpMyAdmin SQL execution (there's an SQL tab just click that and paste this in): SELECT DISTINCT(p.perm) FROM `role` r INNER JOIN `permission` p ON p.rid = r.rid WHERE r.rid IN (1,2,3,4)
Note I replaced the {} with `` and replaced $placeholders with a comma separated list of role ids from my installation - I have 4 roles and therefore 4 role ids - you'll have to check your roles table to find out what your list should be. In my case I get 4 results when running that query and they look like this:
access content access comments, post comments, access site-wide c... administer blocks, use PHP for block visibility, e... access brilliant_gallery, access comments, post co...
(text is truncated in phpMyAdmin)
Skip Taylor wrote:
I have no idea how to run the query through the linux shell or any front-end interface (it would be PHPAdmin). Yes, it is MySQL.
I'll see if I can see the end of the logs and see if it's more specific.
Thanks! Skip
On Nov 29, 2007 3:56 PM, <Sarah.Vardy@student.griffith.edu.au mailto:Sarah.Vardy@student.griffith.edu.au> wrote:
have you tried running the query through a linux shell (if you have ssh access) or through a front-end interface for your mysql (if that's what you use)? it will probably be more descriptive as to what your error is. also check your error logs. you can check them through drupal or if you have ssh access you can check them through that with a command like: tail /var/log/httpd/error_log ----- Original Message ----- From: Skip Taylor <avskip@gmail.com <mailto:avskip@gmail.com>> Date: Friday, November 30, 2007 9:49 am Subject: Re: [support] Comment/Settings page error To: support@drupal.org <mailto:support@drupal.org> > The MySQL version is 4.1.22 > > > On Nov 29, 2007 2:20 PM, Earnie Boyd > < earnie@users.sourceforge.net <mailto:earnie@users.sourceforge.net>> wrote: > > > Quoting Skip Taylor <avskip@gmail.com <mailto:avskip@gmail.com>>: > > > > > Running update.php has made no difference so far. Just > tried it again > > and > > > it's the same errors. > > --8<-- > > > > > >> > Location: > http://www.mydomain.com/admin/content/comment/settings> >> > > Message: 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 > > >> > /includes/database.mysql.inc on line 172. > > >> > > > >> > I've disabled ALL modules, yet the error persists. Not > sure where to > > go > > >> > with this next. Is it a problem with comments , something > wrong in > > the > > >> > database or the user database/module? > > >> > > > >> > Thanks for any ideas! > > >> > > > > > If you've answered this already, forgive me; what version of MySql? > > > > Earnie -- http://for-my-kids.com/ <http://for-my-kids.com/> > > -- http://give-me-an-offer.com/ > > > > -- > > [ Drupal support list | http://lists.drupal.org/ ] > > > > > > -- > Half of being smart is knowing what you're dumb at. -- David Gerrold > --- > NOTICE: This email message is for the sole use of the intended > recipient(s)and may contain confidential and privileged > information. Any unauthorized > review, use, disclosure or distribution is prohibited. If you > are not the > intended recipient, please contact the sender by reply email and > destroy all > copies of the original message. > -- [ Drupal support list | http://lists.drupal.org/ ]-- Half of being smart is knowing what you're dumb at. -- David Gerrold
NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
Quoting sander-martijn lists@severeddreams.com:
On second look it appears $placeholders isn't getting populated, so you should look for what $placeholders SHOULD be.
Error: SELECT DISTINCT( p.perm) FROM role r INNER JOIN permission p ON p.rid = r.rid WHERE r.rid IN ()
SQL code: SELECT DISTINCT(p.perm) FROM {role} r INNER JOIN {permission} p ON p.rid = r.rid WHERE r.rid IN ($placeholders)
and from the code you showed in a different email $placeholders should be an array of account role ids: $rids = array_keys($account->roles); $placeholders = implode(',', array_fill(0, count($rids), '%d'));
This code is only reached if $user->uid is not 1 and $perm[$account->uid] is not already set. If you're logged in then it is already set for the normal use of the user_access function. Some module may pass in a user object to check that user for permissions but that shouldn't be the case; is it?
so view the content of your roles table - because apparently there aren't any roles or it's not getting populated for some other reason. If there are roles, try the following SQL in phpMyAdmin SQL execution (there's an SQL tab just click that and paste this in): SELECT DISTINCT(p.perm) FROM `role` r INNER JOIN `permission` p ON p.rid = r.rid WHERE r.rid IN (1,2,3,4)
Note I replaced the {} with `` and replaced $placeholders with a comma separated list of role ids from my installation - I have 4 roles and therefore 4 role ids - you'll have to check your roles table to find out what your list should be. In my case I get 4 results when running that query and they look like this:
There are two default roles, anonymous and authenticated.
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/
of course there are the 2 default roles, I'm just wondering if the table got messed up. There should also be at least one admin account with full rights, right? I mean the issue here is that something is not working properly so I'm just giving some suggestions for trouble shooting. You say that code shouldn't be reached unless the user isn't 1, but he's obviously reaching that code since that's where the error lies so he's either not logged in as the primary account (perhaps the account he's logging in as is set to a role that didn't get transferred with the upgrade or something?) or something else is amiss.
There are two default roles, anonymous and authenticated.
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/
I got your code and it worked. The table seems readable but numbered a bit odd to me. Instead of 1,2,3,4,5 (I have 5 roles) it's 1,2,3,11,12 as below. I don't recall ever having that many roles, but I guess I must have at one time.
1 - anonymous user 2 - authenticated user 3 - site admin 11 - moderated auth user 12 - NoAkismet
So I changed your SQL code to this:
SELECT DISTINCT(p.perm) FROM `role` r INNER JOIN `permission` p ON p.rid = r.rid WHERE r.rid IN (1,2,3,11,12)
When I ran your code, it gave me these permissions:
access comments, access content, use sitemenu edit own blog, create book pages, edit own book pa... administer account_reminder, administer akismet se... access comments, access content post with no akismet checking
That seems accurate from what I could tell in the long printout version.
During this I'm logged in as Site Admin (#3 role), not the #1 account. I just tried it with the #1 account and it gives the same 4 errors as before.
I've tried to view the error-logs, but I'm not privileged enough. I'm on shared hosting at Site5 (new servers)
Not sure where to go with this. Hope you do!
Regards, Skip
On Nov 30, 2007 8:24 AM, sander-martijn lists@severeddreams.com wrote:
of course there are the 2 default roles, I'm just wondering if the table got messed up. There should also be at least one admin account with full rights, right? I mean the issue here is that something is not working properly so I'm just giving some suggestions for trouble shooting. You say that code shouldn't be reached unless the user isn't 1, but he's obviously reaching that code since that's where the error lies so he's either not logged in as the primary account (perhaps the account he's logging in as is set to a role that didn't get transferred with the upgrade or something?) or something else is amiss.
There are two default roles, anonymous and authenticated.
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/
-- [ Drupal support list | http://lists.drupal.org/ ]
Well if that sql works and in turn the database is accurate but the array is empty (an assumption i'm making from the error) then it looks like the array is likely getting lost in the php somewhere. It could take quite a bit of messing around to track down exactly where this is happening.
What I would suggest doing at this point before trying anything else if you haven't modified anything in core and have put all your modules in /sites/all/modules/ is to backup your entire site directory, download a fresh copy of drupal 5.3, replacing /sites and /files with your folders and uploading the whole thing. Since the site setup, themes, modules and uploaded files should be in those two folders that should work fine and shouldn't take more than about a half hr to hr (depending on ftp speed). If it still doesn't work then it's one of your modules or something in the database.
I know you said you disabled all add-on modules, but are there any you suspect?
Skip Taylor wrote:
I got your code and it worked. The table seems readable but numbered a bit odd to me. Instead of 1,2,3,4,5 (I have 5 roles) it's 1,2,3,11,12 as below. I don't recall ever having that many roles, but I guess I must have at one time.
1 - anonymous user 2 - authenticated user 3 - site admin 11 - moderated auth user 12 - NoAkismet
So I changed your SQL code to this:
SELECT DISTINCT(p.perm) FROM `role` r INNER JOIN `permission` p ON p.rid = r.rid WHERE r.rid IN (1,2,3,11,12)
When I ran your code, it gave me these permissions:
access comments, access content, use sitemenu edit own blog, create book pages, edit own book pa... administer account_reminder, administer akismet se... access comments, access content post with no akismet checking
That seems accurate from what I could tell in the long printout version.
During this I'm logged in as Site Admin (#3 role), not the #1 account. I just tried it with the #1 account and it gives the same 4 errors as before.
I've tried to view the error-logs, but I'm not privileged enough. I'm on shared hosting at Site5 (new servers)
Not sure where to go with this. Hope you do!
Regards, Skip
On Nov 30, 2007 8:24 AM, sander-martijn lists@severeddreams.com wrote:
of course there are the 2 default roles, I'm just wondering if the table got messed up. There should also be at least one admin account with full rights, right? I mean the issue here is that something is not working properly so I'm just giving some suggestions for trouble shooting. You say that code shouldn't be reached unless the user isn't 1, but he's obviously reaching that code since that's where the error lies so he's either not logged in as the primary account (perhaps the account he's logging in as is set to a role that didn't get transferred with the upgrade or something?) or something else is amiss.
There are two default roles, anonymous and authenticated.
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/
-- [ Drupal support list | http://lists.drupal.org/ ]
On Nov 30, 2007 12:14 PM, sander-martijn lists@severeddreams.com wrote:
Well if that sql works and in turn the database is accurate but the array is empty (an assumption i'm making from the error) then it looks like the array is likely getting lost in the php somewhere. It could take quite a bit of messing around to track down exactly where this is happening.
What I would suggest doing at this point before trying anything else if you haven't modified anything in core and have put all your modules in /sites/all/modules/ is to backup your entire site directory, download a fresh copy of drupal 5.3, replacing /sites and /files with your folders and uploading the whole thing. Since the site setup, themes, modules and uploaded files should be in those two folders that should work fine and shouldn't take more than about a half hr to hr (depending on ftp speed). If it still doesn't work then it's one of your modules or something in the database.
I'll give that a try and see what happens. As to messing around with the code, I'm not a PHP or MySQL programmer so I doubt it would do much good. It's more a minor inconvenience as I rarely use the setting. I was going to submit this as an issue but can't figure out what category to put it in.
I know you said you disabled all add-on modules, but are there any you suspect?
The only 3rd party modules that I use that I know directly messes with comments are comment-mover and Akismet.
Thanks for your time with this, I appreciate it! Skip
Skip Taylor wrote:
I got your code and it worked. The table seems readable but numbered a bit odd to me. Instead of 1,2,3,4,5 (I have 5 roles) it's 1,2,3,11,12 as below. I don't recall ever having that many roles, but I guess I must have at one time.
1 - anonymous user 2 - authenticated user 3 - site admin 11 - moderated auth user 12 - NoAkismet
So I changed your SQL code to this:
SELECT DISTINCT(p.perm) FROM `role` r INNER JOIN `permission` p ON p.rid = r.rid WHERE r.rid IN (1,2,3,11,12)
When I ran your code, it gave me these permissions:
access comments, access content, use sitemenu edit own blog, create book pages, edit own book pa... administer account_reminder, administer akismet se... access comments, access content post with no akismet checking
That seems accurate from what I could tell in the long printout version.
During this I'm logged in as Site Admin (#3 role), not the #1 account. I just tried it with the #1 account and it gives the same 4 errors as before.
I've tried to view the error-logs, but I'm not privileged enough. I'm on shared hosting at Site5 (new servers)
Not sure where to go with this. Hope you do!
Regards, Skip
On Nov 30, 2007 8:24 AM, sander-martijn lists@severeddreams.com wrote:
of course there are the 2 default roles, I'm just wondering if the
table
got messed up. There should also be at least one admin account with full rights, right? I mean the issue here is that something is not working properly so I'm just giving some suggestions for trouble shooting. You say that code shouldn't be reached unless the user isn't 1, but he's obviously reaching that code since that's where the error lies so he's either not logged in as the primary account (perhaps the account he's logging in as is set to a role that didn't get transferred with the upgrade or something?) or something else is amiss.
There are two default roles, anonymous and authenticated.
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/
-- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
Quoting Skip Taylor avskip@gmail.com:
On Nov 30, 2007 12:14 PM, sander-martijn lists@severeddreams.com wrote:
Well if that sql works and in turn the database is accurate but the array is empty (an assumption i'm making from the error) then it looks like the array is likely getting lost in the php somewhere. It could take quite a bit of messing around to track down exactly where this is happening.
What I would suggest doing at this point before trying anything else if you haven't modified anything in core and have put all your modules in /sites/all/modules/ is to backup your entire site directory, download a fresh copy of drupal 5.3, replacing /sites and /files with your folders and uploading the whole thing. Since the site setup, themes, modules and uploaded files should be in those two folders that should work fine and shouldn't take more than about a half hr to hr (depending on ftp speed). If it still doesn't work then it's one of your modules or something in the database.
I'll give that a try and see what happens. As to messing around with the code, I'm not a PHP or MySQL programmer so I doubt it would do much good. It's more a minor inconvenience as I rarely use the setting. I was going to submit this as an issue but can't figure out what category to put it in.
Maybe you're just running out of memory? To .htaccess add ``php_value memory_limit 64M''. You might also add ``php_value display_errors 1'' temporarily to see if it displays an error.
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/
On Nov 30, 2007 2:51 PM, Earnie Boyd earnie@users.sourceforge.net wrote:
Quoting Skip Taylor avskip@gmail.com:
On Nov 30, 2007 12:14 PM, sander-martijn lists@severeddreams.com
wrote:
Well if that sql works and in turn the database is accurate but the array is empty (an assumption i'm making from the error) then it looks like the array is likely getting lost in the php somewhere. It could take quite a bit of messing around to track down exactly where this is happening.
What I would suggest doing at this point before trying anything else if you haven't modified anything in core and have put all your modules in /sites/all/modules/ is to backup your entire site directory, download a fresh copy of drupal 5.3, replacing /sites and /files with your folders and uploading the whole thing. Since the site setup, themes, modules and uploaded files should be in those two folders that should work fine and shouldn't take more than about a half hr to hr (depending on ftp speed). If it still doesn't work then it's one of your modules or something in the database.
I'll give that a try and see what happens. As to messing around with the code, I'm not a PHP or MySQL programmer so I doubt it would do much
good.
It's more a minor inconvenience as I rarely use the setting. I was going
to
submit this as an issue but can't figure out what category to put it in.
Maybe you're just running out of memory? To .htaccess add ``php_value memory_limit 64M''. You might also add ``php_value display_errors 1'' temporarily to see if it displays an error.
That occurred to me. If it were just running out of memory, when I disabled the modules wouldn't that have freed the memory up? I'll try to completely remove a couple of modules and see if that does anything anyway.
Thanks, Skip
On Nov 30, 2007 2:51 PM, Earnie Boyd earnie@users.sourceforge.net wrote:
Quoting Skip Taylor avskip@gmail.com:
On Nov 30, 2007 12:14 PM, sander-martijn lists@severeddreams.com
wrote:
Well if that sql works and in turn the database is accurate but the array is empty (an assumption i'm making from the error) then it looks
...
fresh copy of drupal 5.3, replacing /sites and /files with your folders
and uploading the whole thing. Since the site setup, themes, modules and uploaded files should be in those two folders that should work fine and shouldn't take more than about a half hr to hr (depending on ftp speed). If it still doesn't work then it's one of your modules or something in the database.
I'll give that a try and see what happens. As to messing around with the code, I'm not a PHP or MySQL programmer so I doubt it would do much
good.
It's more a minor inconvenience as I rarely use the setting. I was going
to
submit this as an issue but can't figure out what category to put it in.
Maybe you're just running out of memory? To .htaccess add ``php_value memory_limit 64M''. You might also add ``php_value display_errors 1'' temporarily to see if it displays an error.
The first gives a 500 server error. DIdn't try the second one. Tried removing modules from directory. No change, same 4 errors. I was just reminded that I have the comments_rss module. I'm going to look into that to see if it could be the problem. I forgot it was in there... lists are good. :D
Thanks, Skip
Quoting Skip Taylor avskip@gmail.com:
Maybe you're just running out of memory? To .htaccess add ``php_value memory_limit 64M''. You might also add ``php_value display_errors 1'' temporarily to see if it displays an error.
The first gives a 500 server error. DIdn't try the second one. Tried removing modules from directory. No change, same 4 errors. I was just reminded that I have the comments_rss module. I'm going to look into that to see if it could be the problem. I forgot it was in there... lists are good. :D
Huh!!! Adding a memory_limit value of 64M caused your server to crash?!?! You might want to check out what is going on with your server.
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/
On Dec 1, 2007 8:25 AM, Earnie Boyd earnie@users.sourceforge.net wrote:
Quoting Skip Taylor avskip@gmail.com:
Maybe you're just running out of memory? To .htaccess add ``php_value memory_limit 64M''. You might also add ``php_value display_errors 1'' temporarily to see if it displays an error.
The first gives a 500 server error. DIdn't try the second one. Tried removing modules from directory. No change, same 4 errors. I was just reminded that I have the comments_rss module. I'm going to look into
that to
see if it could be the problem. I forgot it was in there... lists are
good.
:D
Huh!!! Adding a memory_limit value of 64M caused your server to crash?!?! You might want to check out what is going on with your server.
I think it has to do with the site being on a shared server. Not many changes I can make like that. There is an involved procedure regarding php.ini but it's a lot of php.ini's (one in every directory). The host will be upgrading to PHP5 pretty soon so I'll probably wait for that as it's only one php.ini to change things then.
Quoting Skip Taylor avskip@gmail.com:
I think it has to do with the site being on a shared server. Not many changes I can make like that. There is an involved procedure regarding php.ini but it's a lot of php.ini's (one in every directory). The host will be upgrading to PHP5 pretty soon so I'll probably wait for that as it's only one php.ini to change things then.
You might want to check out http://www.gisol.com/ for a new host service.
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/
Quoting Skip Taylor avskip@gmail.com:
Thanks for any ideas!
Needle in a haystack idea; ``TRUNCATE sessions;''.
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/
Good idea, but I've already performed that via PHPAdmin. Unfortunately it had no effect on it.
On Nov 29, 2007 5:38 PM, Earnie Boyd earnie@users.sourceforge.net wrote:
Quoting Skip Taylor avskip@gmail.com:
Thanks for any ideas!
Needle in a haystack idea; ``TRUNCATE sessions;''.
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/
-- [ Drupal support list | http://lists.drupal.org/ ]
On Thursday 29 November 2007 12:33:04 Skip Taylor wrote:
Hello,
I've had this on the Drupal forum for almost a week with no reply. I hope someone here has an idea!
Using Drupal 5.3. Site is upgraded. Originally 4.6 (new), then to 4.7, then to 5.3 if that matters. Theme is BlueMarine.
When I go to the comment/settings page, I get these 4 errors reliably in the log:
Location: http://www.mydomain.com/admin/content/comment/settings Message: array_keys() [function.array-keyshttp://drupal.org/node/function.array-keys]: The first argument should be an array in /modules/user/user.module on line 368.
Location: http://www.mydomain.com/admin/content/comment/settings Message: array_fill() [function.array-fillhttp://drupal.org/node/function.array-fill]: Number of elements must be positive in /modules/user/user.module on line 369.
Location: http://www.mydomain.com/admin/content/comment/settings Message: implode() [function.implodehttp://drupal.org/node/function.implode]: Bad arguments. in /modules/user/user.module on line 369.
Location: http://www.mydomain.com/admin/content/comment/settings Message: 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 /includes/database.mysql.inc on line 172.
I've disabled ALL modules, yet the error persists. Not sure where to go with this next. Is it a problem with comments , something wrong in the database or the user database/module?
Thanks for any ideas!
Regards, Skip Taylor
Has anyone modified that file? What is on lines 368 and 369 of your /modules/user/user.module file?
Hello Jason,
No mods that I'm aware of. The module size, time and date match the one from the distribution file. Below is my user.module starting at line 365. From what I can see it matches perfectly the user.module in the distribution file.
Thanks, Skip
365 // To reduce the number of SQL queries, we cache the user's permissions 366 // in a static variable. 367 if (!isset($perm[$account->uid])) { 368 $rids = array_keys($account->roles); 369 $placeholders = implode(',', array_fill(0, count($rids), '%d')); 370 $result = db_query("SELECT DISTINCT(p.perm) FROM {role} r INNER JOIN {permission} p ON p.rid = r.rid WHERE r.rid IN ($placeholders)", $rids); 371 $perm[$account->uid] = ''; 372 while ($row = db_fetch_object($result)) { 373 $perm[$account->uid] .= "$row->perm, ";
On Nov 29, 2007 12:56 PM, Jason Flatt drupal@oadaeh.net wrote:
On Thursday 29 November 2007 12:33:04 Skip Taylor wrote:
Hello,
I've had this on the Drupal forum for almost a week with no reply. I
hope
someone here has an idea!
Using Drupal 5.3. Site is upgraded. Originally 4.6 (new), then to 4.7,
then
to 5.3 if that matters. Theme is BlueMarine.
When I go to the comment/settings page, I get these 4 errors reliably in the log:
Location: http://www.mydomain.com/admin/content/comment/settings Message: array_keys() [function.array-keyshttp://drupal.org/node/function.array-keys]: The first argument should be an array in /modules/user/user.module on
line
Location: http://www.mydomain.com/admin/content/comment/settings Message: array_fill() [function.array-fillhttp://drupal.org/node/function.array-fill]: Number of elements must be positive in /modules/user/user.module on line 369.
Location: http://www.mydomain.com/admin/content/comment/settings Message: implode() [function.implodehttp://drupal.org/node/function.implode]: Bad
arguments.
in /modules/user/user.module on line 369.
Location: http://www.mydomain.com/admin/content/comment/settings Message: 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 /includes/database.mysql.inc on line 172.
I've disabled ALL modules, yet the error persists. Not sure where to go with this next. Is it a problem with comments , something wrong in the database or the user database/module?
Thanks for any ideas!
Regards, Skip Taylor
Has anyone modified that file? What is on lines 368 and 369 of your /modules/user/user.module file?
-- Jason Flatt http://www.oadaeh.net/ Father of Six: http://www.flattfamily.com/ (Joseph, 14; Cramer, 12; Travis, 10; Angela; Harry, 7; and William, 12:04 am, 12-29-2005) Linux User: http://www.xubuntu.org/ Drupal Fanatic: http://drupal.org/ -- [ Drupal support list | http://lists.drupal.org/ ]
if you don't have tons of users (or even if you do but it's worth the time) I would take a look at the following tables: users, role, users_roles and permission. Maybe there's some corrupt data in one of those tables - if an sql error is getting thrown then the arrays wouldn't get populated. Also I guess the comments table although it looks like this is an error on the user/permission side rather than anything comment related specifically.
Also if you haven't yet done this, check the logs (/admin/logs/watchdog) to see if it gives any further info.
If neither of those work what I would do next is try to run those database queries using the console or phpMyAdmin to see what they say, replacing the variables with relevant replacements. I did that recently with a module I was having trouble with and found that while the sql was written ok in the module code it was being modified by something in core to something that didn't work. I modified the module code slightly and it worked fine after that (it was the location module in that case, not a core module).
.s
Skip Taylor wrote:
Hello Jason,
No mods that I'm aware of. The module size, time and date match the one from the distribution file. Below is my user.module starting at line 365. From what I can see it matches perfectly the user.module in the distribution file.
Thanks, Skip
365 // To reduce the number of SQL queries, we cache the user's permissions 366 // in a static variable. 367 if (!isset($perm[$account->uid])) { 368 $rids = array_keys($account->roles); 369 $placeholders = implode(',', array_fill(0, count($rids), '%d')); 370 $result = db_query("SELECT DISTINCT(p.perm) FROM {role} r INNER JOIN {permission} p ON p.rid = r.rid WHERE r.rid IN ($placeholders)", $rids); 371 $perm[$account->uid] = ''; 372 while ($row = db_fetch_object($result)) { 373 $perm[$account->uid] .= "$row->perm, ";
On Nov 29, 2007 12:56 PM, Jason Flatt <drupal@oadaeh.net mailto:drupal@oadaeh.net> wrote:
On Thursday 29 November 2007 12:33:04 Skip Taylor wrote: > Hello, > > I've had this on the Drupal forum for almost a week with no reply. I hope > someone here has an idea! > > Using Drupal 5.3. Site is upgraded. Originally 4.6 (new), then to 4.7, then > to 5.3 if that matters. Theme is BlueMarine. > > When I go to the comment/settings page, I get these 4 errors reliably in > the log: > > Location: http://www.mydomain.com/admin/content/comment/settings > Message: array_keys() > [function.array-keys<http://drupal.org/node/function.array-keys>]: > The first argument should be an array in /modules/user/user.module on line > 368. > -------- > Location: http://www.mydomain.com/admin/content/comment/settings > Message: array_fill() > [function.array-fill<http://drupal.org/node/function.array-fill <http://drupal.org/node/function.array-fill>>]: > Number of elements must be positive in /modules/user/user.module on line > 369. > -------- > Location: http://www.mydomain.com/admin/content/comment/settings > Message: implode() > [function.implode<http://drupal.org/node/function.implode <http://drupal.org/node/function.implode>>]: Bad arguments. > in /modules/user/user.module on line 369. > -------- > Location: http://www.mydomain.com/admin/content/comment/settings <http://www.mydomain.com/admin/content/comment/settings> > Message: 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 > /includes/database.mysql.inc on line 172. > > I've disabled ALL modules, yet the error persists. Not sure where to go > with this next. Is it a problem with comments , something wrong in the > database or the user database/module? > > Thanks for any ideas! > > Regards, > Skip Taylor Has anyone modified that file? What is on lines 368 and 369 of your /modules/user/user.module file? -- Jason Flatt http://www.oadaeh.net/ Father of Six: http://www.flattfamily.com/ (Joseph, 14; Cramer, 12; Travis, 10; Angela; Harry, 7; and William, 12:04 am, 12-29-2005) Linux User: http://www.xubuntu.org/ Drupal Fanatic: http://drupal.org/ -- [ Drupal support list | http://lists.drupal.org/ ]-- Half of being smart is knowing what you're dumb at. -- David Gerrold
NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
On Thursday 29 November 2007 13:53:02 Skip Taylor wrote:
Hello Jason,
No mods that I'm aware of. The module size, time and date match the one from the distribution file. Below is my user.module starting at line 365. From what I can see it matches perfectly the user.module in the distribution file.
Thanks, Skip
Try clearing the cache tables of your Drupal install.
On Thursday 29 November 2007 14:25:56 Jason Flatt wrote:
On Thursday 29 November 2007 13:53:02 Skip Taylor wrote:
Hello Jason,
No mods that I'm aware of. The module size, time and date match the one from the distribution file. Below is my user.module starting at line 365. From what I can see it matches perfectly the user.module in the distribution file.
Thanks, Skip
Try clearing the cache tables of your Drupal install.
I probably should have given more information: http://drupal.org/node/152983 http://drupal.org/node/42055 http://drupal.org/project/devel
Quoting Skip Taylor avskip@gmail.com:
Using Drupal 5.3. Site is upgraded. Originally 4.6 (new), then to 4.7, then to 5.3 if that matters. Theme is BlueMarine.
Maybe entering ``upgrade from 4.7 to 5.x site:lists.drupal.org'' in my favorite search form [1] might help.
[1] Google.Com
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/