Upgrade from Owncloud to Nextcloud and now no web access but apps access cloud fine

I keep getting this on trying to do web access to the site:

Internal Server Error

The server encountered an internal error and was unable to complete your request.

Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.

More details can be found in the server log.

Technical details

Remote Address: 172.16.8.1
Request ID: ZJQlqO0lVIcTtqB8r6p9

Look in Log and this is the lines for that ID:

{“reqId”:“ZJQlqO0lVIcTtqB8r6p9”,“remoteAddr”:“172.16.8.1”,“app”:“PHP”,“message”:“session_name(): session.name cannot be a numeric or empty ‘’ at /var/www/html/owncloud/lib/private/session/internal.php#42”,“level”:3,“time”:"June 21, 2$
{“reqId”:“ZJQlqO0lVIcTtqB8r6p9”,“remoteAddr”:“172.16.8.1”,“app”:“index”,“message”:“Exception: {“Exception”:“Exception”,“Message”:“Session has been closed - no further changes to the session are allowed”,“Code”:0,“Trace”:”#0 \/$

What is this?

Can you try cleaning your cookies in your browser? Also please post your sanitized config file.

Removed cache/cookies no change.

Here is the config.php,

<?php $CONFIG = array ( 'instanceid' => '', 'passwordsalt' => '???????????', 'trusted_domains' => array ( 0 => 'simpletechsol.com', 1 => 'localhost', ), 'datadirectory' => '/owncloud/data', 'version' => '9.0.50.0', 'dbtype' => 'mysql', 'dbhost' => 'localhost', 'dbname' => 'owncloud', 'dbuser' => '???????', 'dbpassword' => '?????', 'dbtableprefix' => 'oc_', 'dbdriveroptions' => array ( 1012 => '/file/path/to/ca_cert.pem', ), 'installed' => true, 'default_language' => 'en', 'defaultapp' => 'files', 'knowledgebaseenabled' => true, 'enable_avatars' => true, 'allow_user_to_change_display_name' => true, 'remember_login_cookie_lifetime' => 1296000, 'session_lifetime' => 86400, 'session_keepalive' => true, 'skeletondirectory' => '', 'user_backends' => array ( 0 => array ( 'class' => 'OC_User_IMAP', 'arguments' => array ( 0 => '{imap.gmail.com:993/imap/ssl}INBOX', ), ), ), 'mail_domain' => 'simpletechsol.com', 'mail_from_address' => 'owncloud', 'mail_smtpdebug' => false, 'mail_smtpmode' => 'smtp', 'mail_smtphost' => '10.16.8.142', 'mail_smtpport' => '465', 'mail_smtptimeout' => 10, 'overwritehost' => '', 'overwriteprotocol' => '', 'overwritewebroot' => '', 'overwritecondaddr' => '', 'overwrite.cli.url' => 'https://simpletechsol.com/owncloud', 'proxy' => '', 'proxyuserpwd' => '', 'trashbin_retention_obligation' => '30, auto', 'appcodechecker' => false, 'updatechecker' => true, 'has_internet_connection' => true, 'check_for_working_webdav' => true, 'check_for_working_htaccess' => true, 'config_is_read_only' => false, 'log_type' => 'owncloud', 'logfile' => 'owncloud.log', 'loglevel' => 2, 'logdateformat' => 'F d, Y H:i:s', 'logtimezone' => 'America/New_York', 'log_query' => false, 'cron_log' => true, 'log_rotate_size' => 1048576000, '3rdpartyroot' => '', '3rdpartyurl' => '', 'customclient_desktop' => 'http://owncloud.org/sync-clients/', 'customclient_android' => 'https://play.google.com/store/apps/details?id=com.owncloud.android', 'customclient_ios' => 'https://itunes.apple.com/us/app/owncloud/id543672169?mt=8', 'appstoreenabled' => true, 'appstoreurl' => 'https://api.owncloud.com/v1', 'apps_paths' => array ( 'path' => '/var/www/html/owncloud/apps', 'url' => '/apps', 'writable' => true, ), ), 'enable_previews' => true, 'preview_max_x' => NULL, 'preview_max_y' => NULL, 'preview_max_scale_factor' => 10, 'preview_libreoffice_path' => '/usr/bin/libreoffice', 'preview_office_cl_parameters' => ' --headless --nologo --nofirststartwizard --invisible --norestore -convert-to pdf -outdir ', 'enabledPreviewProviders' => array ( 0 => 'OC\\Preview\\Image', 1 => 'OC\\Preview\\MP3', 2 => 'OC\\Preview\\TXT', 3 => 'OC\\Preview\\MarkDown', ), 'maintenance' => false, 'singleuser' => false, 'forcessl' => true, 'openssl' => array ( 'config' => '/usr/lib/ssl/openssl.cnf', ), 'blacklisted_files' => array ( 0 => '.htaccess', ), 'share_folder' => '/', 'theme' => '', 'xframe_restriction' => true, 'cipher' => 'AES-256-CFB', 'memcached_servers' => array ( 0 => array ( 0 => 'localhost', 1 => 11211, ), ), 'cache_path' => '', 'quota_include_external_storage' => false, 'filesystem_check_changes' => 1, 'asset-pipeline.enabled' => false, 'mount_file' => '/owncloud/data/mount.json', 'filesystem_cache_readonly' => false, 'supportedDatabases' => array ( 0 => 'sqlite', 1 => 'mysql', 2 => 'pgsql', 3 => 'oci', 4 => 'mssql', ), 'custom_csp_policy' => 'default-src \'self\'; script-src \'self\' \'unsafe-eval\'; style-src \'self\' \'unsafe-inline\'; frame-src *; img-src *; font-src \'self\' data:; media-src *', 'secret' => '???????', 'mail_smtpauth' => 1, 'mail_smtpname' => 'MailUser', 'mail_smtppassword' => '????', 'appstore.experimental.enabled' => true, 'mail_smtpauthtype' => 'GUESS', 'mail_smtpsecure' => 'ssl',

Why have you configured so many values? It is highly recommended to not adjust any values that you don’t necessarily want to adjust. Also is your instanceid really an empty string? :see_no_evil:

1 Like

The values came from configuration of added apps, yes the instance ID is as you see it. I have not touched it or changed it. Appears it has been that way for sometime looking at backups.

I have used Owncloud from version 5 to 8.2 which now is updated to Nextcloud 9.0.51 .

I had to use htaccess from owncloud to make it work as htaccess from nextclod caused internal server error
have not had chance to see WHY though
course i had to disable code integrity check as any alterations to htaccess give stupid warnings

1 Like

Is there a way to generate an instance id or recover the original? I have looked thru every back up and see no instance id in the config.php since owncloud 7.

Anyone have any ideas?

Technically you can just create one randomly (clients might resync though etc.).

HOWEVER, that you have none indicates that you have copied the sample config at some point.

I did upon an issue with owncloud back at version 6 does the id require anything or just random number and letters? Is this what is causing the error?

That fixed thank you sir…

This worked for me too. Not sure why the Nextcloud .htaccess file throws the Internal Server Error

This got mine working but now have the code integrity error and can not get to the admin panel. I click on it and it is all white.