Access Denied - still unresolved

cottonhills - May 8, 2008 - 20:39

Up all night and still no headway in gaining access to the site or how to correct and now becoming critical. Is there anyone that can help? Not sure if this is a beta and should install an back version or what to do. Thanks!
-------

warning: array_fill() [function.array-fill]: Number of elements must be positive in D:\Apache Software Foundation\Apache2.2\htdocs\worksite\drupal-6.2\includes\database.inc on line 235.
warning: implode() [function.implode]: Bad arguments. in D:\Apache Software Foundation\Apache2.2\htdocs\worksite\drupal-6.2\includes\database.inc on line 235.
warning: array_keys() [function.array-keys]: The first argument should be an array in D:\Apache Software Foundation\Apache2.2\htdocs\worksite\drupal-6.2\modules\user\user.module on line 500.
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 D:\Apache Software Foundation\Apache2.2\htdocs\worksite\drupal-6.2\modules\user\user.module on line 500.
warning: array_keys() [function.array-keys]: The first argument should be an array in D:\Apache Software Foundation\Apache2.2\htdocs\worksite\drupal-6.2\modules\block\block.module on line 406.
warning: array_fill() [function.array-fill]: Number of elements must be positive in D:\Apache Software Foundation\Apache2.2\htdocs\worksite\drupal-6.2\includes\database.inc on line 235.
warning: implode() [function.implode]: Bad arguments. in D:\Apache Software Foundation\Apache2.2\htdocs\worksite\drupal-6.2\includes\database.inc on line 235.
warning: array_merge() [function.array-merge]: Argument #2 is not an array in D:\Apache Software Foundation\Apache2.2\htdocs\worksite\drupal-6.2\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 D:\Apache Software Foundation\Apache2.2\htdocs\worksite\drupal-6.2\modules\block\block.module on line 407.

As per another post, my php.ini file is set to error_reporting = E_ALL & ~E_NOTICE

These look like the errors

gpk - May 8, 2008 - 22:37

These look like the errors when you try and view the site now, right? Seems to be a problem with the superuser uid=1 not working immediately after installation. Silly question, but are cookies enabled in your browser?

What were the original errors? They would probably point to the original source of the problem.

gpk
----
www.alexoria.co.uk

Installation errors

cottonhills - May 9, 2008 - 14:51

The first 5 errors were on the Successful Installation page and no indication of what to correct. I looked at the files / lines which told me the problem must be in the DB. The users_roles table was empty. users and roles is populated.

Thank you for responding - I really appreciate some help.

Linda

I think it will be hard to

gpk - May 9, 2008 - 15:28

I think it will be hard to get much further without seeing the original errors reported on the "successful installation" (!) page - you may have to go back and try installing again to generate them again ..

gpk
----
www.alexoria.co.uk

Installation errors

cottonhills - May 9, 2008 - 17:25

Reinstalled - belowthe errors. Thanks!

warning: array_fill() [function.array-fill]: Number of elements must be positive in D:\Apache Software Foundation\Apache2.2\htdocs\worksite\drupal-6.2\includes\database.inc on line 235.
warning: implode() [function.implode]: Bad arguments. in D:\Apache Software Foundation\Apache2.2\htdocs\worksite\drupal-6.2\includes\database.inc on line 235.
warning: array_keys() [function.array-keys]: The first argument should be an array in D:\Apache Software Foundation\Apache2.2\htdocs\worksite\drupal-6.2\modules\user\user.module on line 500.
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 D:\Apache Software Foundation\Apache2.2\htdocs\worksite\drupal-6.2\modules\user\user.module on line 500.
warning: mail() [function.mail]: SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html. in D:\Apache Software Foundation\Apache2.2\htdocs\worksite\drupal-6.2\includes\mail.inc on line 193.
Unable to send e-mail. Please contact the site admin, if the problem persists.

Congratulations, Drupal has been successfully installed

Hmm am a bit out of my depth

gpk - May 9, 2008 - 18:33

Hmm am a bit out of my depth here. Seems that http://api.drupal.org/api/function/user_access/6 is called at some stage during the installation but the $account->roles array is not populated.

Possibly we should be uid 1 at this stage in any case .. am not sure.

This does look like an issue with your particular configuration - just to reiterate, are cookies enabled and working in your browser + server? As a minimum though it would be good if Drupal trapped the problem and told you what it was!

gpk
----
www.alexoria.co.uk

Installation errors - continued

cottonhills - May 9, 2008 - 18:51

Cookies are definately enabled all around. I installed Drupal in a subdirectory of a working php/mySQL site.

I tried manually adding the admin role with my user id - rid=2, uid=1 after the installation completed and the successful page displayed. That seemed to get part of it, but there appears to be something else missing as well.

Thanks!

Role 1 is for anonymous

gpk - May 9, 2008 - 19:52

Role 1 is for anonymous users, role 2 for ordinary authenticated users. These roles should be assigned to the current site visitor automatically depending on whether or not they are logged in and shouldn't appear in the {user_roles} table.

Anyway, so the same error is happening during installation as afterwards...

Also user 1 should automatically get all privileges without any roles being assigned. It seems that the uid property of $user is not getting populated properly. That all should happen during bootstrap... http://api.drupal.org/api/function/sess_read/6

I wonder if being in a subdirectory is affecting anything? Could something in the higher level .htaccess be causing a conflict? Might be worth trying a "not in a subdirectory" installation.

gpk
----
www.alexoria.co.uk

...

sepeck - May 9, 2008 - 20:08

Long shot. Try a fresh download of Drupal files. It may be that a space got introduced in a module somewhere. A search on the error shows it is a generic error. Check your database rights as well to make sure the account has the rights per the install txt

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

Installation errors

cottonhills - May 9, 2008 - 20:27

The reinstall I did this morning was from a fresh download and this time I used mySql root user/pw. Prior to that I had defined a user for this app.

I don't have the option of installing at the root of the website.

There is no other .htcaccess file for this server except the one installed by Drupal. Could this be the problem?

Linda

Just speculating really, but

gpk - May 10, 2008 - 10:38

Just speculating really, but it almost looks like sess_read() is not being called at all since, as you can see from the code, $user->roles must inevitably end up containing either the anonymous or authenticated role id.

What do you have in your {sessinons} table?

Also note:

# PHP needs the following configuration directives for Drupal to work (only directives that differ from the default php.ini-dist / php.ini-recommended):

* session.save_handler: user
* error_reporting set to E_ALL & ~E_NOTICE. Work is ongoing to change this to E_ALL for Drupal 6.
* In addition, we recommend the following setting: session.cache_limiter: nocache

# Some of these settings are contained in the default .htaccess file that ships with Drupal, so you shouldn't need to set them explicitly. Note, however, that setting PHP configuration options from .htaccess only works:

* with Apache (or a compatible web server)
* if the .htaccess file is actually read, i.e. AllowOverride is not None
* if PHP is installed as an Apache module

(from http://drupal.org/requirements). The important bit I think is the session save handler. Any clues if you run phpinfo() from your Drupal top-level folder?

gpk
----
www.alexoria.co.uk

 
 

Drupal is a registered trademark of Dries Buytaert.