TobyInkster.co.uk

Blog for February 2007

27/02/2007: Re: is PHP less secure than Perl, Python, or Ruby?

PHP is not inherently insecure, but because it’s very easy to write PHP, it has become rather a popular language amongst people with little, if any, formal training on how to program. Because of this, there are an awful lot of badly written PHP scripts out there; installing them may well open up your server to abuse….

Filed under: , , .

27/02/2007: PHP4 vs PHP5 [was Re: Extending the mysqli class]

Michael Fesser wrote:

My scripts make use of many of the new OOP features in PHP 5, so they won’t run at all on PHP 4.

Ditto.

My current big pet project is http://demiblog.org/. This is PHP 5+ only and supports MySQL 5+ and PostgreSQL 8+. Although I do realise that earlier versions of these packages are still quite widely used out there, this project probably won’t hit the big 1.0 for another year or two, by which time, the hosting world will have probably moved on a lot. Supporting older versions of PHP and the database engines will cost development time and push back the project release date even later, by which time PHP 4 support will be even less relevant.

So although PHP 4 may still be alive right now, it’s counting down the days to his retirement when it can hand over the family business to his son PHP 5. He’s heard the happy news that his dranddaughter PHP 6 is planning on following in their footsteps too as soon as she graduates. Because of PHP 4’s impending retirements, he’s not taking on…

21/02/2007: Re: target new window = good or bad?

idiotprogrammer wrote:

I find this to be bothersome and contrary to current web trends. But I can find no articles or recommendations to back me up here.

Filed under: , .

20/02/2007: Re: A treatise on how religious Atheism is

TomP wrote:

[Atheists] do not believe in the existence of a soul.

Although most Buddhists do not believe in any gods, and can therefore be described as atheists, they most certainly do believe in the concept of a soul — indeed, a soul that can continue to exist after death.

You do not believe in any source for ethical conduct except sources within human beings

There have been several good ethical theories put forward that go further than “look within yourself and you’ll know what’s right”. Arguably, the two that seem to gel best with current observed human ethics are Kantian ethics and Utilitarianism.

Kantian ethics look at the means rather than the ends.

  1. We ask, should one do X?
  2. We imagine a world where everyone does X.
  3. Is this world flawed?
  4. If so, one should never do X.
  5. If not, one may do X.

That is, if we want to know whether it is morally acceptable to lie, we imagine a world where everyone lied all the time. Nobody would be able to get anything done in such a world. (Imagine a…

Filed under: , , .

20/02/2007: Re: Views on XHTML 1.1 site

The upcoming revision to the XHTML 1.1 spec gets savaged on Usenet.

Filed under: , , , .

16/02/2007: Re: Is there an Evolutionist in the house ???!

Dave in Lake Villa wrote:

Could someone please tell me how Evolutionists/Atheists respond to these please ? Thanks.

1. Nothing produced something which then exploded its matter and out of that came personality, abstract thoughts, rationale, intuition, love, hate, discernment and even believe in a personal Creator.

You appear to be asking about the Big Bang. Firstly, this has nothing to do with the theory of evolution by natural selection: the universe was not created through a process of natural selection, but by the laws of physics.

For example, if I kick a ball, it keeps going in the same direction until something (a wall; gravity; friction; etc) changes its path. Similarly, if you set a star moving in a particular direction, it will keep going until it collides with another star or its path is changed by the gravity of some massive object. Simple laws of physics: testable, observable, widely accepted as fact.

Tracing the ball’s path backwards, you find my foot. Tracing…

15/02/2007: Re: Web Design: Would you design a PDF by writing Postscript in Notepad?

fgdg wrote:

Why do we put up with web design software? Nobody makes a PDFs by writing Postscript in Notepad, but that is what designer’s working for the web are expected to do.

You are comparing apples with oranges here. PostScript is1 a language for describing what pages look like. HTML is a language for describing what pages mean.

Filed under: , , .

15/02/2007: Re: Random Map Generation

skulkrinbait@googlemail.com wrote:

My first prototype for doing this doesn’t give good results, the map being far too random, can someone help me out or point me to a good resource please?

Real geography is not random…

Filed under: , , .

10/02/2007: Re: Parsing Question…

cjl wrote:

Short of writing a parser, which is clearly beyond me, what are some reasonable approaches to handling user input that will be executed?

Writing a parser is the best option in the long-run. If you were to attempt to interpret the user input some other way, like pure regular expressions, then you would fall into a lot of traps, and your interpreter would behave oddly in many cases.

A full parser is a much better option: it will behave far more reliably and would be a lot easier to extend, should you feel the need to add extra features to the language at a later date.

Although it’s a lot of work, there are some fairly well established methods on writing them. What you basically need to write is three fairly independent components: a tokeniser, a parser and an interpreter. None of these share any code in common, except for the definitions of a few constants and classes.

Firstly, a tokeniser, which reads the user input and splits it into a long list of tokens. Each token should have the…

Filed under: , , .
Array ( [template] => Template Object ( [helper] => TemplateHelper Object ( [flavour] => html_401 [site] => Site Object ( [flavour] => html_401 [db] => SiteDBObject Object ( [connection] => PDO Object ( ) [connection_ro:private] => PDO Object ( ) [connection_rw:private] => PDO Object ( ) [rw_login:private] => [is_naked_flag:private] => [prefix] => demiblog_ [engine:private] => pgsql [dbsyntax:private] => Array ( [default] => Array ( [T_BEGIN] => [T_COMMIT] => [T_CANCEL] => [LIMIT] => [NOW] => CURRENT_TIMESTAMP(0) [EXTRACT_YEAR] => EXTRACT(YEAR FROM %s) [EXTRACT_MONTH] => EXTRACT(MONTH FROM %s) [EXTRACT_DAY] => EXTRACT(DAY FROM %s) [LOWER] => LOWER [UPPER] => UPPER [Identifier Quote] => " [Datetime Format] => Y-m-d H:i:s ) [pgsql] => Array ( [T_BEGIN] => BEGIN [T_COMMIT] => COMMIT [T_CANCEL] => ROLLBACK [LIMIT] => Array ( [0] => LIMIT %2$s OFFSET %1$s [1] => end ) ) [mysql] => Array ( [T_BEGIN] => BEGIN [T_COMMIT] => COMMIT [T_CANCEL] => ROLLBACK [LIMIT] => Array ( [0] => LIMIT %2$s OFFSET %1$s [1] => end ) [Identifier Quote] => ` ) [firebird] => Array ( [LIMIT] => Array ( [0] => FIRST %2$s SKIP %1$s [1] => after select ) ) [mssql] => Array ( [T_BEGIN] => BEGIN [T_COMMIT] => COMMIT [T_CANCEL] => ROLLBACK [LIMIT] => [NOW] => GETDATE() ) ) ) [url] => SiteURLSpace Object ( [domain] => tobyinkster.co.uk [prefix] => / [doubletrim] => [formats] => Array ( [Admin] => Array ( [0] => /admin/^^adminpage^^/ ) [User] => Array ( [0] => /~^^user_id^^/ [1] => /user/^^user_id^^/ ) [C] => Array ( [0] => ^^ARTICLE_URL^^comments#comment^^comment_id^^ [1] => /comment/^^article_id|spf|%06d^^-^^comment_id|spf|%04d^^/ ) [TB] => Array ( [0] => ^^ARTICLE_URL^^comments#comment^^comment_id^^ ) [NEWS] => Array ( [0] => ^^ARTICLE_URL^^comments#comment^^comment_id^^ ) [A] => Array ( [0] => /article/^^uri_part^^/ ) [B] => Array ( [0] => /blog/^^article_date|date|Y/m/d^^/^^uri_part^^/ ) [EV] => Array ( [0] => /event/^^article_date|date|Y/m/d^^/^^uri_part^^/ ) [P] => Array ( [0] => /photo/^^article_date|date|Y/m/d^^/^^uri_part^^/ ) [T] => Array ( [0] => /tag/^^tag^^/ ) [CAL] => Array ( [0] => /event/^^tag^^/ ) [GAL] => Array ( [0] => /gallery/^^tag^^/ ) [Lister_Blog] => Array ( [0] => /blog/^^article_date.year|spf|%04d^^/^^article_date.month|spf|%02d^^/^^article_date.day|spf|%02d^^/ [1] => /blog/^^article_date.year|spf|%04d^^/^^article_date.month|spf|%02d^^/ [2] => /blog/^^article_date.year|spf|%04d^^/ [3] => /blog/ ) [User Signup] => Array ( [0] => /user/signup ) ) ) [sitetitle] => TobyInkster.co.uk [pagetitle] => %s [locale] => en_GB [encoding] => utf-8 [domain] => tobyinkster.co.uk [urlprefix] => [settings] => Array ( [template.page_title_template] => %s (TobyInkster.co.uk) [template.title] => TobyInkster.co.uk [template.class] => StdTemplate [template.page_split_message] => This article has been split into multiple pages. [locale.locale] => en_GB [locale.encoding] => utf-8 [db.dsn] => pgsql:host=localhost port=5432 dbname=tobyinkster [db.username] => tai [db.password] => When6box [db.tableprefix] => demiblog_ [db.persist] => [db.rw.dsn] => [db.rw.username] => [db.rw.password] => [html.flavour] => html_401 [html.prolog] => auto [html.mimetype] => text/html [server.urlprefix] => / [pages.statuses] => /article/about-status/ [pages.comment_help] => /article/about-comments/ [navigation.links] => 5 [navigation.link1title] => Home [navigation.link1uri] => / [navigation.link2title] => Blog [navigation.link2uri] => /blog/ [navigation.link3title] => Popular [navigation.link3uri] => /tag/popular/ [navigation.link4title] => Colophon [navigation.link4uri] => /article/about/ [navigation.link5title] => Contact [navigation.link5uri] => /~tobyink/ [comments.locale] => en [comments.title_template] => Comment %3$03d [comments.help_text] => Comments are moderated and may take one or two days to show up on the site. You can bypass comment moderation by signing up as a registered user. [legal.copyright.meta] => 2 [legal.copyright.body] => 1 [locale.week_start] => 1 [calendar.shadow_dates] => 1 [homepage.title] => 'Home' [homepage.mode] => 2 [homepage.article_id] => 111 [homepage.tag] => homepage [plugin.org_demiblog_Panels_Debugging_Plugins.show_hidden] => [plugin.org_demiblog_Panels_Debugging_Plugins.show_author] => [plugin.org_demiblog_Panels_Debugging_Plugins.disabled] => 1 [plugin.org_demiblog_Panels_Debugging_Plugins.order] => 200 [plugin.uk_co_tobyinkster_theme1_heading.order] => 1 [plugin.com_google_search_trivial.order] => 1 [plugin.org_demiblog_Panels_LoginForm.order] => 4 [plugin.org_demiblog_Panels_LoginForm.placement] => 1 [plugin.org_demiblog_Panels_Blogroll.order] => 100 [plugin.org_demiblog_Panels_Blogroll.links] => 11 [plugin.org_demiblog_Panels_Blogroll.message] => Here are some other sites. Some might be good; some might be rubbish. You decide. [plugin.org_demiblog_Panels_Blogroll.link1title] => Daring Fireball [plugin.org_demiblog_Panels_Blogroll.link1uri] => http://www.daringfireball.net/ [plugin.org_demiblog_Panels_Blogroll.link1rel] => contact [plugin.org_demiblog_Panels_Blogroll.link2title] => Daily WTF?! [plugin.org_demiblog_Panels_Blogroll.link2uri] => http://thedailywtf.com/ [plugin.org_demiblog_Panels_Blogroll.link3title] => Rijk van Geijtenbeek [plugin.org_demiblog_Panels_Blogroll.link3uri] => http://my.opera.com/Rijk/blog/ [plugin.org_demiblog_Panels_Blogroll.link3rel] => contact [plugin.org_demiblog_Panels_Blogroll.link4title] => Look! Shiny! [plugin.org_demiblog_Panels_Blogroll.link4uri] => http://www.lookshiny.com/ [plugin.org_demiblog_Panels_Blogroll.link5title] => GreyWyvern [plugin.org_demiblog_Panels_Blogroll.link5uri] => http://my.opera.com/GreyWyvern/blog/ [plugin.org_demiblog_Panels_Blogroll.link5rel] => friend [plugin.org_demiblog_Panels_Blogroll.link6title] => Els van Bloois [plugin.org_demiblog_Panels_Blogroll.link6uri] => http://blog.locusmeus.com/ [plugin.org_demiblog_Panels_Blogroll.link6rel] => friend [plugin.org_demiblog_Panels_Blogroll.link7title] => Roy Schestowitz [plugin.org_demiblog_Panels_Blogroll.link7uri] => http://www.schestowitz.com/Weblog/ [plugin.org_demiblog_Panels_Blogroll.link7rel] => friend [plugin.org_demiblog_Panels_Blogroll.link8title] => Hixie's Natural Log [plugin.org_demiblog_Panels_Blogroll.link8uri] => http://ln.hixie.ch/ [plugin.org_demiblog_Panels_Blogroll.link9title] => John Bokma [plugin.org_demiblog_Panels_Blogroll.link9uri] => http://johnbokma.com/mexit/ [plugin.org_demiblog_Panels_Blogroll.link10title] => xkcd [plugin.org_demiblog_Panels_Blogroll.link10uri] => http://xkcd.com [plugin.org_demiblog_Panels_Blogroll.link11title] => Paul Graham [plugin.org_demiblog_Panels_Blogroll.link11uri] => http://paulgraham.com [textile.three_asterisks] =>

[org_demiblog_Filters_Footnotes.style] => i [db.table_prefix] => [server.domain] => [server.urltrim] => [template.title_template] => [plugin.dir] => [plugin.uk_co_tobyinkster_theme1_css.order] => [plugin.uk_co_tobyinkster_theme1_navtop.order] => [plugin.uk_co_tobyinkster_theme1.order] => [plugin.org_demiblog_Filters_Footnotes.order] => [plugin.uk_co_tobyinkster_antispam1.order] => [plugin.org_demiblog_Panels_Standard_Footer.order] => [plugin.org_demiblog_DBF_css.order] => [plugin.org_demiblog_DBF_js.order] => [plugin.org_demiblog_DBF.order] => [blog.showmore] => [plugin.uk_co_tobyinkster_theme1_heading.heading_level] => [plugin.com_google_search_trivial.heading_level] => [plugin.org_demiblog_Panels_LoginForm.heading_level] => [plugin.org_demiblog_Panels_Blogroll.heading_level] => [plugin.uk_co_tobyinkster_theme1_navtop.heading_level] => [plugin.org_demiblog_Panels_Standard_Footer.heading_level] => [metadata.profile] => [template.clearer] => ) [user] => [textile:private] => DemiTextile Object ( [safe_mode] => [pants:protected] => SmartyPants Object ( [mode] => 355 ) [list_filters] => Array ( [raw] => Array ( [0] => _demi_fmt_raw [1] => 1 [2] => Allows raw HTML. [3] => ) [text] => Array ( [0] => _demi_fmt_text [1] => 99 [2] => Plain text. [3] => ) [comments] => Array ( [0] => _demi_fmt_ignore [1] => 3 [2] => DemiTextile comments -- do not pass to browser [3] => ) [keywords] => Array ( [0] => _demi_fmt_ignore [1] => 3 [2] => Used by internal search engine only -- do not pass to browser [3] => ) [code::ada] => Array ( [0] => _demi_fmt_ada [1] => 10 [2] => [3] => ADA ) [code::apache_conf] => Array ( [0] => _demi_fmt_apache_conf [1] => 10 [2] => [3] => Apache Configuration File ) [code::applescript] => Array ( [0] => _demi_fmt_applescript [1] => 10 [2] => [3] => AppleScript ) [code::bash] => Array ( [0] => _demi_fmt_bash [1] => 10 [2] => [3] => bash ) [code::basic] => Array ( [0] => _demi_fmt_qbasic [1] => 10 [2] => Currently an alias for code::qbasic. [3] => BASIC ) [code::bnf] => Array ( [0] => _demi_fmt_bnf [1] => 10 [2] => [3] => Backus-Naur Form ) [code::c] => Array ( [0] => _demi_fmt_cpp [1] => 10 [2] => Currently an alias for code::cpp. [3] => C ) [code::coldfusion] => Array ( [0] => _demi_fmt_coldfusion [1] => 10 [2] => [3] => ColdFusion ) [code::cpp] => Array ( [0] => _demi_fmt_cpp [1] => 10 [2] => [3] => C++ ) [code::csharp] => Array ( [0] => _demi_fmt_csharp [1] => 10 [2] => [3] => C# ) [code::css] => Array ( [0] => _demi_fmt_css [1] => 10 [2] => [3] => Cascading Style Sheet ) [code::delphi] => Array ( [0] => _demi_fmt_pascal_object [1] => 10 [2] => Shorthand for code::pascal::object. [3] => Delphi ) [code::diff] => Array ( [0] => _demi_fmt_diff [1] => 10 [2] => [3] => Patch File ) [code::dos] => Array ( [0] => _demi_fmt_dos [1] => 10 [2] => [3] => MS-DOS/PC-DOS Batch File ) [code::dtd] => Array ( [0] => _demi_fmt_dtd [1] => 10 [2] => [3] => Document Type Definition ) [code::ecmascript] => Array ( [0] => _demi_fmt_javascript [1] => 10 [2] => Currently an alias for code::javascript. [3] => ECMA Script ) [code::fortran] => Array ( [0] => _demi_fmt_fortran [1] => 10 [2] => [3] => FORTRAN ) [code::foxpro] => Array ( [0] => _demi_fmt_foxpro [1] => 10 [2] => [3] => Microsoft Visual FoxPro ) [code::html] => Array ( [0] => _demi_fmt_html [1] => 10 [2] => [3] => Hypertext Markup Language ) [code::ini] => Array ( [0] => _demi_fmt_ini [1] => 10 [2] => [3] => INI Settings File ) [code::java] => Array ( [0] => _demi_fmt_java [1] => 10 [2] => [3] => Java ) [code::javascript] => Array ( [0] => _demi_fmt_javascript [1] => 10 [2] => [3] => Javascipt ) [code::jscript] => Array ( [0] => _demi_fmt_javascript [1] => 10 [2] => Currently an alias for code::javascript. [3] => Microsoft JScript ) [code::latex] => Array ( [0] => _demi_fmt_latex [1] => 10 [2] => [3] => LaTeX ) [code::lisp] => Array ( [0] => _demi_fmt_lisp [1] => 10 [2] => [3] => Lisp ) [code::lua] => Array ( [0] => _demi_fmt_lua [1] => 10 [2] => [3] => Lua ) [code::msdos] => Array ( [0] => _demi_fmt_dos [1] => 10 [2] => Alias for code::dos. [3] => MS-DOS Batch File ) [code::pascal] => Array ( [0] => _demi_fmt_pascal [1] => 10 [2] => [3] => Pascal ) [code::pascal::object] => Array ( [0] => _demi_fmt_pascal_object [1] => 10 [2] => [3] => Object Pascal ) [code::perl] => Array ( [0] => _demi_fmt_perl [1] => 10 [2] => [3] => Perl ) [code::php] => Array ( [0] => _demi_fmt_php [1] => 10 [2] => [3] => PHP ) [code::python] => Array ( [0] => _demi_fmt_python [1] => 10 [2] => [3] => Python ) [code::qbasic] => Array ( [0] => _demi_fmt_qbasic [1] => 10 [2] => [3] => QuickBASIC ) [code::ruby] => Array ( [0] => _demi_fmt_ruby [1] => 10 [2] => [3] => Ruby ) [code::robots_txt] => Array ( [0] => _demi_fmt_robots_txt [1] => 10 [2] => [3] => Robots Exclusion Protocol ) [code::scheme] => Array ( [0] => _demi_fmt_scheme [1] => 10 [2] => [3] => Scheme ) [code::smalltalk] => Array ( [0] => _demi_fmt_smalltalk [1] => 10 [2] => [3] => Smalltalk ) [code::sql] => Array ( [0] => _demi_fmt_sql [1] => 10 [2] => [3] => Structured Query Language ) [code::tcl] => Array ( [0] => _demi_fmt_tcl [1] => 10 [2] => [3] => TCL ) [code::vb] => Array ( [0] => _demi_fmt_visualbasic [1] => 10 [2] => Shorthand for code::visualbasic. [3] => VisualBasic ) [code::vb::asp] => Array ( [0] => _demi_fmt_visualbasic_asp [1] => 10 [2] => Shorthand for code::visualbasic::asp [3] => ASP/VBScript ) [code::vb::net] => Array ( [0] => _demi_fmt_visualbasic_net [1] => 10 [2] => Shorthand for code::visualbasic::net [3] => VB.NET ) [code::visualbasic] => Array ( [0] => _demi_fmt_visualbasic [1] => 10 [2] => [3] => VisualBasic ) [code::visualbasic::asp] => Array ( [0] => _demi_fmt_visualbasic_asp [1] => 10 [2] => [3] => ASP/VBScript ) [code::visualbasic::net] => Array ( [0] => _demi_fmt_visualbasic_net [1] => 10 [2] => [3] => VB.NET ) [code::x86] => Array ( [0] => _demi_fmt_x86asm [1] => 10 [2] => Shorthand for code::x86asm. [3] => Intel x86 Assembly Language ) [code::x86asm] => Array ( [0] => _demi_fmt_x86asm [1] => 10 [2] => [3] => Intel x86 Assembly Language ) [code::xml] => Array ( [0] => _demi_fmt_html [1] => 10 [2] => Uses the same engine as code::html, so some oddities may occur. [3] => eXtensible Markup Language ) [exec] => Array ( [0] => _demi_exec [1] => 2 [2] => Executes contents as PHP. [3] => ) [exec::textile] => Array ( [0] => _demi_exec_textile [1] => 2 [2] => Executes contents as PHP, and treats output as Textile markup. [3] => ) [exec::text] => Array ( [0] => _demi_exec_text [1] => 2 [2] => Executes contents as PHP, and passes output through htmlspecialchars(). [3] => ) ) [options] => Array ( [charset] => utf-8 [filters] => Array ( ) [char_encoding] => 1 [do_quotes] => 1 [trim_spaces] => 1 [smarty_mode] => 1 [preserve_spaces] => 0 [head_offset] => 1 [macros] => Array ( [c|] => ¢ [|c] => ¢ [L-] => £ [-L] => £ [Y=] => ¥ [=Y] => ¥ [(c)] => © [<<] => « [(r)] => ® [+_] => ± [_+] => ± [>>] => » [1/4] => ¼ [1/2] => ½ [3/4] => ¾ [A`] => À [`A] => À [A'] => Á ['A] => Á [A^] =>  [^A] =>  [A~] => à [~A] => à [A"] => Ä ["A] => Ä [Ao] => Å [oA] => Å [AE] => Æ [C,] => Ç [,C] => Ç [E`] => È [`E] => È [E'] => É ['E] => É [E^] => Ê [^E] => Ê [E"] => Ë ["E] => Ë [I`] => Ì [`I] => Ì [I'] => Í ['I] => Í [I^] => Î [^I] => Î [I"] => Ï ["I] => Ï [D-] => Ð [-D] => Ð [N~] => Ñ [~N] => Ñ [O`] => Ò [`O] => Ò [O'] => Ó ['O] => Ó [O^] => Ô [^O] => Ô [O~] => Õ [~O] => Õ [O"] => Ö ["O] => Ö [O/] => Ø [/O] => Ø [U`] => Ù [`U] => Ù [U'] => Ú ['U] => Ú [U^] => Û [^U] => Û [U"] => Ü ["U] => Ü [Y'] => Ý ['Y] => Ý [a`] => à [`a] => à [a'] => á ['a] => á [a^] => â [^a] => â [a~] => ã [~a] => ã [a"] => ä ["a] => ä [ao] => å [oa] => å [ae] => æ [c,] => ç [,c] => ç [e`] => è [`e] => è [e'] => é ['e] => é [e^] => ê [^e] => ê [e"] => ë ["e] => ë [i`] => ì [`i] => ì [i'] => í ['i] => í [i^] => î [^i] => î [i"] => ï ["i] => ï [n~] => ñ [~n] => ñ [o`] => ò [`o] => ò [o'] => ó ['o] => ó [o^] => ô [^o] => ô [o~] => õ [~o] => õ [o"] => ö ["o] => ö [:-] => ÷ [-:] => ÷ [o/] => ø [/o] => ø [u`] => ù [`u] => ù [u'] => ú ['u] => ú [u^] => û [^u] => û [u"] => ü ["u] => ü [y'] => ý ['y] => ý [y"] => ÿ ["y] => ÿ [OE] => Œ [oe] => œ [*] => • [Fr] => ₣ [L=] => ₤ [=L] => ₤ [Rs] => ₨ [C=] => € [=C] => € [tm] => ™ [<-] => ← [->] => → [<=] => ⇐ [=>] => ⇒ [=/] => ≠ [/=] => ≠ [<_] => ≤ [_<] => ≤ [>_] => ≥ [_>] => ≥ [:(] => ☹ [:)] => ☺ [spade] => ♠ [club] => ♣ [heart] => ♥ [diamond] => ♦ ) [flavor] => html/css [_line_open] => [_line_close] =>
[_blockcode_open] =>

                                            [_blockcode_close] => 
[css_mode] => 1 [css] => Array ( [class_align_right] => right [class_align_left] => left [class_align_center] => center [class_align_top] => top [class_align_bottom] => bottom [class_align_middle] => middle [class_align_justify] => justify [class_caps] => caps [class_footnote] => footnote [id_footnote_prefix] => fn ) ) [urlre] => (?: # Must start out right... (?=[a-zA-Z0-9./#]) # Match the leading part (proto://hostname, or just hostname) (?: # ftp://, http://, or https:// leading part (?:ftp|https?|telnet|nntp)://(?:\w+(?::\w+)?@)?[-\w]+(?:\.\w[-\w]*)+ | (?:mailto:)?[-\+\w]+@[-\w]+(?:\.\w[-\w]*)+ | # or, try to find a hostname with our more specific sub-expression (?i: [a-z0-9] (?:[-a-z0-9]*[a-z0-9])? \. )+ # sub domains # Now ending .com, etc. For these, require lowercase (?-i: com\b | edu\b | biz\b | gov\b | in(?:t|fo)\b # .int or .info | mil\b | net\b | org\b | museum\b | aero\b | coop\b | name\b | pro\b | [a-z][a-z]\b # two-letter country codes ) )? # Allow an optional port number (?: : \d+ )? # The rest of the URL is optional, and begins with / . . . (?: /? # The rest are heuristics for what seems to work well [^.!,?;:"'<>()\[\]{}\s\x7F-\xFF]* (?: [.!,?;:]+ [^.!,?;:"'<>()\[\]{}\s\x7F-\xFF]+ #'" )* )? ) [punct] => [\!"\#\$%&'()\*\+,\-\./:;<=>\?@\[\\\]\^_`{\|}\~] [valignre] => [\-^~] [tblalignre] => [<>=] [halignre] => (?:<>|[<>=]) [alignre] => (?:(?:[\-^~]|<>[\-^~]?|[\-^~]?<>|[\-^~]?(?:<>|[<>=])?|(?:<>|[<>=])?[\-^~]?)(?!\w)) [imgalignre] => (?:(?:[<>]|[\-^~]){1,2}) [clstypadre] => (?: (?:\([A-Za-z0-9_\- \#]+\)) | (?:{ (?: \( [^)]+ \) | [^\}] )+ }) | (?:\(+? (?![A-Za-z0-9_\-\#]) ) | (?:\)+?) | (?: \[ [a-zA-Z\-]+? \] ) ) [clstyre] => (?: (?:\([A-Za-z0-9_\- \#]+\)) | (?:{ [A-Za-z0-9_\-](?: \( [^)]+ \) | [^\}] )+ }) | (?: \[ [a-zA-Z\-]+? \] ) ) [clstyfiltre] => (?: (?:\([A-Za-z0-9_\- \#]+\)) | (?:{ [A-Za-z0-9_\-](?: \( [^)]+ \) | [^\}] )+ }) | (?:\|[^\|]+\|) | (?:\(+?(?![A-Za-z0-9_\-\#])) | (?:\)+) | (?: \[ [a-zA-Z]+? \] ) ) [codere] => (?: (?: [\[{] @ # opening (?:\[([A-Za-z0-9]+)\])? # $1: language id (.+?) # $2: code @ # closing [\]}] ) | (?: (?:^|(?<=[\s\(])) @ # opening (?:\[([A-Za-z0-9]+)\])? # $3: language id ([^\s].+?[^\s]) # $4: code itself @ # closing (?:$|(?=[\!"\#\$%&'()\*\+,\-\./:;<=>\?@\[\\\]\^_`{\|}\~]{1,2}|\s)) ) ) [blocktags] => < (( /? ( h[1-6] | p | pre | div | table | t[rdh] | [ou]l | li | block(?:quote|code) | form | input | select | option | textarea ) [ >] ) | !-- ) [links] => Array ( ) [repl] => Array ( ) [tmp] => Array ( [caps] => Array ( ) [r] => Array ( ) [f] => Array ( ) ) [Have_Entities] => 1 ) [plugins:private] => Array ( [com_google_search_trivial] => Array ( [Type] => 9 [Name] => Google Search [Author] => Toby Inkster [Version] => 0.1 [Build] => 20070303 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => [Order] => 1 ) [demiblog] => Array ( [Type] => 0 [Name] => demiblog [Version] => 0.2.3 [Build] => 20070813 [Author] => Toby Inkster [Requires] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Conflicts] => Array ( ) ) [org_demiblog_DBF] => Array ( [Type] => 0 [Name] => DBF Style and Behaviour [Author] => Toby Inkster [Version] => 0.1 [Build] => 20070424 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( [0] => org_demiblog_DBF_css [1] => org_demiblog_DBF_js ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => [Order] => 1000000 ) [org_demiblog_DBF_css] => Array ( [Type] => 32 [Name] => Demiblog Forms (CSS) [Author] => Toby Inkster [Version] => 0.1 [Build] => 20070424 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => 1 [Order] => 1000000 ) [org_demiblog_DBF_js] => Array ( [Type] => 64 [Name] => Demiblog Forms (JS) [Author] => Toby Inkster [Version] => 0.1 [Build] => 20070424 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => 1 [Order] => 1000000 ) [org_demiblog_Filters_Footnotes] => Array ( [Type] => 2 [Name] => Footnote Formatting Filter [Author] => Toby Inkster [Version] => 0.1 [Build] => 20070406 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => [Order] => 1000000 ) [org_demiblog_Panels_Blogroll] => Array ( [Type] => 1 [Name] => Blogroll [Author] => Toby Inkster [Version] => 0.1 [Build] => 20070303 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => [Order] => 100 ) [org_demiblog_Panels_LoginForm] => Array ( [Type] => 1 [Name] => Blogroll [Author] => Toby Inkster [Version] => 0.1 [Build] => 20070303 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => [Order] => 4 ) [org_demiblog_Panels_Standard_Footer] => Array ( [Type] => 1 [Name] => Standard Footer [Author] => Toby Inkster [Version] => 0.1 [Build] => 20070303 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => [Order] => 1000000 ) [uk_co_tobyinkster_antispam1] => Array ( [Type] => 4 [Name] => Spam Blacklists [Author] => Toby Inkster [Version] => 0.1 [Build] => 20071121 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.2.0 ) [is_Embraced] => [Order] => 1000000 ) [uk_co_tobyinkster_theme1] => Array ( [Type] => 0 [Name] => Toby Inkster Theme 1 [Author] => Toby Inkster [Version] => 0.2 [Build] => 20070412 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( [0] => uk_co_tobyinkster_theme1_css [1] => uk_co_tobyinkster_theme1_navtop [2] => uk_co_tobyinkster_theme1_heading ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => [Order] => 1000000 ) [uk_co_tobyinkster_theme1_css] => Array ( [Type] => 32 [Name] => Toby Inkster Theme 1 (CSS) [Author] => Toby Inkster [Version] => 0.2 [Build] => 20070412 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => 1 [Order] => 1000000 ) [uk_co_tobyinkster_theme1_heading] => Array ( [Type] => 1 [Name] => Toby Inkster Theme 1 (Heading) [Author] => Toby Inkster [Version] => 0.2 [Build] => 20070412 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => 1 [Order] => 1 ) [uk_co_tobyinkster_theme1_navtop] => Array ( [Type] => 1 [Name] => Toby Inkster Theme 1 (Main Navigation) [Author] => Toby Inkster [Version] => 0.2 [Build] => 20070412 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => 1 [Order] => 1000000 ) ) [plugins_by_type] => Array ( [1] => Array ( [uk_co_tobyinkster_theme1_heading] => Array ( [Type] => 1 [Name] => Toby Inkster Theme 1 (Heading) [Author] => Toby Inkster [Version] => 0.2 [Build] => 20070412 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => 1 [Order] => 1 ) [com_google_search_trivial] => Array ( [Type] => 9 [Name] => Google Search [Author] => Toby Inkster [Version] => 0.1 [Build] => 20070303 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => [Order] => 1 ) [org_demiblog_Panels_LoginForm] => Array ( [Type] => 1 [Name] => Blogroll [Author] => Toby Inkster [Version] => 0.1 [Build] => 20070303 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => [Order] => 4 ) [org_demiblog_Panels_Blogroll] => Array ( [Type] => 1 [Name] => Blogroll [Author] => Toby Inkster [Version] => 0.1 [Build] => 20070303 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => [Order] => 100 ) [uk_co_tobyinkster_theme1_navtop] => Array ( [Type] => 1 [Name] => Toby Inkster Theme 1 (Main Navigation) [Author] => Toby Inkster [Version] => 0.2 [Build] => 20070412 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => 1 [Order] => 1000000 ) [org_demiblog_Panels_Standard_Footer] => Array ( [Type] => 1 [Name] => Standard Footer [Author] => Toby Inkster [Version] => 0.1 [Build] => 20070303 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => [Order] => 1000000 ) ) [8] => Array ( [com_google_search_trivial] => Array ( [Type] => 9 [Name] => Google Search [Author] => Toby Inkster [Version] => 0.1 [Build] => 20070303 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => [Order] => 1 ) ) [32] => Array ( [uk_co_tobyinkster_theme1_css] => Array ( [Type] => 32 [Name] => Toby Inkster Theme 1 (CSS) [Author] => Toby Inkster [Version] => 0.2 [Build] => 20070412 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => 1 [Order] => 1000000 ) [org_demiblog_DBF_css] => Array ( [Type] => 32 [Name] => Demiblog Forms (CSS) [Author] => Toby Inkster [Version] => 0.1 [Build] => 20070424 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => 1 [Order] => 1000000 ) ) [64] => Array ( [org_demiblog_DBF_js] => Array ( [Type] => 64 [Name] => Demiblog Forms (JS) [Author] => Toby Inkster [Version] => 0.1 [Build] => 20070424 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => 1 [Order] => 1000000 ) ) [2] => Array ( [org_demiblog_Filters_Footnotes] => Array ( [Type] => 2 [Name] => Footnote Formatting Filter [Author] => Toby Inkster [Version] => 0.1 [Build] => 20070406 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.1 ) [is_Embraced] => [Order] => 1000000 ) ) [4] => Array ( [uk_co_tobyinkster_antispam1] => Array ( [Type] => 4 [Name] => Spam Blacklists [Author] => Toby Inkster [Version] => 0.1 [Build] => 20071121 [Conflicts] => Array ( ) [Extends] => Array ( ) [Embraces] => Array ( ) [Requires] => Array ( [0] => demiblog/0.2.0 ) [is_Embraced] => [Order] => 1000000 ) ) ) [plugin_removal_reasons:private] => Array ( [0] => Array ( [0] => org_demiblog_Panels_Debugging_Plugins [1] => Disabled ) ) [_plugins_being_checked:private] => Array ( [com_google_search_trivial] => [demiblog] => [org_demiblog_DBF] => [org_demiblog_DBF_css] => [org_demiblog_DBF_js] => [org_demiblog_Filters_Footnotes] => [org_demiblog_Panels_Blogroll] => [org_demiblog_Panels_LoginForm] => [org_demiblog_Panels_Standard_Footer] => [uk_co_tobyinkster_antispam1] => [uk_co_tobyinkster_theme1] => [uk_co_tobyinkster_theme1_css] => [uk_co_tobyinkster_theme1_navtop] => [uk_co_tobyinkster_theme1_heading] => ) [_current_url:private] => /blog/2007/02/ ) [is_html] => 1 [is_xml] => [lang_attr] => 1 ) [sections] => Array ( [0] => stdClass Object ( [title] => [body] => TobyInkster.co.uk [id] => uk_co_tobyinkster_theme1_heading [division] => 2 [heading_level] => 2 ) [1] => stdClass Object ( [title] => Google Search [body] =>
[id] => com_google_search_trivial [division] => 4 [heading_level] => 2 ) [2] => stdClass Object ( [title] => [body] =>
Login
Sign up
[id] => org_demiblog_Panels_LoginForm [division] => 1 [heading_level] => 2 ) [3] => stdClass Object ( [title] => Blog for February 2007 [body] =>

27/02/2007: Re: is PHP less secure than Perl, Python, or Ruby?

PHP is not inherently insecure, but because it’s very easy to write PHP, it has become rather a popular language amongst people with little, if any, formal training on how to program. Because of this, there are an awful lot of badly written PHP scripts out there; installing them may well open up your server to abuse….

Full article.
Filed under: , , .

27/02/2007: PHP4 vs PHP5 [was Re: Extending the mysqli class]

Michael Fesser wrote:

My scripts make use of many of the new OOP features in PHP 5, so they won’t run at all on PHP 4.

Ditto.

My current big pet project is http://demiblog.org/. This is PHP 5+ only and supports MySQL 5+ and PostgreSQL 8+. Although I do realise that earlier versions of these packages are still quite widely used out there, this project probably won’t hit the big 1.0 for another year or two, by which time, the hosting world will have probably moved on a lot. Supporting older versions of PHP and the database engines will cost development time and push back the project release date even later, by which time PHP 4 support will be even less relevant.

So although PHP 4 may still be alive right now, it’s counting down the