Categories
Blog post

PHP/cron problem fixed

I’ve managed to get my PHP/cron problem fixed. Well, I say fixed but it seems like more of a hack to get it working. I’ve set up a folder which has 777 permissions so that the cron job can write the file in there without running into permission problems. This doesn’t seem particularly secure to me but I guess it’s a case of security through obscurity. A better way would be to set up some way of chmodding the directory before and after updates, but I think this would need some FTP commands.

Spammers seem to have started using poetry to try and beat the spam filter. Nice try but it doesn’t work!

Categories
Blog post

PHP/cron problems

I’m having some issues on ‘Keane’s website‘ with running a PHP script via cron. This PHP script retrieves my Twitter feed so that it can be displayed on the front page. I made a change recently due to Twitter changing their authorisation methods. Previously, the site would retrieve my tweets every time the front page was loaded, but I don’t want to be hitting the Twitter server every time that happens (I’m sure the site doesn’t receive that much traffic, but it’s good practice!) So I wrote the script to retrieve the latest tweets and store them on the server once an hour.

My problem is that the script won’t write the results to the server. I think it’s a permissions problem, I’ve read about PHP being run as a nobody user when running from cron which causes problems. I’ve not had time to look into it fully but at the moment I’m really stumped, as the scripts write successfully when run from the browser!

Categories
Blog post

GIMP

Something seems to have clicked into place recently when it comes to using GIMP. I’d previously struggled with the concept of layers, and kept getting annoyed when I thought I was editing something only to find I was on the wrong layer. But over the past week I’ve been using it a lot and now it all makes sense!

Google Webmaster tools shows that the theme for this page uses lots of Javascript so I’m going to change the theme to something simpler for now. I really will start learning about creating WordPress themes soon – I’m even thinking of buying a book about it.