This is a strange problem that took me a while to properly identify and if anybody could give me some advice I'd be very grateful.
First off I am using static publisher for caching. When I run mysite.com/dev/buildcache from the browser everything works as expected. However, I'd prefer to have it a nightly cron job. To that end I've gone through all the steps to get sake working, and it does - mostly. The odd thing that happens is any top-level pages that use images from dataobjects or other pages simply don't output images, but sub-pages do.
For example, I have a 'news' page that has an image. my home page has a widget that pulls the newspage image. if I build the cache from the browser the images are there. if I build it from the command line they are not. if I make a second home page that is a subpage of the original home page the sub page will have the images but the home page (top level) will not when building from command line. this identical code, only difference is one is a subpage.
anybody know what to make of this? it's really the last hurdle to finish a site and it's confounding me...
[08-Oct-2010 11:12:04] Warning at sapphire/filesystem/GD.php line 392: imagejpeg(): SAFE MODE Restriction in effect. The script whose uid is 10002 is not allowed to access /var/www/vhosts/MYSITE/httpdocs/assets/_resampled/SetSize13792-lev-header.jpg owned by uid 48 (http://MYSITE/past-events)
I see. I guess you could even login using curl but that might be too complicated.
Quite possibly you're running the cronjob as another user than the user php or apache runs as. That's why you get the access error.
Did you try to set your assets folder permissions to 0777 (recursively)?
Or maybe issue the sake calls as the "apache-user" (sometimes called www)