Can't upgrade to 9.0.1 (daily) in CentOS 6.6 #24276

Closed
jvillafanez opened this Issue Apr 26, 2016 · 5 comments

Projects

None yet

3 participants

@jvillafanez
Contributor

Steps to reproduce

  1. Install any 8.2.x OC version in CentOS 6.6
  2. Make sure httpd version is 2.2.15 (this should be the default package for CentOS 6.6)
  3. Upgrade to stable9

Expected behaviour

Upgrade is succesfull and users can keep on using ownCloud

Actual behaviour

Upgrade works, but ownCloud can't be used

Server configuration

Operating system: CentOS 6.6

Web server: httpd 2.2.15

Database: mysql

PHP version: PHP 5.4.16

ownCloud version: 9.0.1 2016-04-26T03:20:01+00:00 6c861f7

Updated from an older ownCloud or fresh install: updated from 8.2.1

Logs

Web server error log

[Tue Apr 26 10:27:03 2016] [alert] [client 10.0.2.4] /var/www/html/owncloud/.htaccess: RewriteBase takes one argument, the base URL of the per-directory context
[Tue Apr 26 10:27:03 2016] [alert] [client 10.0.2.4] /var/www/html/owncloud/.htaccess: RewriteBase takes one argument, the base URL of the per-directory context
[Tue Apr 26 10:27:50 2016] [alert] [client 10.0.2.4] /var/www/html/owncloud/.htaccess: RewriteBase takes one argument, the base URL of the per-directory context
[Tue Apr 26 10:27:51 2016] [alert] [client 10.0.2.4] /var/www/html/owncloud/.htaccess: RewriteBase takes one argument, the base URL of the per-directory context
[Tue Apr 26 10:27:51 2016] [alert] [client 10.0.2.4] /var/www/html/owncloud/.htaccess: RewriteBase takes one argument, the base URL of the per-directory context

ownCloud log (data/owncloud.log)

(nothing related)

.htaccess file

<IfModule mod_headers.c>
  <IfModule mod_setenvif.c>
    <IfModule mod_fcgid.c>
       SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1
       RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION
    </IfModule>
    <IfModule mod_proxy_fcgi.c>
       SetEnvIfNoCase Authorization "(.+)" HTTP_AUTHORIZATION=$1
    </IfModule>
  </IfModule>

  <IfModule mod_env.c>
    # Add security and privacy related headers
    Header set X-Content-Type-Options "nosniff"
    Header set X-XSS-Protection "1; mode=block"
    Header set X-Robots-Tag "none"
    Header set X-Frame-Options "SAMEORIGIN"
    Header set X-Download-Options "noopen"
    Header set X-Permitted-Cross-Domain-Policies "none"
    SetEnv modHeadersAvailable true
  </IfModule>

  # Add cache control for CSS and JS files
  <FilesMatch "\.(css|js)$">
    Header set Cache-Control "max-age=7200, public"
  </FilesMatch>
</IfModule>
<IfModule mod_php5.c>
  php_value upload_max_filesize 513M
  php_value post_max_size 513M
  php_value memory_limit 512M
  php_value mbstring.func_overload 0
  php_value always_populate_raw_post_data -1
  php_value default_charset 'UTF-8'
  php_value output_buffering 0
  <IfModule mod_env.c>
    SetEnv htaccessWorking true
  </IfModule>
</IfModule>
<IfModule mod_php7.c>
  php_value upload_max_filesize 513M
  php_value post_max_size 513M
  php_value memory_limit 512M
  php_value mbstring.func_overload 0
  php_value default_charset 'UTF-8'
  php_value output_buffering 0
  <IfModule mod_env.c>
    SetEnv htaccessWorking true
  </IfModule>
</IfModule>
<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  RewriteRule ^\.well-known/host-meta /public.php?service=host-meta [QSA,L]
  RewriteRule ^\.well-known/host-meta\.json /public.php?service=host-meta-json [QSA,L]
  RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L]
  RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L]
  RewriteRule ^remote/(.*) remote.php [QSA,L]
  RewriteRule ^(build|tests|config|lib|3rdparty|templates)/.* - [R=404,L]
  RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.*
  RewriteRule ^(\.|autotest|occ|issue|indie|db_|console).* - [R=404,L]

  # Rewrite rules for `front_controller_active`
  Options -MultiViews
  RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]
  RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]
  RewriteCond %{REQUEST_FILENAME} !\.(css|js|svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$
  RewriteCond %{REQUEST_FILENAME} !core/img/favicon.ico$
  RewriteCond %{REQUEST_FILENAME} !/remote.php
  RewriteCond %{REQUEST_FILENAME} !/public.php
  RewriteCond %{REQUEST_FILENAME} !/cron.php
  RewriteCond %{REQUEST_FILENAME} !/core/ajax/update.php
  RewriteCond %{REQUEST_FILENAME} !/status.php
  RewriteCond %{REQUEST_FILENAME} !/ocs/v1.php
  RewriteCond %{REQUEST_FILENAME} !/ocs/v2.php
  RewriteCond %{REQUEST_FILENAME} !/updater/
  RewriteCond %{REQUEST_FILENAME} !/ocs-provider/
  RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.*
</IfModule>
<IfModule mod_mime.c>
  AddType image/svg+xml svg svgz
  AddEncoding gzip svgz
</IfModule>
<IfModule mod_dir.c>
  DirectoryIndex index.php index.html
</IfModule>
AddDefaultCharset utf-8
Options -Indexes
<IfModule pagespeed_module>
  ModPagespeed Off
</IfModule>
#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####

ErrorDocument 403 /core/templates/403.php
ErrorDocument 404 /core/templates/404.php
<IfModule mod_rewrite.c>
  RewriteRule . index.php [PT,E=PATH_INFO:$1]
  RewriteBase 
  <IfModule mod_env.c>
    SetEnv front_controller_active true
    <IfModule mod_dir.c>
      DirectorySlash off
    </IfModule>
  </IfModule>
</IfModule>

Additional notes

  • Same thing in ubuntu 14.04 (apache 2.4.7) works fine
@jvillafanez jvillafanez added this to the 9.0.2-current-maintenance milestone Apr 26, 2016
@nickvergessen
Contributor

@LukasReschke I guess empty "RewriteBase" needs a fix?

@LukasReschke
Member

@jvillafanez Please post your config file.

@jvillafanez
Contributor

config.php

<?php
$CONFIG = array (
  'supportedDatabases' => 
  array (
    0 => 'mysql',
    1 => 'pgsql',
  ),
  'trusted_domains' => 
  array (
    1 => '10.0.2.6',
  ),
  'overwrite.cli.url' => 'http://10.0.2.6',
  'instanceid' => 'oc3lxlt4j3po',
  'passwordsalt' => 'aJm7Rd0hldOg8ULWJ8RyJQG+7ZQ2vJ',
  'secret' => 'Q07Y2LXlOEjDqUPQwFQByYQ75bhJOQW+ER+pCa0cDlLCGgcp',
  'datadirectory' => '/var/www/html/owncloud/data',
  'dbtype' => 'mysql',
  'version' => '9.0.1.3',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => '',
  'dbuser' => 'oc_admin',
  'dbpassword' => '6nfs0hbguKC87dWKs5RICoWQzM8/IJ',
  'logtimezone' => 'UTC',
  'installed' => true,
  'updatechecker' => false,
  'loglevel' => 2,
  'maintenance' => false,
);
@LukasReschke
Member

Ok. That's what I suspected, nasty bug. Thanks @jvillafanez for catching this.

The reason here is that overwrite.cli.url has no ending slash. I will add more logic for this to the code. PR incoming…

@LukasReschke
Member

Patch is at #24277

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment