Giter Club home page Giter Club logo

Comments (14)

Sweepr avatar Sweepr commented on May 28, 2024

php check-cache.php
Validating cache content, items 0 to 1000, done.
Validating cache content, items 1000 to 2000, done.

from spotweb.

Sweepr avatar Sweepr commented on May 28, 2024

dfa5136

from spotweb.

jwallden avatar jwallden commented on May 28, 2024

Umm, I notice this is not merged to master yet. Is that intended?

Also, do I have to run migrate-cache.php to fix this? It appears that just changing the setting is not enough.

from spotweb.

Sweepr avatar Sweepr commented on May 28, 2024

@jwallden, changing the setting as in the database under settings i presume?

And you say this is not working?

from spotweb.

Sweepr avatar Sweepr commented on May 28, 2024

@jwallden

It's now in master too: d96dd03

from spotweb.

Sweepr avatar Sweepr commented on May 28, 2024

You need to run upgrade-db.php once to make the setting active, after a while you should not be seeing error again.

from spotweb.

jwallden avatar jwallden commented on May 28, 2024

I was applying the fix to lib/services/Upgrade/Services_Upgrade_Settings.php manually. Haven't tested it yet though, still waiting for retrieval of comments so I thought it was best to wait. But maybe its ok to upgrade db while retrieving?

I was actually getting fileperms(): stat failed for ./cache// error when trying to use the api from Couchpotato. The error text is before the actual xml in the response from Spotweb. Should I open a separate issue for this?

from spotweb.

Sweepr avatar Sweepr commented on May 28, 2024

fileperms()stat: means that that the files don;t have the correct owner, e.g. the folder has been created by root, and the user trying to store files has no permission to write/read there.

So, you need to run retrieve as a user with the permission to write/read there.

from spotweb.

jwallden avatar jwallden commented on May 28, 2024

Right! No need for db upgrade! Works now. Thanks!

However, even though there is a permission problem, I think Spotweb should handle that gracefully and still output valid XML to e.g. Couchpotato, and not prepend it with PHP errors.

from spotweb.

Cromm avatar Cromm commented on May 28, 2024

I too am getting this error when attempting to use the api from CP. The URL I am trying to access is:

http://...spotweb/api?imdbid=xxx&apikey=xxx&t=movie&extended=1

The reported error is:

XML Parsing Error: syntax error
Location: ...spotweb/api?imdbid=xxx&apikey=xxx&t=movie&extended=1
Line Number 2, Column 1:Warning: fileperms(): stat failed for ./cache//web/146/345/0 in /volume1/web/spotweb/lib/dao/Base/Dao_Base_Cache.php on line 293
^
I looked into the permissions issue: The cache directory is owned by root and all contents have perms set to 777. Doesn't look like this is enough though.

@Sweepr or jwallden - would you mind giving me some assistance to resolve this please?

from spotweb.

Sweepr avatar Sweepr commented on May 28, 2024

@Cromm

Webservers don't run as root, so the webserver has no permissions to access the files owned by root.

Also when you chmod 777, you have no security whatsoever, remember that the web server acts on behalf of visitors to your website, and now the web server is able to change the same files that it's executing. If there are any programming vulnerabilities, they can and will be exploited, insert phishing attacks, or steal information from your server without you ever knowing.

The user names for an Apache instance are mostly something like www-run www-data apache ..

So you should change the owner of the cache folder to whatever is default on your distribution and remove the extra forward slash behind cache..

from spotweb.

Cromm avatar Cromm commented on May 28, 2024

Thanks for your response @Sweepr, thanks for your assistance. I understand the security implications but was struggling to resolve. I have changed owner and removed the fwd slash in the db and everything is working now. thank you.

from spotweb.

Sweepr avatar Sweepr commented on May 28, 2024

@Cromm, no problem!

from spotweb.

Wally73 avatar Wally73 commented on May 28, 2024

this fixed on jul 22nd #56

On Wed, Dec 9, 2015 at 1:14 PM, Sweepr [email protected] wrote:

@Cromm https://github.com/Cromm, no problem!


Reply to this email directly or view it on GitHub
#56 (comment).

from spotweb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.