K-vanc / Tempest-EPG-Generator

The fastest XMLTV formatted EPG Generator with GUI and the lowest memory usage
https://hub.docker.com/r/kvanc/tempest_epg
Other
108 stars 19 forks source link

Does this work with php 8.2.2 no EPG generated #19

Closed ghost closed 1 year ago

ghost commented 1 year ago

I am running arch with php 8.2.2. When I try to create an EPG is just hangs at Site, Channel Id, xmltv id. I moved a few of the USA siteconfigs to mt tempest_config/siteconfig folder. I have tried a variety of sources or am I missing a php dependency. It creates the Guide.xml file but it doesn't get populated. It feels like either it doesn't work with php 8.2.2 or I am missing a module. I thought maybe a permission issue but I changed the directory to 777 and chown /srv/http to http. I just put the files in the /srv/http folder and then go to http://127.0.0.1/tempest.php which works.

I have access to another server that is running 7.2 and it gets past the Site, Channel Id etc stage but it says 0 shows grabbed for a variety of channels and sources.

Is there a log file or a way to debug?

K-vanc commented 1 year ago

Hi and thanks for using Tempest. It works on php 8.2 without any issue and it uses only default modules. If any of needed is missing, you will get message on channel creation or epg generation header. It seems to me that you have permission issue or you are using siteconfigs from downloaded zip file. To check 1 by 1 please run below commands first;

sudo chown -R http:http /srv/http sudo chmod -R 777 /srv/http

I guess you are using apache so I wrote above command for default apache user(http). If you are using another server or modified default server user, please change accordingly. Now you can try to run Tempest again if you downloaded siteconfigs from repo by clicking "raw view" and then right-click "save as" option.

If you downloaded project as zip and copy-pasting siteconfigs from zip file, this means you are trying to run unpatched [ENC][EX] siteconfigs which will not work for many users. Some time ago, i made an update for [ENC][EX] siteconfigs and modified all of them in repo. I was thinking when you click download project as zip, you are getting freshly zipped folder from github but found out you are downloading copies of files as when last release done. I will release new Tempest version soon so all files in zip will be updated but till that time, you have to download siteconfigs manually to get latest updates. Also i am planning to write an updater script soon. If you do so, please do not forget to set ownership/permission again for verification.

ghost commented 1 year ago

Thanks for the help and thanks for writing the code. I cloned the repo with git as it was a fresh install. Since it put the files in the Tempest_EPG directory I moved all files back one level to the /srv/http directory accept for the .git files. I chown http:http and I did a chmod -R 777 for /srv/http. I then clicked on create tempest and it created a tempest_config/siteconfig folder and I moved 4 or so of the php and xml site config files into the siteconfig directory. I am not sure if I needed to to something different due to the ENC/EX. I then went to the tempest.config.xml configure and I selected a few channels from multiple sources and then clicked register and then saved. I then backed out and went to generate EPG and clicked generate. It creates the Guide.xml file and it also creates Tempest log file. I did six channels and it says collecting 1/6 and then stops. I did a top and a ps aux to see if it was still running but it wasn't.

I also tried with my user account via command line with the same result as I copied my tempest_config to my home/username and then changed ownership to username. I ended up with the same result no EPG.

I am using apache. I added a TimeOut to the http.conf file of 2000 (around 30 minutes). I could try nginx if needed.

It feels like I am missing a setting either in Tempest or on my server which I'm guessing is on my server (something in php.ini?).

K-vanc commented 1 year ago

From Tempest side, you did all correct. From php.ini, you dont need an extra setting except timeout value if not reported by Tempest. Php server shall be set to its own username if you didnt modify server's default username. Could you please write name of [ENC][EX] siteconfigs you tried? Also Could you please try with some random unlocked and/or [ENC] only siteconfigs from other folders? I have never used git clone before so to be honest no idea what is downloaded but should be latest files

ghost commented 1 year ago

Thanks for the help. I tried the tvguide, tvpassport, tvtv, and amazon siteconfigs. I tried a couple of channels from each provider. On my arch home PC, it just shows the first one listed and then stops without downloading. I also tried each one separately. Do I need to setup an account at any of these sites? I read the Wiki PDF so hopefully I didn't miss a step. I am also confused a bit by the user key. Do I need this if I am just pulling from your siteconfigs.

K-vanc commented 1 year ago

I think amazon is not working currently since they removed epg from their website. Other siteconfigs you mentioned are [ENC][EX] so i want to see if Tempest will run normal on unlocked siteconfigs. You dont need to setup different configuration file but at least try to test with an unlocked or [ENC] only first channel since you are saying it always stuck on first channel. Userkey is required for channel creation of some siteconfigs. Information files are exist in country folders for necessery siteconfigs but your problem is different. Sometimes websites changing channel ids and %99.9 of Tempest siteconfigs supports dynamic channel creation. I always recommend to start with fresh channel list since github channel lists may be outdated till the time uploaded but in this case, it should still pass to next channel(s) with no show grabbed message.

I randomly test unlocked discoveryuk.com siteconfig in UK folder. Could you please first Generate channel list and select some channels from it on Configurator or place selected channels to top of your existing configuration and run epg generator again? If it stucks again on first discoveryuk.com channel, this means we have an issue with your server and/or still permission/ownership

ghost commented 1 year ago

Thanks for the help. I tried running with the discoveryuk.com and I still end up with the same issue as it shows 1/3 and stops The Guide.xml is created but not populated.

I ran it on my remote server that is running php 7.4.2 on Ubuntu and it populated the guide data with 3 of the channels from discoveryuk.com that I selected. I can't figure out why I can't get this to work on Manjaro (arch) Linux. I tried a different port and this didn't make a difference, I have carefully checked permissions. I am stumped. Maybe I will try Nginx.

I figure once I create the tempest_config I should be able to move the directory and run it command line.

ghost commented 1 year ago

I just pulled the temperst_config folder from the local and put it in my user directory and then ran php tempest.php command along with Generate and the location of the config.xml file and it still has the same issue.

ghost commented 1 year ago

I tried another PC on my network running Debian from the CLI. I used the tempest_config from the remote site that worked but the other PC didn't even create the Guide.xml. This is running php 7.4.33. I ran it from the CLI on the remote site and it worked. Could this be a firewall issue? I am stumped.

K-vanc commented 1 year ago

Hi. You have tried some many combination but there are a few things which are not so clear for me from your statements. Are you creating your tempest_config folder manually? It shall be created automaticly by Tempest when you run Tempest from browser and click proceed on browser or just run Tempest from cli without any config parameter(dry run). If it is not created by Tempest, this is permission/ownership problem. I didnt use arch linux before but from my quick search on google, seems some settings are abit diff from ubuntu. Are you having any issue with running other php applications on your arch setup?

You wrote as remote/local servers. Are you trying to run Tempest on some kind of remote hosting service? Some settings needed by Tempest are disabled by default on some hosting services for their security policies and there is no way to enable them from your side.

You Also wrote something like pulled local folder on another cli device(or I understood so). Remote file/folder including shall be disabled by your security settings and also Tempest needs it is own folder on each device it will run(Auto created near tempest.php). Of course later you can copy paste them from 1 device to another with correct permission/ownership but it shall be there after first run.

I suggest you to delete everything about Tempest(including folders) from your devices and start again 1 by 1 with checking auto folder creation. You can find name of your current apache user in below config file;

/etc/httpd/conf/httpd.conf

Also there should be some error log of your server. Is there anything unusual reported?

Toei79 commented 1 year ago

Im using php 8.2 and runs fine in ubuntu server 20.04

ghost commented 1 year ago

Okay, I figured it out at least on my Debian system. I am sure it will be the same for arch. You need to install some additional php packages in order for this to work. I found a website that gave me a list of basic php modules needed so I am not sure which one actually did the trick.

sudo apt -y install php-cli php-fpm php-json php-pdo php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath

It wasn't the php-cli as I had this installed already.

Toei79 commented 1 year ago

It always shows what modules you need install ,

ghost commented 1 year ago

Where does it show this? I didn't see it in the Wiki file and it didn't give me an error?

K-vanc commented 1 year ago

It is really strange. These are the module names needed by Tempest;

zip => non-critical mbstring => critical xml => critical simplexml => critical curl => critical fileinfo => critical json => critical openssl => critical hash => critical

You should get warning message at top of channel or epg generation after "Checking required modules" message. Missing Non-critical modules will continue to run but you will not be able to use some features. Missing critical modules should terminate operation with description message about missing module(s). The other modules such as mysql,pdo etc are not needed by Tempest. I am Also using debian for my daily epg setup. when I disable 1 module(by commenting) from php.ini and reload nginx, i am getting missing module error on Tempest Epg generation page. Did you run it on your debian from cli? You should see the same message also on cli and of course terminal box will be closed in a blink after termination so you need to enable logger option from Configurator and check inside of Tempest_log.txt.

For arch, i think php module names shall be same with other php environments but I will check for verification

Toei79 commented 1 year ago

When i install it , it ask in the first page when you loade it the modules need it.

ghost commented 1 year ago

It checked for modules but it never gave me an error nor did it say I was missing anything. It just tried one channel and then stopped. The debian install I have doesn't have apache so yes from cli only. The debian stopped quickly and never generated any Guide.xml. Arch was from a browser. I did enable the logger in arch and I saw it listed my siteconfigs but I don't remember seeing a missing modules but then again I could have missed it.

I probably could have figured it out by reading the tempest.php file but it is all one line of code.

K-vanc commented 1 year ago

Anyway, i guess you didnt notice missing module message on debian cli because of immediate closed terminal window. What is the status now on arch? Is it working? Php module/extension names are generic so it could be catched but I will verify arch module names when I reach my pc back. I still have strong feeling that your issue with arch is/was related with some permission and/or ownership.

ghost commented 1 year ago

I didn't have any modules installed on my arch system. I just had installed php, php-cli, and php-apache and attempted to run it through apache. I was able to setup the siteconfig and channels but when I attempted to generate EPG nothing happened. It turned out I was missing modules as it wasn't a permission issue at least in the directories/files.

For debian, I just ssh'd in and tried to run it from the cli. I just installed php and php-cli and this was it. It didn't close the window as it just ran and showed a few lines like PHP version Tempest version and then dropped me back to the command line. After installing modules, it worked. Anyhow, if anyone runs into the same issue they will see this and see the proper modules needed.

K-vanc commented 1 year ago

Ok, thanks for the feedback. I couldnt reproduce the problem you faced on arch since I am always receiving missing module message on my debian and windows setups same as reported by other user. It Could be an arch-linux-only issue and I dont have a setup to test It. I can only recommend always full install of php on linux distros instead of only php-cli or php-fpm etc. Anyway, if someone faces a similar issue with arch, it could be guideline. I am closing issue.