Closed kaizoku75 closed 3 years ago
You need upgrade your PHP version, because Arrow Function V2 (https://wiki.php.net/rfc/arrow_functions_v2) only available on PHP 7.4+
If you stuck on PHP 7.3 for some reason, you can change this line https://github.com/danipragustia/php-videoproxy-gdrive/blob/51962d3213f479a46a78dd5705f85f4c407bce15/index.php#L16
with
array_map(function($x) { header($x); }, $header);
it work on localhost but on my server nothing "This page isn’t working"
You need enable error reporting by changing this line to error_reporting(1)
and see log what cause the error.
https://github.com/danipragustia/php-videoproxy-gdrive/blob/51962d3213f479a46a78dd5705f85f4c407bce15/index.php#L4
When troubleshooting error, make sure your php.ini display_errors
and display_startup_errors
set to 1, otherwise you cant see the error.
If there no error on log, there some possibility
_cache
for some reason, check permission folder (if you using unix server you can chmod 666
the folder is safe).
Fatal error: Uncaught TypeError: explode() expects parameter 2 to be string, null given in proxydrive.php:115
Stack trace:
thrown in proxydrive.php on line 115
I dont have issue so far, and kinda weird if get_video_info
return 200 OK if fmt_stream_map
was null.
You can tried this commit (https://github.com/danipragustia/php-videoproxy-gdrive/commit/f583022e1876022cb2fef3e561b6ca887c9b8622) and test, if this good or not.
My assumption is google drive file was not transcode yet, and this must be return 412 Failed create file, but on this case get_video_info
tell file was rendered and doesnt return fmt_stream_map
parameter on API.
mp4 file (f583022)
{"status":412,"error":"Failed write data."}
Can you provide the google drive in here, I cant find any issue so far (Tried before). If you did it kind help me to solve this problem.
https://pastebin.com/raw/WeprHRcP video file https://drive.google.com/file/d/0BwHxX3yoJoeuYzZlNm1jYVhwWWs/view php 7.2 {"status":412,"error":"Failed write data."} nothing in /_cache/ folder empty
Its work using script on pastebin and your google drive file. Tried it on PHP 7.2.19 with Debian 10 Server.
There possible permission issue on webroot, make sure apache/nginx have access of _cache
folder with read and writeable flags.
I think error was on server-side and wasn't on the code, so I would close this issue. You can re-open the issue when you think it was mistake.
Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ')' in index.php on line 16