« June 2005 | Main | August 2005 »
July 22, 2005
No proxy support for MT-Blacklist
I've been trying to get MT-Blacklist working on Caduceus but it refused to play ball because it couldn't download the initial blacklist from some website or other.
It appears this is because there is no proxy support roled into its LWP code.
I've hacked ../plugins/Blacklist/lib/Blacklist/App.pm
to contain the following after line 191 ..oh and 301...sloppy coding..:
my $proxy = new URI::URL('http://wwwcache.ncl.ac.uk:8080/');
my @no_proxy = ('medev.ac.uk','ncl.ac.uk');
$ua->proxy('http',$proxy);
$ua->no_proxy(@no_proxy);
$ua->timeout(20);
Now it works..
Hmmm.. Same problem in MT itself.. in lib/MT/App/CMS.pm
and lib/MT/App/Comments.pm
, which is weird coz they have support for proxies in the Trackback stuff.
Posted by pj at 01:35 PM
July 20, 2005
MT login really slow on Caduceus
I've set up MT on Caduceus so that we can move the blogs off of minnesota onto it in due course.
The process seems quite straightforward. I can dump the database as follows:
mysqldump --no-defaults --compatible=mysql40 moveable_type > moveable_type_dump.19-07-2005.sql
I then have to comment out the LOCK and UNLOCK lines before and after inserts as phpMyAdmin didn't like these.
Once I'd changed the weblog config settings and rebuilt them it all worked fine and dandy, APART from the fact that logging in was REALLY slow.
This it appears, is because the script was failing to pull an MT news feed into this page, probably because the proxy environment variable isn't set for the Apache user.
The following is the solution, put:
NewsboxURL disable
into you mt.cfg
file.
Logging in is slow and takes too long
Posted by pj at 11:01 AM
July 17, 2005
Yet another Python Web Framework
Django | The Web framework for perfectionists with deadlines
Posted by pj at 02:38 PM
July 14, 2005
RSS 1.0 job vacancies module
I've put together an RSS 1.0 extension module for job vacancies:
- produced an RDFS definition for the module: http://www.medev.ac.uk/interoperability/rss/1.0/modules/jobs/rss1.0jobsmodule
- produced a new example document: http://www.medev.ac.uk/interoperability/rss/1.0/modules/jobs/fundops_example_rdf
- wrote the whole thing up on the MEDEV site:
http://www.medev.ac.uk/interoperability/rss/1.0/modules/jobs/
Posted by pj at 03:31 PM
July 01, 2005
Securing DB authentication credentials in PHP
I want to use Windows .ini style files for DB configuration settings in PHP. This is an approach I already use in Python.
Because these files are going to contain usernames and passwords I can't have them in the webserver file system as they would be visible to the web. However, if they aren't where the webserver can see them then PHP won't open them while running in safe mode.
My solution is to use a local .htaccess
file with the following:
<Files ~ "\.ini$">
Order allow,deny
Deny from all
</Files>
Posted by pj at 12:54 PM