Can't run update.php

Created on 1 September 2022, over 2 years ago
Updated 13 September 2023, over 1 year ago

I have drupal installed in a subdirectory on my server for my main domain, and have set up rules in .htaccess as follows:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.org$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.domain.org$
RewriteCond %{REQUEST_URI} !directory/web/
RewriteRule (.*) /directory/web/$1 [L]

When logged in as the site administrator I get the following error message whenever I try to run update.php

"In order to run update.php you need to either have "Administer software updates" permission or have set $settings['update_free_access'] in your settings.php."

The issue disappears if, instead of using the rewrite rules I assign a subdomain to point to the drupal directory and access update.php via the subdomain, however I don't particularly want to keep a subdomain in operation simply to be able to run database updates. Is there another fix?

πŸ’¬ Support request
Status

Closed: outdated

Version

9.4

Component
Database updateΒ  β†’

Last updated 4 days ago

No maintainer
Created by

πŸ‡¬πŸ‡§United Kingdom markporter

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States barbarae

    I am having this problem - I have "Administer software updates" privilege (I am an administrator - in fact it is my site and I created it) but I get the error message "In order to run update.php you need to either have "Administer software updates" permission or have set $settings['update_free_access'] in your settings.php."

  • @barbarae Is the site set up equivalently to the one in the issue summary?

Production build 0.71.5 2024