[QPKG] SpotWeb

This is the best place for community developers to publish their genius work. Your Apps enrich the QNAP Turbo NAS.
Post Reply
har161
New here
Posts: 9
Joined: Tue Jun 11, 2013 5:50 pm

Re: [QPKG] SpotWeb

Post by har161 »

i finally managed to install an old qpkg (one that required sabnzbd+ to be installed and running) and updated through git pull to the latest commit.
The problem now is it only retrieved spots over 2 months old and last update is unknown. I'm suspecting it's a myqsl error, but i'm not sure where to look and how to fix it.
User avatar
forkless
Experience counts
Posts: 1907
Joined: Mon Nov 23, 2009 6:52 am
Location: The Netherlands

Re: [QPKG] SpotWeb

Post by forkless »

It's probably corrupted headers. You may need to do a command line retrieve again with the --force option a couple of times.


PS. The package I am providing should work, just make sure that the PHP tmp folder has the proper permission (rw_rw_rw_) the execute bit may cause the app to act the way it does now (See known issues on my first post in this thread).
har161
New here
Posts: 9
Joined: Tue Jun 11, 2013 5:50 pm

Re: [QPKG] SpotWeb

Post by har161 »

one last noob question for now: where to find the php tmp folder?

edit: i found /share/MD0_DATA/.@mysql/spotweb has the rights are set to 0700. Is this the one?
User avatar
forkless
Experience counts
Posts: 1907
Joined: Mon Nov 23, 2009 6:52 am
Location: The Netherlands

Re: [QPKG] SpotWeb

Post by forkless »

Can you post the output of the following command please;

Code: Select all

ls -la /share/$(getcfg share_def defweb -f /etc/config/def_share.info)/spotweb
User avatar
forkless
Experience counts
Posts: 1907
Joined: Mon Nov 23, 2009 6:52 am
Location: The Netherlands

Re: [QPKG] SpotWeb

Post by forkless »

My bad, can you please do this again with;

Code: Select all

ls -Lla /share/$(getcfg share_def defweb -f /etc/config/def_share.info)/spotweb
User avatar
forkless
Experience counts
Posts: 1907
Joined: Mon Nov 23, 2009 6:52 am
Location: The Netherlands

Re: [QPKG] SpotWeb

Post by forkless »

can you try to run the following command please;

Code: Select all

cd /share/$(getcfg share_def defweb -f /etc/config/def_share.info)/spotweb;php -c / upgrade-db.php
User avatar
forkless
Experience counts
Posts: 1907
Joined: Mon Nov 23, 2009 6:52 am
Location: The Netherlands

Re: [QPKG] SpotWeb

Post by forkless »

my skype id: *redacted*

EDIT: The php binary from optware was invoked.

Solution: used the proper binary

Code: Select all

/mnt/ext/opt/apache/bin/php -c / upgrade_database.php
paul.holland
New here
Posts: 4
Joined: Sat Aug 02, 2014 8:17 pm

Re: [QPKG] SpotWeb

Post by paul.holland »

I am getting the same error as mentioned on page 4:
HDA_DATA is because i only have one HDD (TS-121)
I cant find the folder i should change the rights to. Hope someone can help me out!

php.ini:

Code: Select all

session.save_path = /share/HDA_DATA/.php_session
So, it tryed with Putty to chmod -> /share/HDA_DATA/ -> chmod .php_session -> no response -> ls -l .php_session -> no response....

Code: Select all

[/share/HDA_DATA] # ls -la /share/HDA_DATA/.php_session|head
drw-rw-rw-    2 admin    administ      4096 Feb  3 22:55 ./
drwxrwxrwx   33 admin    administ      4096 Feb  3 23:17 ../

Code: Select all

<b>Warning</b>:  fileperms() [<a href='function.fileperms'>function.fileperms</a>]: stat failed for ./cache//nzb/0 in <b>/share/HDA_DATA/Qweb/spotweb/lib/dao/Base/Dao_Base_Cache.php</b> on line <b>307</b><br />
<br />
<b>Warning</b>:  fileowner() [<a href='function.fileowner'>function.fileowner</a>]: stat failed for ./cache//nzb/0 in <b>/share/HDA_DATA/Qweb/spotweb/lib/dao/Base/Dao_Base_Cache.php</b> on line <b>308</b><br />
<br />
<b>Warning</b>:  filegroup() [<a href='function.filegroup'>function.filegroup</a>]: stat failed for ./cache//nzb/0 in <b>/share/HDA_DATA/Qweb/spotweb/lib/dao/Base/Dao_Base_Cache.php</b> on line <b>309</b><br />
<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /share/HDA_DATA/Qweb/spotweb/lib/dao/Base/Dao_Base_Cache.php:307) in <b>/share/HDA_DATA/Qweb/spotweb/lib/services/NzbHandler/Services_NzbHandler_Display.php</b> on line <b>14</b><br />
<br />
<b>Warning</b>:  Cannot modify header information - headers already sent by (output started at /share/HDA_DATA/Qweb/spotweb/lib/dao/Base/Dao_Base_Cache.php:307) in <b>/share/HDA_DATA/Qweb/spotweb/lib/services/NzbHandler/Services_NzbHandler_Display.php</b> on line <b>18</b><br />
Some more info found trough the topic, added this.
User avatar
forkless
Experience counts
Posts: 1907
Joined: Mon Nov 23, 2009 6:52 am
Location: The Netherlands

Re: [QPKG] SpotWeb

Post by forkless »

Try running the following command;

Code: Select all

chmod 666 /share/HDA_DATA/.php_session
paul.holland
New here
Posts: 4
Joined: Sat Aug 02, 2014 8:17 pm

Re: [QPKG] SpotWeb

Post by paul.holland »

No result.. (forgot to mention the 666 in my previous post)

Code: Select all

[~] # chmod 666 /share/HDA_DATA/.php_session
[~] # ls -la /share/HDA_DATA/.php_session
drw-rw-rw-    2 admin    administ      4096 Feb  3 22:55 ./
drwxrwxrwx   33 admin    administ      4096 Feb  3 23:17 ../
User avatar
Smattie
Starting out
Posts: 12
Joined: Mon Jul 02, 2012 3:31 am
Location: The Netherlands, De Bilt

Re: [QPKG] SpotWeb

Post by Smattie »

Hello All,

When i run the following command: /mnt/ext/opt/apache/bin/php -c / /share/Web/spotweb/retrieve.php --force
i get the last error in the script:
Non-fatal: Updating black/whitelist failed, most likely unreachable!Expiring debuglog entries, if any, done.

Its working but i wonder what this does?
TS-859Pro
User avatar
forkless
Experience counts
Posts: 1907
Joined: Mon Nov 23, 2009 6:52 am
Location: The Netherlands

Re: [QPKG] SpotWeb

Post by forkless »

The query to remove those comments is so slow you really want to clear the entire database, set up again and fetch all spots. (Without the comments it takes about 30 mins or so and will leave you with a 100-150MB database)

PS. normally you would be able to TRUNCATE a table, which takes about one second. The problem is that the table holding the comments has foreign key constraint that prevent them from being deleted. Which in itself is not impossible, but it is a very expensive query compared to a regular truncate. Eg. With millions of rows it could take its sweet time. Hence the re-install suggestion.
splatmannl
Starting out
Posts: 14
Joined: Thu May 23, 2013 9:47 pm

Re: [QPKG] SpotWeb

Post by splatmannl »

Hi Forkless,

I'm really stuck and hope you can help me; I installed Spotweb on my Qnap TS-459 Pro II and it's working fine.
I can update it by hitting the "Retrieve" button on my webpage.

I can also update it manually by using this command using SSH:

Code: Select all

/mnt/ext/opt/apache/bin/php -c / /share/Web/spotweb/retrieve.php
When i look in the crontab (using "crontab -l" command) i can see this command has also been added to run every hour:

Code: Select all

35 */1 * * * /mnt/ext/opt/apache/bin/php -c / /share/MD0_DATA/Web/spotweb/retrieve.php > /share/MD0_DATA/Web/spotweb/spotupdate_status.txt
but unfortunatly this is nog working.

It appears that the cron jobs are not working at all, because i tried to test it by adding the following line:

Code: Select all

15 */1 * * * touch /tmp/hello
this should create a file called "hello" in the /tmp directory, but this isn't working either.

Do you have any advice on what I could do to make it work?
Thanx!
SplatmanNL
Last edited by splatmannl on Fri Mar 13, 2015 11:52 pm, edited 1 time in total.
User avatar
forkless
Experience counts
Posts: 1907
Joined: Mon Nov 23, 2009 6:52 am
Location: The Netherlands

Re: [QPKG] SpotWeb

Post by forkless »

You need to edit the cron table by editing it like so (as per the QNAP wiki);

Code: Select all

crontab -e
then amend /etc/config/crontab with the same info

For example with vi

Code: Select all

vi '/etc/crontab
...and finally restart the daemon

Code: Select all

/etc/init.d/cron.sh restart
Your cron should now survive a reboot.
splatmannl
Starting out
Posts: 14
Joined: Thu May 23, 2013 9:47 pm

Re: [QPKG] SpotWeb

Post by splatmannl »

Hi Forkless,

Thanks for the reply. However, editing the crontab or letting it survive a reboot is not my problem.
When I edit the crontab in both ways you describe (btw: in the second piece of code I think you forgot to add the /config directory after /etc) it shows the lines I want to add just fine.
And those lines also survive a reboot of the device.

My problem is that the device just appears not to DO anything wit the crontab (or at least with the lines I've added, or Spotweb has added).
EDIT: I have also restarted the cron daemon, so that is not the cause either...

I understand (from google-ing) that unfortunatly there is not 1 specific log-file for the cron deamon where you could see what is going on/going wrong.
I can however tell the spotweb-update line is not working, because if i delete the "spotupdate_status.txt" file, it is not created by the cron command (which it should).
And ofcourse I can tell because the spots are not updated automatically...

An other ideas/tips?

SplatmanNL
Post Reply

Return to “Community Apps”