Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several incompatibilites with PHP 8.0 #25806

Closed
TheColin21 opened this issue Feb 26, 2021 · 15 comments
Closed

Several incompatibilites with PHP 8.0 #25806

TheColin21 opened this issue Feb 26, 2021 · 15 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug needs info technical debt

Comments

@TheColin21
Copy link

TheColin21 commented Feb 26, 2021

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Install/Upgrade Nextcloud 21
  2. Activate PHP 8
  3. Watch the log grow

Expected behaviour

not that many errors

Actual behaviour

following errors showing up in the log repeatedly:

Error: Required parameter $internalPath follows optional parameter $mountId at /path/to/cloud/lib/private/Files/Config/CachedMountFileInfo.php#34

Error: Required parameter $tagManager follows optional parameter $fileIdentifier at /path/to/cloud/apps/files/lib/Helper.php#220

Error: The method "setFormatter" is deprecated. Use "setOutputStyle" instead. at /path/to/cloud/3rdparty/scssphp/scssphp/src/Compiler.php#5177

Error: Formatters other than Expanded and Compressed are deprecated. at /path/to/cloud/3rdparty/scssphp/scssphp/src/Compiler.php#5175

Error: Ignoring Sass errors is not longer supported. at /path/to/cloud/3rdparty/scssphp/scssphp/src/Compiler.php#5530

Error: ob_end_clean(): Failed to delete buffer. No buffer to delete at /path/to/cloud/lib/private/Files/View.php#449

Error: usort(): Returning bool from comparison function is deprecated, return an integer less than, equal to, or greater than zero at /path/to/cloud/lib/public/AppFramework/Http/Template/PublicTemplateResponse.php#101

Server configuration

Operating system: Ubuntu 20.04

Web server: Apache

Database: MariaDB 10.5.9

PHP version: 8.0.2

Nextcloud version: (see Nextcloud admin page) 21.0.0

Updated from an older Nextcloud/ownCloud or fresh install: Update from 20.0.8

Where did you install Nextcloud from: official website

Signing status:

Signing status No errors have been found.

List of activated apps:

App list Enabled: - accessibility: 1.7.0 - activity: 2.14.3 - admin_audit: 1.11.0 - breezedark: 21.0.1 - camerarawpreviews: 0.7.10 - checksum: 1.0.1 - cloud_federation_api: 1.4.0 - comments: 1.11.0 - contactsinteraction: 1.2.0 - dashboard: 7.1.0 - dav: 1.17.1 - documentserver_community: 0.1.9 - extract: 1.3.1 - federatedfilesharing: 1.11.0 - federation: 1.11.0 - files: 1.16.0 - files_antivirus: 3.1.2 - files_downloadactivity: 1.10.0 - files_external: 1.12.0 - files_pdfviewer: 2.1.0 - files_rightclick: 1.0.0 - files_sharing: 1.13.1 - files_texteditor: 2.14.0 - files_trashbin: 1.11.0 - files_versions: 1.14.0 - files_videoplayer: 1.10.0 - firstrunwizard: 2.10.0 - imageconverter: 1.3.1 - impersonate: 1.8.0 - logreader: 2.6.0 - lookup_server_connector: 1.9.0 - mail: 1.8.3 - maps: 0.1.8 - notifications: 2.9.0 - oauth2: 1.9.0 - onlyoffice: 6.3.0 - password_policy: 1.11.0 - passwords: 2021.2.0 - photos: 1.3.0 - previewgenerator: 3.1.1 - privacy: 1.5.0 - provisioning_api: 1.11.0 - recommendations: 1.0.0 - serverinfo: 1.11.0 - settings: 1.3.0 - sharebymail: 1.11.0 - spreed: 11.0.0 - support: 1.4.0 - survey_client: 1.9.0 - systemtags: 1.11.0 - text: 3.2.0 - theming: 1.12.0 - twofactor_backupcodes: 1.10.0 - updatenotification: 1.11.0 - user_ldap: 1.11.0 - user_status: 1.1.1 - viewer: 1.5.0 - weather_status: 1.1.0 - workflowengine: 2.3.0 Disabled: - bruteforcesettings - encryption - facerecognition - files_fulltextsearch - fulltextsearch - fulltextsearch_elasticsearch - nextcloud_announcements - ransomware_protection

Nextcloud configuration:

Config report { "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "cloud.clnp.eu", "cloud.saef-zf.de" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "21.0.0.18", "overwrite.cli.url": "https:\/\/cloud.clnp.eu", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "mail_smtpmode": "sendmail", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "memcache.local": "\\OC\\Memcache\\APCu", "updater.release.channel": "stable", "loglevel": 0, "maintenance": false, "theme": "", "app_install_overwrite": [ "camerarawpreviews", "files_texteditor", "extract", "documentserver_community", "ocdownloader" ], "ldapIgnoreNamingRules": false, "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory", "default_language": "de", "default_locale": "de", "default_phone_region": "DE" } }

Are you using external storage, if yes which one: local/smb/sftp/...
local, sftp, nextcloud
Are you using encryption: yes/no
no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no

@florian-hild
Copy link

Same issue with nc21 and:

root@nextcloud:~# nginx -version
nginx version: nginx/1.19.7
root@nextcloud:~# php -version
PHP 8.0.2 (cli) (built: Feb 23 2021 15:14:40) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.2, Copyright (c), by Zend Technologies
root@nextcloud:~# mariadb --version
mariadb  Ver 15.1 Distrib 10.5.8-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

@kesselb
Copy link
Contributor

kesselb commented Mar 10, 2021

Error: The method "setFormatter" is deprecated. Use "setOutputStyle" instead. at /path/to/cloud/3rdparty/scssphp/scssphp/src/Compiler.php#5177

Error: Formatters other than Expanded and Compressed are deprecated. at /path/to/cloud/3rdparty/scssphp/scssphp/src/Compiler.php#5175

Error: Ignoring Sass errors is not longer supported. at /path/to/cloud/3rdparty/scssphp/scssphp/src/Compiler.php#5530`

#26030

@PVince81 PVince81 added technical debt 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Mar 11, 2021
@julian70400
Copy link

same here with nc 21 :

PHP 8.0.3 (cli) (built: Mar 5 2021 08:38:30) ( NTS )
nginx version: nginx/1.14.2

@Mic-Pod
Copy link

Mic-Pod commented Apr 8, 2021

Ubuntu Server 18.04.5 + apache 2.4.46 + php 8.0.3 + NC 21.0.1
Errors:

  • Error: The "Symfony\Component\Translation\PluralizationRules" class is deprecated since Symfony 4.2. at /var/www/nextcloud/3rdparty/symfony/translation/PluralizationRules.php#38
  • Required parameter $internalPath follows optional parameter $mountId at /var/www/nextcloud/lib/private/Files/Config/CachedMountFileInfo.php#34
  • Required parameter $tagManager follows optional parameter $fileIdentifier at /var/www/nextcloud/apps/files/lib/Helper.php#220

@julian70400
Copy link

It seem that NC21 is not production ready for PHP 8.0.*

@stavros-k
Copy link

stavros-k commented May 8, 2021

NC 21.0.2 RC1 - PHP8

Unraid OS
Database: pgsql 13.2
Web server: Nginx
Using this docker: https://hub.docker.com/layers/linuxserver/nextcloud/php8/images/sha256-a806913e93f984db171d39bee896201b8a47802fa0390ed87d843cd04a5bf597?context=explore
PHP ver: 8.0.2

Deprecations

  • Error | PHP | Error: Function openssl_free_key() is deprecated at /config/www/nextcloud/apps/nextcloud_announcements/lib/Cron/Crawler.php#177

Errors

  • Error | PHP | Required parameter $owner follows optional parameter $order at /config/www/nextcloud/apps/deck/lib/Service/CardService.php#271
  • Error | PHP | Error: session_start(): Ignoring session_start() because a session is already active at /config/www/nextcloud/lib/private/Session/Internal.php#207
  • Error | PHP | Error: filesize(): stat failed for /data/flow.log at /config/www/nextcloud/lib/public/Log/RotationTrait.php#62

@ghost
Copy link

ghost commented May 27, 2021

Also happens on PHP 7.4

{"reqId":"imOYxaS3XldGehA38zwg","level":3,"time":"2021-05-27T19:05:02+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":{"Exception":"Error","Message":"Required parameter $tagManager follows optional parameter $fileIdentifier at /var/www/nextcloud/apps/files/lib/Helper.php#220","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/composer/composer/ClassLoader.php","line":478,"function":"onError","class":"OC\Log\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/lib/composer/composer/ClassLoader.php","line":478,"function":"include"},{"file":"/var/www/nextcloud/lib/composer/composer/ClassLoader.php","line":346,"function":"Composer\Autoload\includeFile"},{"file":"/var/www/nextcloud/apps/files_trashbin/lib/Helper.php","line":109,"function":"loadClass","class":"Composer\Autoload\ClassLoader","type":"->"},{"file":"/var/www/nextcloud/apps/files_trashbin/lib/Trashbin.php","line":831,"function":"getTrashFiles","class":"OCA\Files_Trashbin\Helper","type":"::"},{"file":"/var/www/nextcloud/apps/files_trashbin/lib/Command/Expire.php","line":58,"function":"expire","class":"OCA\Files_Trashbin\Trashbin","type":"::"},{"file":"/var/www/nextcloud/lib/private/Command/CommandJob.php","line":36,"function":"handle","class":"OCA\Files_Trashbin\Command\Expire","type":"->"},{"file":"/var/www/nextcloud/lib/private/BackgroundJob/Job.php","line":52,"function":"run","class":"OC\Command\CommandJob","type":"->"},{"file":"/var/www/nextcloud/lib/private/BackgroundJob/QueuedJob.php","line":46,"function":"execute","class":"OC\BackgroundJob\Job","type":"->"},{"file":"/var/www/nextcloud/cron.php","line":128,"function":"execute","class":"OC\BackgroundJob\QueuedJob","type":"->"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"userAgent":"--","version":"21.0.2.1","id":"60b003f576ecc"}

This was referenced May 29, 2021
backportbot-nextcloud bot pushed a commit that referenced this issue Jun 7, 2021
PHP 8 shows deprecation warnings about this, see #25806
Removes the "default" values, as they actually are required parameters anyway.

Signed-off-by: Richard de Boer <[email protected]>
backportbot-nextcloud bot pushed a commit that referenced this issue Jun 7, 2021
…eger

PHP 8 shows deprecation warnings about this, see #25806

Signed-off-by: Richard de Boer <[email protected]>
@leuedaniel
Copy link

leuedaniel commented Jun 23, 2021

Also this error with php8.0.7 every hour at the same time

{"reqId":"Vj8YI3H9I8nkSIujb9ld","level":3,"time":"2021-06-23T15:35:01+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":{"Exception":"TypeError","Message":"Unsupported operand types: int & array","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Files/Cache/Wrapper/CacheWrapper.php","line":74,"function":"formatCacheEntry","class":"OC\Files\Cache\Wrapper\CachePermissionsMask","type":"->"},{"file":"/var/www/html/apps/groupfolders/lib/Versions/VersionsBackend.php","line":170,"function":"get","class":"OC\Files\Cache\Wrapper\CacheWrapper","type":"->"},{"function":"OCA\GroupFolders\Versions\{closure}","class":"OCA\GroupFolders\Versions\VersionsBackend","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/apps/groupfolders/lib/Versions/VersionsBackend.php","line":169,"function":"array_map"},{"file":"/var/www/html/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php","line":64,"function":"getAllVersionedFiles","class":"OCA\GroupFolders\Versions\VersionsBackend","type":"->"},{"file":"/var/www/html/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php","line":58,"function":"expireFolder","class":"OCA\GroupFolders\Versions\GroupVersionsExpireManager","type":"->"},{"file":"/var/www/html/apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php","line":40,"function":"expireAll","class":"OCA\GroupFolders\Versions\GroupVersionsExpireManager","type":"->"},{"file":"/var/www/html/lib/private/BackgroundJob/Job.php","line":52,"function":"run","class":"OCA\GroupFolders\BackgroundJob\ExpireGroupVersions","type":"->"},{"file":"/var/www/html/lib/private/BackgroundJob/TimedJob.php","line":59,"function":"execute","class":"OC\BackgroundJob\Job","type":"->"},{"file":"/var/www/html/cron.php","line":128,"function":"execute","class":"OC\BackgroundJob\TimedJob","type":"->"}],"File":"/var/www/html/lib/private/Files/Cache/Wrapper/CachePermissionsMask.php","Line":44,"CustomMessage":"Error while running background job (class: OCA\GroupFolders\BackgroundJob\ExpireGroupVersions, arguments: )"},"userAgent":"--","version":"21.0.2.1"}

Think its this issue nextcloud/groupfolders#1464

@yan12125
Copy link
Contributor

Error | PHP | Error: session_start(): Ignoring session_start() because a session is already active at /config/www/nextcloud/lib/private/Session/Internal.php#207

As a record, this is fixed in #27631

@szaimen
Copy link
Contributor

szaimen commented Jan 23, 2023

Hi, please update to 24.0.9 or better 25.0.3 and report back if it fixes the issue. Thank you!

My goal is to add a label like e.g. 25-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort!

If you don't manage to reproduce the issue in time and the issue gets closed but you can reproduce the issue afterwards, feel free to create a new bug report with up-to-date information by following this link: https://github.com/nextcloud/server/issues/new?assignees=&labels=bug%2C0.+Needs+triage&template=BUG_REPORT.yml&title=%5BBug%5D%3A+

@szaimen szaimen added needs info 0. Needs triage Pending check for reproducibility or if it fits our roadmap and removed 2. developing Work in progress labels Jan 23, 2023
@ghost
Copy link

ghost commented Jan 23, 2023

I have not seen this error on NC25.0.3

@szaimen
Copy link
Contributor

szaimen commented Jan 23, 2023

Thanks for verifying!

@szaimen szaimen closed this as completed Jan 23, 2023
@iw0nderhow
Copy link

I updated some days ago and am still seeing the session_start error - I'm on FPM 8.1.

[PHP] Fehler: Error: session_start(): Ignoring session_start() because a session is already active at /var/www/html/lib/private/Session/Internal.php#219 at <<closure>>

 0. <<closure>>
    OC\Log\ErrorHandler::onAll()
 1. <<closure>>
    session_start()
 2. /var/www/html/lib/private/Session/Internal.php line 219
    call_user_func_array()
 3. /var/www/html/lib/private/Session/Internal.php line 233
    OC\Session\Internal->invoke()
 4. /var/www/html/lib/private/Session/Internal.php line 110
    OC\Session\Internal->startSession()
 5. /var/www/html/lib/private/Session/CryptoSessionData.php line 161
    OC\Session\Internal->clear()
 6. /var/www/html/lib/private/User/Session.php line 939
    OC\Session\CryptoSessionData->clear()
 7. /var/www/html/lib/private/AppFramework/Middleware/Security/CORSMiddleware.php line 94
    OC\User\Session->logout()
 8. /var/www/html/lib/private/AppFramework/Middleware/MiddlewareDispatcher.php line 97
    OC\AppFramework\Middleware\Security\CORSMiddleware->beforeController()
 9. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 125
    OC\AppFramework\Middleware\MiddlewareDispatcher->beforeController()
10. /var/www/html/lib/private/AppFramework/App.php line 172
    OC\AppFramework\Http\Dispatcher->dispatch()
11. /var/www/html/lib/private/Route/Router.php line 298
    OC\AppFramework\App::main()
12. /var/www/html/lib/base.php line 1047
    OC\Route\Router->match()
13. /var/www/html/index.php line 36
    OC::handleRequest()

GET /index.php/apps/notes/api/v1/notes?pruneBefore=1674472533
from 192.168.2.58 at 2023-01-23T23:53:56+00:00

@szaimen
Copy link
Contributor

szaimen commented Jan 24, 2023

Can you please open a new issue about this with up-to-date information? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug needs info technical debt
Projects
None yet
Development

No branches or pull requests

13 participants