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

Encoder broken #500

Open
para2022 opened this issue Mar 24, 2023 · 23 comments
Open

Encoder broken #500

para2022 opened this issue Mar 24, 2023 · 23 comments

Comments

@para2022
Copy link

para2022 commented Mar 24, 2023

The encoder is now broken after yesterdays update. Todays update doesn't fix it either. The encoder page is now a black blank page and nothing is recorded in logs. A fresh install doesn't fix it and nothing was changed on the server. Also been getting lots of php warnings in the log about other things from about a week ago that were not there before. I never had any errors in my logs as it worked perfectly until recently.

Thanks

@DanielnetoDotCom
Copy link
Member

check your encoder and apache logs

@para2022
Copy link
Author

I have done and my php logs but no errors reported. I refresh the encoder page then check logs and nothing is reported. But in dev tools i get:

GET 500 (Internal Server Error)

The site is working but the encoder is now broken no matter how many times i reinstall it. It was fine before these updates. I did a git pull on the site and encoder and then went to the encoder page as i noticed those files were updated and at that point it never worked again, just a blank page. Rebooted. Switched php versions and cleared caches and nothing fixes the issue. I always check through the site after updates to see if anything breaks.

Thanks

@para2022
Copy link
Author

These errors also never end in my logs, it used to very clean before the updates i never had errors and its running about 2/3 speed now it has definitely slowed down:

[24-Mar-2023 21:31:02 Europe/London] PHP Warning: Undefined array key "HTTP_REFERER" in path/to/my/streamer/site/plugin/VideoHLS/VideoHLS.php(18) : eval()'d code(1) : eval()'d code on line 491

[24-Mar-2023 21:29:48 Europe/London] PHP Warning: Undefined array key "HTTP_REFERER" in path/to/my/streamer/site/plugin/CustomizeUser/CustomizeUser.php on line 470

[24-Mar-2023 21:29:48 Europe/London] PHP Warning: Undefined array key "HTTP_REFERER" in path/to/my/streamer/site/plugin/SecureVideosDirectory/SecureVideosDirectory.php(18) : eval()'d code(1) : eval()'d code on line 535

[24-Mar-2023 21:29:42 Europe/London] PHP Warning: imagecreatefromwebp(): gd-webp cannot allocate temporary buffer in path/to/my/streamer/site/objects/functions.php on line 1788

[24-Mar-2023 21:29:42 Europe/London] PHP Warning: imagecreatefromwebp(): "path/to/my/streamer/site/videos/cache/_jpg_641e164667451.jpg" is not a valid WEBP file in path/to/my/streamer/site/objects/functions.php on line 1932

[24-Mar-2023 21:29:42 Europe/London] PHP Warning: imagecreatefromwebp(): gd-webp cannot allocate temporary buffer in path/to/my/streamer/site/objects/functions.php on line 1788

[24-Mar-2023 23:28:41 Europe/Helsinki] PHP Warning: Undefined variable $id in path/to/my/streamer/site/objects/video.php on line 539

@DanielnetoDotCom
Copy link
Member

you MUST find this 500 error, it MUST be somewhere in your logs.

try to change your apache conf to show all the errors

@para2022
Copy link
Author

no defo nothing in the logs only dev tools reports an error:

GEThttps://mysite.com/encoder/?noNavbar=1&webSiteRootURL=https://mysite.com/&user=Sammy&pass=_user_hash_ZSt6b2l5RnNyOGh3dHJ6NFY2c1lPRmZjUXVNeXV6ZDdXbGVLQkJranhwejhzZGJVc29wRWFoUUxjbjFnNkJXeXdSS2RMMjQyUWxRS3MrT3F2NWZ1Rm1SQ1huVis5WkhmZ2VUVk9rYjJPQ2M9&encodedPass=1
[HTTP/1.1 500 Internal Server Error 75ms]

@DanielnetoDotCom
Copy link
Member

sorry if you cannot find the error I cannot help you

@para2022
Copy link
Author

para2022 commented Mar 24, 2023

The twin server hasnt been updated in 3 weeks it runs fine and the encoder works fine and i have no errors in the logs there as they are clean like the other server was before recent updates. I never make any server changes to the main server as it is a production server and runs as sweet as a nut it has 99.99% uptime. Thanks.

@para2022
Copy link
Author

It is a compatability issue with php8+ it works fine with php7.4 if i use any php8+ version it breaks and all those errors start in my avideo.log. Php 8+ is working fine on anything else utilising it. My marketing platform runs on that machine and it does not complain and runs fine with php8+. I have no errors in php logs.

@DanielnetoDotCom
Copy link
Member

you must find the error to get some help, and it does work with php8, most of my servers are php 8.1 and 8.2, some 7.4 and 7.2

@para2022
Copy link
Author

Ok buddy i'll investigate further and report back when i fix it. As this hasnt been reported as yet by others on here it may well be a PHP problem here, which is odd, but il let you know.

@para2022
Copy link
Author

para2022 commented Mar 25, 2023

the server that was working fine (test server) was just updated also and as soon as i did the encoder broke. both have the exact same problem now on updating both sites. The sites both had no problems whatsoever until they were both updated and now both sites have broken encoders with the exact same issue. with php7.4 the encoder page will load and function, but it will not encode, it just hangs. No errors in the server logs regarding this, even in debug mode, php and apache. The encoder page is blank on both sites. The working test site was not updated for a couple of week and as soon as i did the encoder broken there too. So it is clearly not the servers but something after a recent change.

@para2022
Copy link
Author

para2022 commented Mar 25, 2023

The only error i can find on my system is this one in the encoder avideo.log not my streamer site avideo.log. I get the following error whenever i try to go to the encoder page:

[25-Mar-2023 01:40:18 UTC] PHP Fatal error: Uncaught Error: Class "Locale" not found in /www/html/public/encoder/locale/function.php:14
Stack trace:
#0 /www/html/public/encoder/view/index.php(23): require_once()
#1 {main}
thrown in /www/html/public/encoder/locale/function.php on line 14

@DanielnetoDotCom
Copy link
Member

It seems like you are encountering a PHP Fatal error, and it might be caused by a missing PHP extension called intl. The Locale class is part of the Internationalization Functions (Intl) extension, which provides localization capabilities to PHP applications.

To resolve this issue, you need to install the intl extension on your Ubuntu server. You can do this by running the following command:

sudo apt-get install php-intl

@para2022
Copy link
Author

para2022 commented Mar 25, 2023

Thank you, you are an absolute legend. Maybe it may resolve some other subtle bugs too. Thanks bro

@hnagasawa
Copy link

Same error occured Our AVideo.
I checked /var/www/html/AVideo-Encoder/videos/avlog.log. I found next messages.
PHP Fatal error: Uncaught Error: Class "Locale" not found in /var/www/html/AVideo-Encoder/locale/function.php:14
Stack trace:
#0 /var/www/html/AVideo-Encoder/view/index.php(23): require_once()
#1 {main}
thrown in /var/www/html/AVideo-Encoder/locale/function.php on line 14

I tried to install php-intl.

apt-get install php-intl

Reading package lists... Done
Building dependency tree
Reading state information... Done
php-intl is already the newest version (2:8.2+93+ubuntu20.04.1+deb.sury.org+2).
The following packages were automatically installed and are no longer required:
libffi6 libicu65 libonig4
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Why ?

@DanielnetoDotCom
Copy link
Member

make sure what PHP version your apache is using, and install a specific version...

for example sudo apt-get install php8.1-intl

@hnagasawa
Copy link

hnagasawa commented Mar 28, 2023

Our Avideo's php and apache2 Version is next.

apachectl -v

Server version: Apache/2.4.52 (Ubuntu)
Server built: 2023-03-08T17:32:01

php -v

PHP 8.2.4 (cli) (built: Mar 16 2023 14:34:48) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.4, Copyright (c) Zend Technologies
with Zend OPcache v8.2.4, Copyright (c), by Zend Technologies

I tried "sudo apt-get install php8.2-intl" next messages displayed.

apt-get install php8.2-intl

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
php8.2-intl is already the newest version (8.2.4-1+ubuntu22.04.1+deb.sury.org+1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Same error occured

@DanielnetoDotCom
Copy link
Member

Check it here to make sure what version your apache is using

image

if you installed the correct version check your logs again for new errors

@hnagasawa
Copy link

I ran Health check after git pull( both AVideo and AVideo-Enconder) and reboot AVideo Server.
AVideo detected PHP v8.0.28.

But I ran next commands under Ubuntu22.04

php -v

PHP 8.2.4 (cli) (built: Mar 16 2023 14:34:48) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.4, Copyright (c) Zend Technologies
with Zend OPcache v8.2.4, Copyright (c), by Zend Technologies
#update-alternatives --config php
There are 4 choices for the alternative php (providing /usr/bin/php).

Selection Path Priority Status

  • 0 /usr/bin/php8.2 82 auto mode
    1 /usr/bin/php7.2 72 manual mode
    2 /usr/bin/php8.0 80 manual mode
    3 /usr/bin/php8.1 81 manual mode
    4 /usr/bin/php8.2 82 manual mode

Do we change form PHP8.2 to PHP8.0 ?
avideo1

@DanielnetoDotCom
Copy link
Member

you are using php 8.0 in apache

so try this

sudo apt-get install php8.0-intl

then restart apache

@hnagasawa
Copy link

I did "apt-get install php8.0-intl", This problem fix.
Mr Daniel Thank you for your support.
I have a qusetion.
Why does not AVideo detect PHP8.2 ?

@DanielnetoDotCom
Copy link
Member

It is not AVideo, it is apache.

you may need to google to find how to change, but I do not recommend that because 8.1 is already working fine.

@hnagasawa
Copy link

Thank you for your support.
That's all for my question.
There is no problem with closing this thread.

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

3 participants