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

Error : syntax error, unexpected '=>' (T_DOUBLE_ARROW) #9

Closed
kaizoku75 opened this issue Nov 25, 2020 · 10 comments
Closed

Error : syntax error, unexpected '=>' (T_DOUBLE_ARROW) #9

kaizoku75 opened this issue Nov 25, 2020 · 10 comments

Comments

@kaizoku75
Copy link

kaizoku75 commented Nov 25, 2020

Parse error: syntax error, unexpected '=>' (T_DOUBLE_ARROW), expecting ')' in index.php on line 16

@danipragustia
Copy link
Owner

danipragustia commented Nov 26, 2020

You need upgrade your PHP version, because Arrow Function V2 (https://wiki.php.net/rfc/arrow_functions_v2) only available on PHP 7.4+

@danipragustia
Copy link
Owner

If you stuck on PHP 7.3 for some reason, you can change this line

array_map(fn($x) => header($x), $header);

with

array_map(function($x) { header($x); }, $header);

@kaizoku75
Copy link
Author

it work on localhost
but on my server nothing
"This page isn’t working"

@danipragustia
Copy link
Owner

You need enable error reporting by changing this line to error_reporting(1) and see log what cause the error.

error_reporting(0);

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

  • Your IP/ISP VPS got flag my google for spamming (this happens alot on shared hosting)
  • PHP cant access folder _cache for some reason, check permission folder (if you using unix server you can chmod 666 the folder is safe).

@danipragustia danipragustia changed the title error Error : syntax error, unexpected '=>' (T_DOUBLE_ARROW) Nov 28, 2020
@kaizoku75
Copy link
Author


Fatal error: Uncaught TypeError: explode() expects parameter 2 to be string, null given in proxydrive.php:115 Stack trace: #0 proxydrive.php(115): explode(',', NULL) #1 proxydrive.php(393): write_data('1CQMmVcDhpyPuGU...') #2 {main} thrown in proxydrive.php on line 115

@danipragustia
Copy link
Owner

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 (f583022) 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.

@kaizoku75
Copy link
Author

mp4 file
(f583022)

{"status":412,"error":"Failed write data."}

@danipragustia
Copy link
Owner

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.

@kaizoku75
Copy link
Author

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

@danipragustia
Copy link
Owner

image
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants