The supreme paradox of all thought is the attempt to discover something that thought cannot thinkSoren Kierkegaard
1 | 2
6 - 8 [8]
This months PHP|Architect sample article gives a quick guide to Installing Java for PHP. The PHP manual suggest the method applied, of integrating Java into PHP, is not as stable as reversing the roles, and integrating PHP into a Java Servlet. All the same, finally get to use that Java DLL in the PHP extensions folder. Note the article does fail to emphasise that java.class.path must be quoted when including the path to custom classes, which did lead to a few minutes of hair tearing!
Posted on Sep 12, 2003 at 22:31:36. [Comments for Java/PHP Bridge- 2]
Relates to Peregrinations and Surfing
Pretty shattered right now. Had quite a long week, and having been on nights, switched my time clock this am to catch a quick surf on the Bore with Wiz and The Owl. Was quite a nipper, but we clocked a bit of mileage, and it was the only opportunity to give my resurrected mal (courtesy of Toots) a test drive before we head off to the French Mascaret in a couple of weeks. Having had 3 hours sleep the previous day, I had hopped to get an early night, but couldn't resist the Beeb late night movie, an adaptation of D.H. Lawrence's The Virgin and The Gypsy. Always have a craving for period dramas, but this was made all the more appealing by the disastrous finale, in which the exploded dam brings an excuse for the gypsy to finally seduce the virgin. The somewhat tame footage of the waters rolling up the river from the dam, was actually filmed on the Severn Bore at the very spot we surfed this morning!
Posted on Sep 12, 2003 at 22:30:29. [Comments for Bore Virgin- 0]
With Windows 98 as my primary OS on my current system, I have never really delved deep into Apache, except a previous failed attempt to establish Virtual Named Hosts. Well, today I returned to this with renewed vigour on reading Simon Willison's post and accompanying links on mod_rewrite. This voodoo is such a powerful feature for improved URI-security, search engine optimisation and usability. However, while I was able to play around with a few trial regular expressions on my test platform, conflict soon arose with the use of relative URIs in test builds to accomodate their directory location within subfolders of the root. So I decided it was time to finally get Name-based Virtual Hosts.
This was no easy feat - understandably there is little documentation online for Windows 98 and Apache! - and has taken a few hours to get to grips with. However while the solution may not be correct, it seems to work well now, and I can directly clone work-in-progress sites to the finished article. It also means I can take advantage of mod_rewrite safe in the knowledge that what I create on the test platform can be mirrored to the public server. Here are a few links that came in handy along the way:
The Windows 98 process boils down to:
127.0.0.1 newhost
The first entry will always be the same and the second the name of the new host. I found spaces were required between each field on the line rather than tabs.
<VirtualHost *>
ServerName newhost
ServerAdmin webmaster@newhost
DocumentRoot "C:/Apache/htdocs/newhost"
</VirtualHost>
Of course additional directives could be added to the Virtual Host, but in this case I am just accepting the defaults defined for the main server (ie localhost) in Section 2 of the config file.
I also found I needed to disable the Internet Connection in Internet Options of Internet Exploder to prevent the Connect window form popping up (annoying as much as anything). So by having two HOSTS files, one with the domain I am working on, www.tomwright.me.uk, pointed at the localhost, and one excluding the domain, I can work in the development environment on my test platform and transfer this as is to the public server without any issues relating to URI paths. And, of course, finally get to really play with mod_rewrite. A quick example being the following code in the .htaccess file at the root of a particular Virtual Host:
RewriteEngine On
RewriteRule solution/([a-z]+) /services.php?service=$1
Which cloaks the GET request for each service presenting a more usable and Search Engine friendly URI presented as a directory structure.
Perhaps one day I might actually trade in my Win98 and take the plunge into RHL….
Posted on Sep 03, 2003 at 01:39:23. [Comments for Virtual Hosts In Win98- 0]