Today I enabled the allow_url_include configuration option in PHP on Apache on ProgClub MemberNet. This allows me to include a source file directly from svn, e.g.:
require_once( 'https://www.progclub.org/svn/pcrepo/slib/trunk/src/uri.php' );
Today I enabled the allow_url_include configuration option in PHP on Apache on ProgClub MemberNet. This allows me to include a source file directly from svn, e.g.:
require_once( 'https://www.progclub.org/svn/pcrepo/slib/trunk/src/uri.php' );
Finally got around to making my MemberNet web-page look nice and pretty. Also integrated the look and feel with all of my PHP tests.
Today I discovered the user_agent php.ini configuration option. Basically it allows you to specify the user agent PHP uses when it sends HTTP requests for files. I was screen scraping some data from Wikipedia (processing URI schemes) and it was replying with a 403 error, presumably because they’ve banned the default PHP user agent. Anyway I just changed my user agent to a copy of my one from Firefox and things started working. Pretty handy option!
Thanks to this handy document How To Set Cron to Run Every 5 Minutes I now my crontab configured so that my jj5-test repo gets updated every five minutes. It’s the sort of thing I generally do in a post-commit hook, but in this case that won’t work owing to the way the servers are configured (the files are in my account and not owned by the www-data user the commit-hook runs as).
So to configure cron I issued the command:
$ crontab -e
And then to update my svn working copy:
# m h dom mon dow command */5 * * * * cd /home/jj5/web/test && svn update > /dev/null
On my list of things to do is read the document Handling character encodings in HTML and CSS from the W3C. For some reason I can’t quite bring myself to concentrate on it right now.
Found some instructions about How to open file links in Firefox 1.5 and above and I’m going to try it out just as soon as I can reset my browser.
Basically you add something like the following to your user.js file which is in C:\Documents and Settings\[User Name]\Application Data\Mozilla\Firefox\Profiles\[Profile]\user.js.
user_pref("capability.policy.policynames", "localfilelinks"); user_pref("capability.policy.localfilelinks.sites", "http://www.example.com"); user_pref("capability.policy.localfilelinks.checkloaduri.enabled", "allAccess");
Today I learned about the view-source URI scheme. Check it out!
Reading about URI schemes today.
The UriSchemes page at the W3C suggests a few ways to add support for URL schemes. Maybe I could get file: URLs doing something suitable for SMB network resources in Firefox.
The URI file://bender-xp/C$/ works in an anchor tag in IE8 to open the \\bender-xp\C$ file share on my network. In this case bender-xp was the name of my local machine but it works for remote file shares too (I tested it to a Samba share on another box).
Unfortunately my version of Firefox (version 9.0.1) doesn’t support this.
I was working with phpMyAdmin and I got the following error:
File upload error - unable to create a temporary file in Unknown on line 0
The problem was that the upload_tmp_dir setting in my php.ini file was specified twice. Once up the top of the file where I was editing it, and then later in the file where I didn’t see it. So the setting I wanted wasn’t being applied. If you get this error double check you’ve only got one setting for upload_tmp_dir.