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

Not playing video when use PHP 7 on shared links #25483

Closed
null31 opened this Issue Jul 15, 2016 · 4 comments

Comments

Projects
None yet
3 participants
@null31

null31 commented Jul 15, 2016

Steps to reproduce

  1. Open a shared link that is a video (webm/mp4)
  2. Trying to reproduce a video
  3. Nothing happens
  4. Get a error: "No video with supported format and MIME type found."

Expected behaviour

The video playing without problems

Actual behaviour

Return a error in the browser (Firefox): No video with supported format and MIME type found.
On Chrome stay a blank square

Server configuration

Operating system:
CentOS 7
Web server:
Nginx 1.11.2
Database:
MariaDB 10.0.26
PHP version:
PHP 7.0.8
ownCloud version:
9.0.3 (stable)
Updated from an older ownCloud or fresh install:
Fresh install
Where did you install ownCloud from:
owncloud.org > Archive File
Signing status (ownCloud 9.0 and above):

No errors have been found.

List of activated apps:

  - activity: 2.2.1
  - comments: 0.2
  - dav: 0.1.6
  - federatedfilesharing: 0.1.0
  - federation: 0.0.4
  - files: 1.4.4
  - files_pdfviewer: 0.8.1
  - files_sharing: 0.9.1
  - files_texteditor: 2.1
  - files_trashbin: 0.8.0
  - files_versions: 1.2.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 14.5.0
  - notifications: 0.2.3
  - provisioning_api: 0.4.1
  - systemtags: 0.2
  - templateeditor: 0.1
  - updatenotification: 0.1.0

The content of config/config.php:

{
    "system": {
        "instanceid": "oc9whiqux99m",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "\/home\/www-data\/public_html\/owncloud\/data",
        "overwrite.cli.url": "https:\/\/cloud.rwx.moe",
        "dbtype": "mysql",
        "version": "9.0.3",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    },
    "apps": {
        "activity": {
            "enabled": "yes",
            "installed_version": "2.2.1",
            "types": "filesystem"
        },
        "backgroundjob": {
            "lastjob": "1"
        },
        "comments": {
            "enabled": "yes",
            "installed_version": "0.2",
            "types": "logging"
        },
        "core": {
            "OC_Channel": "stable",
            "installedat": "1468550928.943",
            "lastcron": "1468557070",
            "lastupdateResult": "[]",
            "lastupdatedat": "1468557068",
            "oc.integritycheck.checker": "[]",
            "public_files": "files_sharing\/public.php",
            "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
            "remote_caldav": "dav\/appinfo\/v1\/caldav.php",
            "remote_calendar": "dav\/appinfo\/v1\/caldav.php",
            "remote_carddav": "dav\/appinfo\/v1\/carddav.php",
            "remote_contacts": "dav\/appinfo\/v1\/carddav.php",
            "remote_dav": "dav\/appinfo\/v2\/remote.php",
            "remote_files": "dav\/appinfo\/v1\/webdav.php",
            "remote_webdav": "dav\/appinfo\/v1\/webdav.php",
            "shareapi_allow_public_upload": "no",
            "umgmt_send_email": "false",
            "umgmt_show_backend": "true",
            "umgmt_show_email": "true",
            "umgmt_show_last_login": "true",
            "umgmt_show_storage_location": "true",
            "updater.secret.created": "1468556405"
        },
        "dav": {
            "enabled": "yes",
            "installed_version": "0.1.6",
            "types": "filesystem"
        },
        "federatedfilesharing": {
            "enabled": "yes",
            "installed_version": "0.1.0",
            "types": ""
        },
        "federation": {
            "enabled": "yes",
            "installed_version": "0.0.4",
            "types": "authentication"
        },
        "files": {
            "cronjob_scan_files": "500",
            "enabled": "yes",
            "installed_version": "1.4.4",
            "types": "filesystem"
        },
        "files_pdfviewer": {
            "enabled": "yes",
            "installed_version": "0.8.1",
            "ocsid": "166049",
            "types": ""
        },
        "files_sharing": {
            "enabled": "yes",
            "installed_version": "0.9.1",
            "types": "filesystem"
        },
        "files_texteditor": {
            "enabled": "yes",
            "installed_version": "2.1",
            "ocsid": "166051",
            "types": ""
        },
        "files_trashbin": {
            "enabled": "yes",
            "installed_version": "0.8.0",
            "types": "filesystem"
        },
        "files_versions": {
            "enabled": "yes",
            "installed_version": "1.2.0",
            "types": "filesystem"
        },
        "files_videoplayer": {
            "enabled": "yes",
            "installed_version": "0.9.8",
            "types": ""
        },
        "firstrunwizard": {
            "enabled": "yes",
            "installed_version": "1.1",
            "ocsid": "166055",
            "types": ""
        },
        "gallery": {
            "enabled": "yes",
            "installed_version": "14.5.0",
            "types": ""
        },
        "notifications": {
            "enabled": "yes",
            "installed_version": "0.2.3",
            "types": "logging"
        },
        "provisioning_api": {
            "enabled": "yes",
            "installed_version": "0.4.1",
            "types": "prevent_group_restriction"
        },
        "systemtags": {
            "enabled": "yes",
            "installed_version": "0.2",
            "types": "logging"
        },
        "templateeditor": {
            "enabled": "yes",
            "installed_version": "0.1",
            "types": ""
        },
        "updatenotification": {
            "enabled": "yes",
            "installed_version": "0.1.0",
            "types": ""
        }
    }
}

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

Client configuration

Browser:
Firefox 47
Chrome 51.0.2704.106 (64-bit)
Operating system:
Ubuntu 16.04

Logs

Web server error log

Nothing

ownCloud log (data/owncloud.log)

{"reqId":"OeJFK4fngwft3eJbV7J0","remoteAddr":"131","app":"PHP","message":"Error: Call to undefined function split() at \/home\/www-data\/public_html\/owncloud\/lib\/private\/files.php#194","level":3,"time":"2016-07-15T03:32:15+00:00","method":"GET","url":"\/s\/szGPwEMaW1n32ej\/download","user":"--"}
{"reqId":"eOwJLhA9Z5y85X\/0wMLE","remoteAddr":"131","app":"PHP","message":"Error: Call to undefined function split() at \/home\/www-data\/public_html\/owncloud\/lib\/private\/files.php#194","level":3,"time":"2016-07-15T03:32:30+00:00","method":"GET","url":"\/s\/szGPwEMaW1n32ej\/download","user":"--"}
{"reqId":"asKw0Q\/jg5JSfQPRyyKv","remoteAddr":"131","app":"PHP","message":"Error: Call to undefined function split() at \/home\/www-data\/public_html\/owncloud\/lib\/private\/files.php#194","level":3,"time":"2016-07-15T03:32:44+00:00","method":"GET","url":"\/s\/szGPwEMaW1n32ej\/download","user":"--"}
{"reqId":"hoQF\/1KczN1L+ggaE05D","remoteAddr":"131.","app":"PHP","message":"Error: Call to undefined function split() at \/home\/www-data\/public_html\/owncloud\/lib\/private\/files.php#194","level":3,"time":"2016-07-15T03:33:28+00:00","method":"GET","url":"\/s\/UvZ3YenRzKi5dsY\/download","user":"--"}
{"reqId":"EqtcslZ6l07wIMd7\/05R","remoteAddr":"131.","app":"PHP","message":"Error: Call to undefined function split() at \/home\/www-data\/public_html\/owncloud\/lib\/private\/files.php#194","level":3,"time":"2016-07-15T03:33:47+00:00","method":"GET","url":"\/s\/UvZ3YenRzKi5dsY\/download","user":"--"}
{"reqId":"3yUQE3+14iV3P7M2Cu1x","remoteAddr":"131.","app":"PHP","message":"Error: Call to undefined function split() at \/home\/www-data\/public_html\/owncloud\/lib\/private\/files.php#194","level":3,"time":"2016-07-15T03:42:26+00:00","method":"GET","url":"\/s\/UvZ3YenRzKi5dsY\/download","user":"--"}
{"reqId":"8yPB1ISR\/xAXE8QGb\/Vg","remoteAddr":"131.","app":"PHP","message":"Error: Call to undefined function split() at \/home\/www-data\/public_html\/owncloud\/lib\/private\/files.php#194","level":3,"time":"2016-07-15T03:46:45+00:00","method":"GET","url":"\/s\/UvZ3YenRzKi5dsY\/download","user":"--"}
{"reqId":"gaHsmpMw9lcLKdlYsVKr","remoteAddr":"131.","app":"PHP","message":"Function split() is deprecated at \/home\/www-data\/public_html\/owncloud\/lib\/private\/files.php#194","level":3,"time":"2016-07-15T03:48:16+00:00","method":"GET","url":"\/s\/UvZ3YenRzKi5dsY\/download","user":"--"}
{"reqId":"QB\/OHRhEaNtERpmwnH6m","remoteAddr":"131","app":"PHP","message":"Error: Call to undefined function split() at \/home\/www-data\/public_html\/owncloud\/lib\/private\/files.php#194","level":3,"time":"2016-07-15T03:55:02+00:00","method":"GET","url":"\/s\/UvZ3YenRzKi5dsY\/download","user":"--"}
{"reqId":"Y6jaMa7KQsBpZZBteZd+","remoteAddr":"131.","app":"PHP","message":"preg_split(): No ending delimiter ',' found at \/home\/www-data\/public_html\/owncloud\/lib\/private\/files.php#194","level":3,"time":"2016-07-15T03:55:39+00:00","method":"GET","url":"\/s\/UvZ3YenRzKi5dsY\/download","user":"--"}
{"reqId":"Y6jaMa7KQsBpZZBteZd+","remoteAddr":"131.","app":"PHP","message":"Invalid argument supplied for foreach() at \/home\/www-data\/public_html\/owncloud\/lib\/private\/files.php#200","level":3,"time":"2016-07-15T03:55:39+00:00","method":"GET","url":"\/s\/UvZ3YenRzKi5dsY\/download","user":"--"}
{"reqId":"HHwR2rkpatV50cinDJIt","remoteAddr":"131","app":"PHP","message":"preg_split(): No ending delimiter ',' found at \/home\/www-data\/public_html\/owncloud\/lib\/private\/files.php#194","level":3,"time":"2016-07-15T03:57:05+00:00","method":"GET","url":"\/s\/UvZ3YenRzKi5dsY\/download","user":"--"}
{"reqId":"HHwR2rkpatV50cinDJIt","remoteAddr":"131.","app":"PHP","message":"Invalid argument supplied for foreach() at \/home\/www-data\/public_html\/owncloud\/lib\/private\/files.php#200","level":3,"time":"2016-07-15T03:57:05+00:00","method":"GET","url":"\/s\/UvZ3YenRzKi5dsY\/download","user":"--"}
{"reqId":"Q+VV7UwTNso10ABWhXg+","remoteAddr":"131.","app":"PHP","message":"preg_split(): No ending delimiter ',' found at \/home\/www-data\/public_html\/owncloud\/lib\/private\/files.php#194","level":3,"time":"2016-07-15T03:58:47+00:00","method":"GET","url":"\/s\/UvZ3YenRzKi5dsY\/download","user":"--"}
{"reqId":"Q+VV7UwTNso10ABWhXg+","remoteAddr":"131","app":"PHP","message":"Invalid argument supplied for foreach() at \/home\/www-data\/public_html\/owncloud\/lib\/private\/files.php#200","level":3,"time":"2016-07-15T03:58:47+00:00","method":"GET","url":"\/s\/UvZ3YenRzKi5dsY\/download","user":"--"}
{"reqId":"+lCO0yB4ttbRtK5TwcMW","remoteAddr":"131","app":"PHP","message":"preg_split(): No ending delimiter ',' found at \/home\/www-data\/public_html\/owncloud\/lib\/private\/files.php#194","level":3,"time":"2016-07-15T04:09:07+00:00","method":"GET","url":"\/s\/szGPwEMaW1n32ej\/download","user":"--"}
{"reqId":"+lCO0yB4ttbRtK5TwcMW","remoteAddr":"131","app":"PHP","message":"Invalid argument supplied for foreach() at \/home\/www-data\/public_html\/owncloud\/lib\/private\/files.php#200","level":3,"time":"2016-07-15T04:09:07+00:00","method":"GET","url":"\/s\/szGPwEMaW1n32ej\/download","user":"--"}
{"reqId":"f3bOPhNp2QfDGH0ZRsCQ","remoteAddr":"131","app":"PHP","message":"preg_split(): No ending delimiter ',' found at \/home\/www-data\/public_html\/owncloud\/lib\/private\/files.php#194","level":3,"time":"2016-07-15T04:09:30+00:00","method":"GET","url":"\/s\/szGPwEMaW1n32ej\/download","user":"--"}
{"reqId":"f3bOPhNp2QfDGH0ZRsCQ","remoteAddr":"131","app":"PHP","message":"Invalid argument supplied for foreach() at \/home\/www-data\/public_html\/owncloud\/lib\/private\/files.php#200","level":3,"time":"2016-07-15T04:09:30+00:00","method":"GET","url":"\/s\/szGPwEMaW1n32ej\/download","user":"--"}
{"reqId":"5jdthuZOHks8eZ\/FnCOY","remoteAddr":"131.","app":"PHP","message":"Error: Call to undefined function split() at \/home\/www-data\/public_html\/owncloud\/lib\/private\/files.php#194","level":3,"time":"2016-07-15T04:18:46+00:00","method":"GET","url":"\/s\/szGPwEMaW1n32ej\/download","user":"--"}

My opinion

The problem it happens on the file lib/private/files.php Line 194
The function split() not work in PHP 7.
Here: http://php.net/manual/en/function.split.php
Then i changed the php socket to PHP 5.6.22 and then that function works.
Also i changed the function split() to preg_split(), works but with warnings i
n PHP 7.
preg_split() in the moment is a workaround, but  not 100% for PHP 7.

Edit: I tried with the explode() function and not had problems apparently. Nothing was reported to owncloud.log.

Graphical Log of Owncloud
logs

Chrome:
chrome

Firefox:
firefox

Other video shared:
other

With preg_split() function:
with

@PVince81

This comment has been minimized.

Show comment
Hide comment
@PVince81

PVince81 Jul 15, 2016

Member

@null31 do you mean it works correctly with explode then ?

I suspect that in your use case the $rangeHeaderPos is empty or null and maybe PHP 7 is more strict about calling split on it.

You might want to try and log the range header to find its value, add this before the split call (needs "loglevel" 0 in config.php):

\OC::$server->getLogger()->debug('Range header "' . $rangeHeaderPos . '"', array('app' => 'DEBUG'));
Member

PVince81 commented Jul 15, 2016

@null31 do you mean it works correctly with explode then ?

I suspect that in your use case the $rangeHeaderPos is empty or null and maybe PHP 7 is more strict about calling split on it.

You might want to try and log the range header to find its value, add this before the split call (needs "loglevel" 0 in config.php):

\OC::$server->getLogger()->debug('Range header "' . $rangeHeaderPos . '"', array('app' => 'DEBUG'));

@PVince81 PVince81 added the bug label Jul 15, 2016

@PVince81 PVince81 added this to the 9.0.5 milestone Jul 15, 2016

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Jul 15, 2016

@PVince81 Mhhh, the posted link of @null31 says:

This function was DEPRECATED in PHP 5.3.0, and REMOVED in PHP 7.0.0.

http://php.net/manual/en/function.split.php

which seems to be confirmed by the posted error log:

"Error: Call to undefined function split() at \/home\/www-data\/public_html\/owncloud\/lib\/private\/files.php#194"

ghost commented Jul 15, 2016

@PVince81 Mhhh, the posted link of @null31 says:

This function was DEPRECATED in PHP 5.3.0, and REMOVED in PHP 7.0.0.

http://php.net/manual/en/function.split.php

which seems to be confirmed by the posted error log:

"Error: Call to undefined function split() at \/home\/www-data\/public_html\/owncloud\/lib\/private\/files.php#194"

@DeepDiver1975 DeepDiver1975 self-assigned this Jul 15, 2016

DeepDiver1975 added a commit that referenced this issue Jul 15, 2016

@null31

This comment has been minimized.

Show comment
Hide comment
@null31

null31 Jul 15, 2016

Thanks for attention. :)

null31 commented Jul 15, 2016

Thanks for attention. :)

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Jul 15, 2016

@null31 You can already test #25488 and give a 👍 there if it works for you and doesn't bring other new issues.

ghost commented Jul 15, 2016

@null31 You can already test #25488 and give a 👍 there if it works for you and doesn't bring other new issues.

DeepDiver1975 added a commit that referenced this issue Jul 17, 2016

DeepDiver1975 added a commit that referenced this issue Jul 17, 2016

DeepDiver1975 added a commit that referenced this issue Jul 17, 2016

DeepDiver1975 added a commit that referenced this issue Jul 20, 2016

DeepDiver1975 added a commit that referenced this issue Jul 24, 2016

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