WWBN / AVideo-Encoder

Encoder Server for AVideo Platform Open-Source
https://platform.avideo.com
GNU Affero General Public License v3.0
152 stars 189 forks source link

Installation stack on processing youphptube-encoder (Debian10, Ubuntu18). #234

Open sethuper opened 4 years ago

sethuper commented 4 years ago

I have exacly the same issue when I want to install youphptube-encoder or youphptube-encoder-network.

I have installed YouPHPTube on Debian 10 with no problems. But when I tried to install YouPHPTube-Encoder or YouPHPTube-Encoder-Network, installation stucks on "processing" - I have checked logs and it looks like there is an error in script: "PHP Warning: require_once(/var/www/YouPHPTube/YouPHPTube-Encoder/view/../configuration.php): failed to open stream: No such file or directory". I searched on the internet to solve this problem but there is nothing about it at all. It is not a server problem: distribution, www, php, mysql, permisions etc.. its an instalation script. this file: /var/www/YouPHPTube/upload/objects/Login.php. this line cause the problem: require_once dirname(FILE) . '/../configuration.php'; but if I remove "/../" - there is no more problem with missing file - output: /var/www/YouPHPTube/YouPHPTube-Encoder/view/configuration.php but after editing and removing "/../" there is bigger problem: Uncaught Error: Call to a member function query() on null in.. ..objects/Object.php:35\nStack trace:\n#0 .. objects/Object.php(13): ObjectYPT::getFromDb(1)\n#1 etc. Could you look at these problem please, I wish I could use it for may dashcam videos - for personal use and for friends away from youtube. Debian10, apache2.4, php7.0 and 7.3, mariadb10.3.22, permission for www-data. I have tested the instalation on Ubuntu 18, php 7.2 and there is exactly the same problem. I have also created folder video and set the permission but no change.

Directory YouPHPTube - /var/www/YouPHPTube/ Directory YouPHPTube-Encoder - /var/www/YouPHPTube/YouPHPTube-Encoder/

Thank you.

Originally posted by @sethuper in https://github.com/WWBN/AVideo-Encoder/issues/38#issuecomment-612947133

DanielnetoDotCom commented 4 years ago

Make sure you have the videos directory with write permissions.

sethuper commented 4 years ago

I have "write" permision for www:data and I also did chmod 777 for whole folders and files. But the problem is, the script is looking for the file: /var/www/YouPHPTube/YouPHPTube-Encoder/view/../configuration.php but instead i think it should be: /var/www/YouPHPTube/YouPHPTube-Encoder/view/configuration.php Any way there is no file configuration.php in folder view

DanielnetoDotCom commented 4 years ago

NO

the correct path is /var/www/YouPHPTube/YouPHPTube-Encoder/videos/configuration.php

GeorgePricopDev commented 4 years ago

I am also trying on ubuntu and centos the same installation problem does not work the script bug https://prnt.sc/rz3c74

DanielnetoDotCom commented 4 years ago

@GeorgePricopDev forget centos.

Check your apache log. also seems to me your streamer site is not working.

sethuper commented 4 years ago

The streamer site is working properly everything is installed succesfully. But you know when I want to install Encoder the script is looking for this file which is wrong /var/www/YouPHPTube/YouPHPTube-Encoder/view/../configuration.php

I have done step by step installation on debian and ubuntu from scratch: I don't know but maybe there is something missing in the whole installation process.

sudo apt install php libapache2-mod-php php-mysql git php-cli php-common php-json php7.3-opcache php-readline php-curl python3-pip libimage-exiftool-perl ffmpeg

cd /var/www/ sudo git clone https://github.com/WWBN/AVideo.git

cd AVideo sudo git clone https://github.com/WWBN/AVideo-Encoder.git

sudo mv AVideo-Encoder upload

sudo mkdir -p /var/www/AVideo/videos sudo mkdir -p /var/www/AVideo/upload/videos sudo chown 755 /var/www/AVideo/videos sudo chown 755 /var/www/AVideo/upload/videos sudo chown www-data:www-data /var/www/AVideo/ -R

sudo -H pip3 install youtube-dl chmod a+rx /usr/local/bin/youtube-dl sudo crontab -e @daily sudo -H pip3 install --upgrade youtube-dl > /dev/null

sudo mysql create database aVideo; create database aVideo-Encoder; create user AVideo@localhost identified by 'password'; grant all privileges on aVideo. to AVideo@localhost; grant all privileges on aVideo-Encoder. to AVideo@localhost; flush privileges; exit;

sudo nano /etc/apache2/sites-available/AVideo.conf <VirtualHost *:80> ServerName avideo.domain.com DocumentRoot /var/www/AVideo <Directory /var/www/AVideo> DirectoryIndex index.php Options +FollowSymLinks AllowOverride All Require all granted ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined

sudo nano /etc/php/7.3/apache2/php.ini

post_max_size = 8M => post_max_size = 1024M upload_max_filesize = 8M => upload_max_filesize = 1024M max_execution_time = 30 => max_execution_time = 7200 memory_limit = 128M => memory_limit = 512M

sudo a2enmod rewrite sudo a2ensite AVideo.conf sudo rm /var/www/AVideo/install/ -r sudo rm /var/www/AVideo/upload/install/ -r sudo systemctl restart apache2

LOG

[php7:notice] PHP Notice: Undefined variable: global in /var/www/AVideo/install/index.php on line 21 [php7:warn] [pid 3373] PHP Warning: require_once(/var/www/AVideo/upload/view/../videos/configuration.php): failed to open stream: No such file or directory in /var/www/AVideo/upload/view/index.php on line 18 [php7:error] [pid 3373] PHP Fatal error: require_once(): Failed opening required '/var/www/AVideo/upload/view/../videos/configuration.php' (include_path='.:/usr/share/php') in /var/www/AVideo/upload/view/index.php on line 18

ls -l /var/www/AVideo total 176 drwxr-xr-x 3 www-data www-data 4096 Apr 14 14:01 admin -rw-r--r-- 1 www-data www-data 10365 Apr 14 14:01 classic.htaccess -rw-r--r-- 1 www-data www-data 23 Apr 14 14:01 CNAME -rw-r--r-- 1 www-data www-data 26 Apr 14 14:01 _config.yml drwxr-xr-x 2 www-data www-data 4096 Apr 14 14:01 docker -rw-r--r-- 1 www-data www-data 1449 Apr 14 14:01 Dockerfile drwxr-xr-x 2 www-data www-data 4096 Apr 14 14:01 feed -rw-r--r-- 1 www-data www-data 452 Apr 14 14:01 git.json.php drwxr-xr-x 9 www-data www-data 4096 Apr 14 14:01 google -rw-r--r-- 1 www-data www-data 4942 Apr 14 14:01 index.php drwxr-xr-x 2 www-data www-data 4096 Apr 14 14:01 install -rw-r--r-- 1 www-data www-data 1144 Apr 14 14:01 LICENSE drwxr-xr-x 2 www-data www-data 4096 Apr 14 14:01 locale -rw-r--r-- 1 www-data www-data 1960 Apr 14 14:01 new.htaccess drwxr-xr-x 8 www-data www-data 4096 Apr 14 14:01 objects drwxr-xr-x 60 www-data www-data 4096 Apr 14 14:01 plugin -rw-r--r-- 1 www-data www-data 14908 Apr 14 14:01 README.md -rw-r--r-- 1 www-data www-data 13716 Apr 14 14:01 routes.php -rw-r--r-- 1 www-data www-data 43 Apr 14 14:01 rtmp.code-workspace -rw-r--r-- 1 www-data www-data 33153 Apr 14 14:01 sitemap.xml -rw-r--r-- 1 www-data www-data 202 Apr 14 14:01 test.txt drwxr-xr-x 2 www-data www-data 4096 Apr 14 14:01 updatedb drwxr-xr-x 11 www-data www-data 4096 Apr 14 14:01 upload drwxr-xr-x 3 www-data www-data 4096 Apr 14 14:04 videos drwxr-xr-x 9 www-data www-data 4096 Apr 14 14:01 view -rw-r--r-- 1 www-data www-data 911 Apr 14 14:01 web.config -rw-r--r-- 1 www-data www-data 3632 Apr 14 14:01 youphptube.yaml

ls -l /var/www/AVideo/upload total 92 -rw-r--r-- 1 www-data www-data 22 Apr 14 14:01 CNAME -rw-r--r-- 1 www-data www-data 26 Apr 14 14:01 _config.yml drwxr-xr-x 2 www-data www-data 4096 Apr 14 14:01 docker -rw-r--r-- 1 www-data www-data 1500 Apr 14 14:01 Dockerfile -rw-r--r-- 1 www-data www-data 3797 Apr 14 14:01 index.php drwxr-xr-x 2 www-data www-data 4096 Apr 14 14:01 install -rw-r--r-- 1 www-data www-data 34520 Apr 14 14:01 LICENSE drwxr-xr-x 2 www-data www-data 4096 Apr 14 14:01 model drwxr-xr-x 2 www-data www-data 4096 Apr 14 14:01 nbproject drwxr-xr-x 2 www-data www-data 4096 Apr 14 14:01 objects -rw-r--r-- 1 www-data www-data 6819 Apr 14 14:01 README.md drwxr-xr-x 2 www-data www-data 4096 Apr 14 14:01 update drwxr-xr-x 2 www-data www-data 4096 Apr 14 14:01 videos drwxr-xr-x 9 www-data www-data 4096 Apr 14 14:01 view

I have changed permision to 755 then 777 but no change still stack on processing.

DanielnetoDotCom commented 4 years ago

so check your apache log files and also your javascript console for errors.

must be something. without a clue, we cannot help.

sethuper commented 4 years ago

Javascript console output: https://avideo.domain.com is not my real domain name.

Blocked loading mixed active content "https://avideo.domain.com/upload/login" GET https://avideo.domain.com/upload/view/js/main.js [HTTP/1.1 200 OK 42ms]

This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”.

Script terminated by timeout at: https://avideo.domain.com is not my real domain name.

which@https://avideo.domain.com/upload/view/js/jquery-3.2.0.min.js:3:13438 addProp/<.get<@https://avideo.domain.com/upload/view/js/jquery-3.2.0.min.js:3:11095 r.fn.extend@https://avideo.domain.com/upload/view/js/jquery-3.2.0.min.js:2:1690 simulate@https://avideo.domain.com/upload/view/js/jquery-3.2.0.min.js:4:5974 c@https://avideo.domain.com/upload/view/js/jquery-3.2.0.min.js:4:6725

XHRPOST https://avideo.domain.com/upload/login Internal Server Error 500

I have removed all restriction to domain and page in the web browser options, so nothing is blocked. I have used also Opera and older Firefox 68 to see if there is any change.

Apache2 full log with error: https://avideo.domain.com is not my real domain name.

[Tue Apr 14 15:32:21.892739 2020] [php7:warn] [pid 15122] [client] PHP Warning: require_once(/var/www/AVideo/upload/objects/../videos/configuration.php): failed to open stream: No such file or directory in /var/www/AVideo/upload/objects/Login.php on line 4, referer: https://avideo.domain.com/upload/install/index.php

[Tue Apr 14 15:32:21.892811 2020] [php7:error] [pid 15122] [client] PHP Fatal error: require_once(): Failed opening required '/var/www/AVideo/upload/objects/../videos/configuration.php' (include_path='.:/usr/share/php') in /var/www/AVideo/upload/objects/Login.php on line 4, referer: https://avideo.domain.com/upload/install/index.php

The error in this /var/www/AVideo/upload/objects/Login.php point to this line: require_once dirname(FILE) . '/../videos/configuration.php';

DanielnetoDotCom commented 4 years ago

Looks like you are mixing http and https

Try another browser .

Today I already install 3 streamers and encoders with no problem. I am sure it is something in your side.

sethuper commented 4 years ago

Don't bother about http and https cos I have edited my domain in post and I could change by mistake https to http, I also changed options in browser and turn off rewrite to https..

I have done the installation on my primary server Debian 10.3 - (https) - fail, Virtual box - Debian 10.3 - (http) - fail, Virtual box - Ubuntu 18.04.4 - (http) - fail.

I have tested instalation on: Firefox 75 Firefox 68 ESR - portable Opera Presto 2.12 - portable

Could you tell me what system and version have you used to install youphptube/AVideo. Was it standard distro? I will give a shot. I am kind of desperated to run it.

DanielnetoDotCom commented 4 years ago

I always use Ubuntu 18.04 and use chrome to install ( but should work with any browser)

sethuper commented 4 years ago

Just tested installation on Virtual box - Debian 9.12 - eh still the same error.. I don't know maybe some necessary packages are missing..

sethuper commented 4 years ago

What I have done now: I have copied "configuration.php" from /var/www/AVideo/videos to /var/www/AVideo/upload/videos. I have changed urls and database name in this file "configuration.php" and login website started work. but because script wasn't run some mysql tables etc. were not created during instalation so I can't login as admin. It says wrong password. And unfortunately at this point my knowledge totally ends.. I am stacked :(. I hope you will find out one day what was wrong with it.. Thanks for help.

DanielnetoDotCom commented 4 years ago

The streamer and encoder are different. copy may not be a good option.

Maybe worth for you hire us to install it for you, Basic installation costs 70 USD All our prices are on our services website https://www.youphptube.com/services , on the site also you will find packages with excellent discounts, which include services and plugins.

If you want, you can also buy the plugins separately, the plugins also have a progressive discount, more plugins, the bigger the discount.

Or you can hire us for an hour of support. hour rate is 30 USD/hour