get_iplayer forums

Full Version: How do I specify the cache directory for get_iplayer spawned by PHP shell_exec()?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to run get_iplayer from a button on my local, private, php web server on linux using shell_exec. The program runs but cannot save to cache, which it thinks is in the filesystem root - /radio.cache and /tv.cache. I have confirmed this is where the program is trying to update the caches but it cannot copy them to .old as the permissions are wrong (http instead of root). They shouldn't be there anyway.

I cannot find a way of writing/updating the caches in the default ~/.get_iplayer folder from the web page, although my code can read them there. There does not seem to be a way of specifying the caches folder.

I would have expected get_iplayer to place the caches in the folder from which it is run if it's not using the default one (in this case, /srv/xxx/) or at least in a sub-folder; or better, to specify the path in the options file. The options file used is in /etc/.get_iplayer/ so it would be useful if the caches were there.

Is there any way to specify the path used for caches?
The documentation gives you two ways to do it. See "Setting Preferences" page and "CGI Deployment" section in Web PVR help.
In wiki/prefs I can find only GETIPLAYER_PROFILE and GETIPLAYER_DEFAULTS, neither of which has any usage information. I can find no mention of CGI anywhere. Obviously, I must be looking in the wrong place. Sorry.
Can anyone help me with GETIPLAYER_PROFILE and GETIPLAYER_DEFAULTS, please, or is there something else I've missed? I would like the get_iplayer action to be under my control but it's looking like a cron is the only answer.
It sounds like you don't understand how environment variables work or else don't know how to configure them for your web application. That is unrelated to get_iplayer, and there is plenty of information on that subject elsewhere on the internet. As noted in docs, web server deployment of get_iplayer is not supported, so I'm closing this thread.