Developing web pages in PHP

Most web space these days comes with the PHP language, usually running on the Apache webserver, with the MySql database.  When developing scripts of one’s own, ideally one replicates this on the PC.  But frankly, installing all this stuff is a faff.

This week I came across the Wampserver package.  This allows you to install all three items in one go, and has a single menu to start (and stop) the lot.  It doesn’t install a load of things that you then have to manually disable, and it just works out of the box fine.

I’ve used Notepad++ for most such scripting, but this is rather underpowered.  Instead I have been using lately Eclipse for PHP, the PDP development tools (PDT) version.  This likewise works well.  If you are a Java developer, with an Eclipse setup, you can relax — it unzips to a different directory, and doesn’t interfere at all.  You can run, thus, two different versions of Eclipse quite happily.

For unit testing I’ve been using SimpleTest.  You get the software and unzip to a directory on your C: drive.  There is an obsolete eclipse plugin for this — which no longer works and ought to be updated.  But you can run SimpleTest just fine in eclipse anyway, using the following instructions:

  1. download and install SimpleTest.
  2. put a require_once('autorun.php'); at the top of the test file.

    note: this requires the SimpleTest directory containing autorun.php to be in your include_path. alternatively, you can include autorun.php by full path, like require_once('C:/full/path/to/your/Simpletest/autorun.php');. it might even be possible not having to change the test file by including autorun.php via auto_prepend_file.

  3. run the test by right clicking on the test file and select “Run As PHP Script”
  4. the output from the testing shows up in the eclipse console

Although in my case it doesn’t show up in the console, but as a web page, so long as Wamp has been started.

Share

Graeco-Roman mummy portrait exhibition at the John Rylands Library

A news item which seems to have passed unnoticed: the John Rylands library in Manchester, UK, is running an exhibition from today, 19th July until 25th December

The ten mummy portrait panels and the 40 or so papyri, both from around 2000-years-ago, were mostly found in the Fayum region, south of Cairo.

Dating to the Roman Empire, the portraits and papyri provide a unique insight into how the  Egyptians living under Roman rule saw themselves.

The so-called ‘Fayum portraits’ were found covering the faces of mummies found by the archaeologist William Flinders Petrie in 1888 and 1911.

Petrie was financed by the wealthy Manchester cotton magnate Jesse Haworth, and most of the portraits came to the University’s Manchester Museum as his legacy.

The papyri came to Manchester through acquisitions made by John Rylands Library founder Enriqueta Rylands, from 1901 to her death (1908), and later continued by the Library until 1920.

They include famous pieces, such as one of the two extant Greek fragments of the apocryphal Gospel of Mary, possibly Mary of Magdala, and documents from everyday life such as a contract of marriage and census returns.

The exhibition is entitled Faces and Voices, and includes 10 of the marvellous Graeco-Roman portraits found by Flinders Petrie in the Fayoum.

The portraits were painted on boards, which were then attached to mummies, and so recovered in modern times.

The papyri are equally interesting.  Most are documentary; but there is a fragment of the pseudo-gospel of Mary.  It is mildly depressing to see some paleobabble in the press-release:

Professor Cooper said: “The exciting thing about the papyri is that they show a forgotten side of history. For example, the Gospel of Mary fragment argues that women should have a leadership role in the Christian church, a view which the medieval Church tried to suppress. This third-century document is very timely in light of the current debate about women bishops in the Church of England.”

This is a little misleading, I’m afraid.

The early Christians themselves tell us that there were people who followed teachings that they made up themselves, or borrowed from contemporary pagan culture rather than learned it from the apostles.  They also tell us that such folk were not above forging texts under the names of apostles, in order to project their teachings back into the apostolic age.  Various texts of this kind, from the 2nd century AD onwards, survive.  Each is clearly recognisable, in that it laces pseudo-biblical material with material derived from contemporary paganism, in just the manner described by Tertullian in De praescriptione haereticorum.  The so-called “gospel of Mary” is one of these late texts, and tells us nothing about early Christianity; only about those who sought to corrupt it. 

Likewise the “women bishops” link is of doubtful relevance to antiquity.  Unless, of course, we could see this as just one more example of how outsiders in every age attempt to impose their own doctrines on Christians, by pressure, by politics, and by violence?  But I fear this is not what Dr Cooper intended that we should hear.

This lapse aside, it is still very pleasing to see these documents.  I was glad to see that English translations of some of the papyri were appearing on the blog.  More please!

Share

From my diary

I spent some time today reading the online French translations[1] of the poems of Sidonius Apollinaris.  I was very struck by the way that the poet appeals repeatedly to the works of the early empire, to Horace and Sallust and Varro and Tacitus.  I saw no mention of any later writers, indeed.

This evening I found myself wondering whether the Loeb edition and translation, Sidonius. Poems and letters, tr. W. B. Anderson, Harvard, 1936, was actually out of copyright in the USA.  (Anderson died in 1959, I learn, so his work won’t come out of copyright in the European Union until 2029, by which time most of us will doubtless be dead).  I suspect that it is.  Copyright at that period was for 28 years, and could be renewed for a further 28 years.  But I found no evidence that it had been renewed.

The situation is complicated, for works between 1923 and 1964, by the “copyright restoration” for foreign works that followed the US signing of the Berne convention in 1994.  A fascinating paper by Peter B. Hirtle[2] discusses this subject, and makes the following, startling statements:

It has long been assumed that most of the works published from 1923 to 1964 in the US are currently in the public domain. Both non-profit and commercial digital libraries have dreamed of making this material available. Most programs have recognized as well that the restoration of US copyright in foreign works in 1996 has made it impossible for them to offer to the public the full text of most foreign works. What has been overlooked up to now is the difficulty that copyright restoration has created for anyone trying to determine if a work published in the United States is still protected by copyright. …

This paper has demonstrated that it is almost impossible to determine with certainty whether a work published from 1923 through 1963 in the US is in the public domain because of copyright restoration of foreign works.

What idiots our politicians are!  What knaves the publishing lobbyists must be, to cause so much nuisance for so little gain for anyone, including themselves!

All the same, I tentatively conclude, after reading Hirtle’s paper carefully, that Anderson’s translation of the poems of Sidonius Apollinaris is indeed now in the public domain in the USA.

I have also been reading a paper discussing whether Sidonius actually criticises Majorian, in carmen 5, the Panegyric for Majorian.[3].  There is a long section in the panegyric in which a polemic against Majorian is placed in the mouth of Pelagia, wife of the deceased Aetius.  Perhaps this does reflect the nervousness of the Gallo-Roman supporters of the unfortunate emperor Avitus towards the military newcomer Majorian.  Desperate times, suspicion everywhere, harsh punishments for speaking the wrong thing, supporting the wrong candidate for the throne, while the empire fell apart … such times make men adopt whatever shifts they can.

Does it matter now?  Well, only inasmuch as parallels might be drawn for later history.  The assassination of Majorian in 461 by his own prime minister, the sinister Ricimer, made the fate of Gaul — to become France — certain.  The western empire itself had only fifteen more years to live.  And Majorian himself lives now only in the portrait drawn of him by Sidonius, partly in the panegyric, but more in the letters.

Yet … Majorian does indeed live in that portrait.  He failed to save the Roman state.  Probably no-one could have done so at that stage.

Yet, because of the words of Sidonius, we, fifteen centuries later, are discussing him.

UPDATE (20/7/2012): I find that vol. 1 of the Loeb, which includes all the poems, is in fact online at Archive.org, here.

Share
  1. [1]At remacle.org.
  2. [2]Peter B. Hirtle, Copyright Renewal, Copyright Restoration, and the Difficulty of Determining Copyright Status, D-Lib Magazine 14.7/8, 2008. Online here.
  3. [3]Philip Rousseau, Sidonius and Majorian: The Censure in “Carmen” V, Historia: Zeitschrift für Alte Geschichte, Bd. 49, H. 2 (2nd Qtr., 2000), pp. 251-257. JSTOR url: http://www.jstor.org/stable/4436579

JSTOR access for Oxford University alumni

I see that Oxford University has arranged to provide JSTOR access to its graduates, those who have left college and are sat in offices, vaguely longing to read another paper on Cicero.

In this case you go to the alumni office website, obtain the card number for an alumni card (they email you after a week or so), then register an account on the website (a couple more weeks), and, when that is validated, you can register for JSTOR.

This is a good thing.  All universities should do this.

Share

French translation of the poems of Sidonius Apollinaris

Looking around the web, I discover that the poems and letters of Sidonius Apollinaris are online in French and Latin at remacle.org.  In particular Carmen 5, the panegyric for Majorian, is here.

Share

British Library papyrus of the Aristotelean constitution of the Athenians – images online

Via AWOL I stumbled across this item:

Sean Bonawitz, Neel Smith, and Christopher Blackwell are working during the summer of 2012 on the first steps of a comprehensive publication of only surviving witness to the Aristotelian Constitution of the Athenians. The papyrus is B.M. Pap. 131, that is, British Museum Papyrus number 131. Christopher Blackwell and Amy Hackney Blackwell, working with Chris Lee of the British Library, photographed this papyrus in November of 2011. …

The papyrus exists in five fragments. The five fragments show four different manuscript hands. The hands differ in appearance and in their use of abbreviations. According to John Edward Sandy’s 1893 commentary, pp. xxxvi–xxxix,, the first hand “extends over Columns 1–12” the second columns 13 to 20, the third hand runs from 20 to 24 and columns 31–37, while the fourth scribe includes columns from 25 to 30.

Hands one and four are most similar to each other, but certainly not identical; Sandy’s came to this conclusion by counting the occurrence of abbreviations. While the first and fourth scribes used a significant amount of short-hand (“tachygraphy”) and abbreviations, the second hand hardly uses any, and in the columns written by the third hand they are scarce. Perhaps the most important thing about the change of hands are the editorial notes that occur throughout the piece. Who was this editor, and why did he make these notes?

Images of the papyrus are here.

The papyrus is public property, so naturally the British Library staff have demanded copyright notices all over the place, in case somebody not a member of the public should use them for something.  It reminds us forcefully how much we need reform of copyright law.

But placing the images online is invaluable!  I very much hope that people will work with them.

The papyrus itself dates to the end of the 1st century AD.  It is a roll, from Egypt, acquired on the art market apparently, and on the “normal” side there is a set of accounts drawn up by a bailiff on a private estate in the 11th year of Vespasian (i.e. Aug. 78-June 79 A.D.).  The reverse was used, some time later, for a column and a half of a summary of the Midias of Demosthenes.  But this was then erased, and the Constitution of the Athenians written instead.

The text exists in translation by F.G.Kenyon here.  It was composed before 322 BC, and after 334 AD.[1]

The constitutions begin with an overview of Athenian political history, and they contain many interesting snippets on ancient life in Athens.  Here are a couple of random examples:

As soon as he was at the head of affairs, Solon liberated the people once and for all, by prohibiting all loans on the security of the debtor’s person: and in addition he made laws by which he cancelled all debts, public and private. This measure is commonly called the Seisachtheia [= removal of burdens], since thereby the people had their loads removed from them. In connexion with it some persons try to traduce the character of Solon. It so happened that, when he was about to enact the Seisachtheia, he communicated his intention to some members of the upper class, whereupon, as the partisans of the popular party say, his friends stole a march on him; while those who wish to attack his character maintain that he too had a share in the fraud himself. For these persons borrowed money and bought up a large amount of land, and so when, a short time afterwards, all debts were cancelled, they became wealthy; and this, they say, was the origin of the families which were afterwards looked on as having been wealthy from primeval times. However, the story of the popular party is by far the most probable.  …

It was in one of these progresses that, as the story goes, Pisistratus had his adventure with the man of Hymettus, who was cultivating the spot afterwards known as ‘Tax-free Farm’. He saw a man digging and working at a very stony piece of ground, and being surprised he sent his attendant to ask what he got out of this plot of land. ‘Aches and pains’, said the man; ‘and that’s what Pisistratus ought to have his tenth of’. The man spoke without knowing who his questioner was; but Pisistratus was so leased with his frank speech and his industry that he granted him exemption from all taxes. …

The democracy has made itself master of everything and administers everything by its votes in the Assembly and by the law-courts, in which it holds the supreme power. Even the jurisdiction of the Council has passed into the hands of the people at large; and this appears to be a judicious change, since small bodies are more open to corruption, whether by actual money or influence, than large ones. At first they refused to allow payment for attendance at the Assembly; but the result was that people did not attend. Consequently, after the Prytanes had tried many devices in vain in order to induce the populace to come and ratify the votes, Agyrrhius, in the first instance, made a provision of one obol a day, which Heracleides of Clazomenae, nicknamed ‘the king’, increased to two obols, and Agyrrhius again to three.  …

It is interesting to see that, in ancient Athens as today, ordinary people have better things to do than attend political meetings!

There are ten Commissioners for Repairs of Temples, elected by lot, who receive a sum of thirty minas from the Receivers-General, and therewith carry out the most necessary repairs in the temples.

There are also ten City Commissioners (Astynomi), of whom five hold office in Piraeus and five in the city. Their duty is to see that female flute-and harp-and lute-players are not hired at more than two drachmas, and if more than one person is anxious to hire the same girl, they cast lots and hire her out to the person to whom the lot falls. They also provide that no collector of sewage shall shoot any of his sewage within ten stradia of the walls; they prevent people from blocking up the streets by building, or stretching barriers across them, or making drain-pipes in mid-air with a discharge into the street, or having doors which open outwards; they also remove the corpses of those who die in the streets, for which purpose they have a body of state slaves assigned to them.

Share
  1. [1]All these details from Sandys, p.xxxix.

Silencing dissent in the modern world

It is extraordinary to me how something mad and evil, which was unheard of a couple of years ago, can suddenly become something which it is positively dangerous to oppose.  But so it is, in our unhappy world.  In this case I refer to “gay marriage”, but it could be any number of causes, where disagreement is suddenly dangerous to express.

I read today this blog post, which discusses how, in the USA, opposition to this cause is being silenced, by a “wall of hatred” technique.  It spells out particularly well, how dissent is silenced.

… it’s basically unprecedented for a professor to be formally investigated on a charge of scientific misconduct because a blogger didn’t like his findings. …

What is the purpose of his baseless charge?  I suspect it is twofold: first to get the university to let him conduct a fishing expedition through Prof. Regnerus’s personal correspondence to find anything that can be used to a.) tar this scholar and/or b.) harass others close to him, for being close to him.

Second, Rose hopes the hassle will discourage any other professor from investigating how children fare raised by gay parents, unless they can pretty much guarantee the results will be favorable to the Scott Rose’s of the world.

Marriage is important.  Religious liberty is important.  The structures of scientific inquiry are also important.

In a society that has lost faith in other modes of reasoning, science has become a trump card in public and moral debates.

Therefore, if you want to establish a new public morality, it becomes important to control the scientific processes to suppress dissent, to make dissent costly and therefore rare.

A culture war is a struggle over who has the power to name reality.

Celebrities, professionals and scholars are all now subjected to this dynamic: to oppose gay marriage is to be subjected to an outpouring of hatred and threats.

The goal is to silence.

It doesn’t matter what the cause is, although this one is particularly vile.  For we may be sure that the next one will be worse: the vileness is intentional, the purpose is to give offence, and then to force compliance.

It is not enough for evil that someone does what they want; they must be made to do it against their will.

Until we have some mechanism to push back against this technique of censorship, we may be sure that more, and worse will follow.

Share

UK government promoting open access to research it funds?

The UK government has done something or other, according to The Register.  But it’s not as clear as one might like:

Universities will be provided with funding to ensure that their academics’ research papers are made more widely available, the government has said.

The government broadly backed recommendations contained in a report by the Working Group on Expanding Access to Published Research Findings in its policy aimed at supporting ‘open access’ to research.

The seven UK Research Councils will provide universities that establish ‘publication funds’ with grants in order that the organisations can pay publishers an ‘article processing charge’ (APC) to publish their work.

Erm, this sounds complicated.  Why not simply require that government-funded work is open access?  No open access, no funds?

“Where APCs are paid to publishers, the government would expect to see unrestricted access and use of the subject content …”

… Under the policy wholly or partially publically funded peer reviewed research papers will be required to be published in journals that comply with its open access policy and detail information such as how the “underlying research materials such as data, samples or models can be accessed”.

Wow.  Complicated.  And:

Willetts said that the government was happy to enable publishers to put embargoes that restrict access to content in certain circumstances. He said publishers should be able to protect the value of their work where their funding is not mainly reliant on APCs but that length embargo periods may not be justified in the public interest.

“Embargo periods allowed by funding bodies for publishers should be short where publishers have chosen not to take up the preferred option of their receiving an Article Processing Charge,” Willetts said.

Um, “embargo periods”?

It sounds very complicated, and expensive for the tax payer.

Let’s hope that underneath all this verbiage is a clear simple commitment that the tax payer should not pay for material which the tax payer cannot access.

UPDATE: It seems that I am not alone in being sceptical about this announcement.  Bishop Hill comments:

All scientific research funded by the UK taxpayer is to become open source, according to an article in the Guardian. It seems that academics will be required to pay the fees to make their papers freely available.

Since few journals will solely publish papers by UK academics, this presumably means that the scientific publishers will retain the library subscriptions which are the bedrock of their profits, while gaining a massive windfall in the shape of open access fees for much of their content.

A good day to be a scientific publisher I think.

I suspect so.  The Guardian article contains some sensible words by Stevan Harnad:

“The Finch committee’s recommendations look superficially as if they are supporting open access, but in reality they are strongly biased in favour of the interests of the publishing industry over the interests of UK research,” he said.

“Instead of recommending that the UK build on its historic lead in providing cost-free green open access, the committee has recommended spending a great deal of extra money — scarce research money — to pay publishers for “gold open access publishing. If the Finch committee recommendations are heeded, as David Willetts now proposes, the UK will lose both its global lead in open access and a great deal of public money — and worldwide open access will be set back at least a decade,” he said.

The phrase that springs to mind is “crony capitalism”, where the government is in the pocket of the vested interests.  Yet this is OUR money being spent!

Tellingly the Register says:

The UK Publishers’ Association welcomed the plans.

Share

Majorian in the De Imperatoribus Romanis site

I have been reading the entry in the DIR website on Majorian (457-461 AD), the last effective western Roman emperor.  The article is by Ralph Mathisen, and is a model of what an online article should be.  The site is, indeed, invaluable.

Majorian is an attractive figure, and it is a pity that the main source for his reign is not online.  I refer here to the Panegyric for Majorian by Sidonius Apollinaris.  An English translation does exist in the Loeb edition, but this is in copyright.  I digitised the letters of Sidonius from an out-of-copyright source some time back.

Mathisen quotes a revealing passage, from one of Sidonius’ letters, from Majorian’s Gallic campaign, when he was attempting to conciliate the grandees of the region, soon to lose their independence and property to the Goths.  Majorian had issued an edict against informers.

In the reign of Majorian, an anonymous but very biting satire in verse was circulated at court; gross in its invective, it took advantage of unprotected names… its attack was above all personal… I came to Arles suspecting nothing…

The next day I paid my duty to the emperor… The emperor commanded my presence at the banquet he was giving on the occasion of the games…

When the dinner was well advanced… the emperor turned round to me and said, “It is news to me, Count Sidonius, that you are a writer of satires.” “Sire,” I replied, “It is news to me too.”

“Anyhow,” he replied with a laugh, “I beg you to be merciful to me.” “I shall spare myself also,” I rejoined, “by refraining from illegality.”

Thereupon the emperor said, “What shall we do, then, to the people who have accused you?”

“This, Sire,” I answered, “Whoever my accuser be, let him come out into the open. If I am proven guilty, let me suffer the penalty. But if, as is likely, I rebut the charge, I ask of Your Clemency permission to write anything I choose about my assailant, provided I observe the law.”

The emperor … replied, “I agree to your conditions, if you can put them in verse on the spot.” … I replied,

Who says I write satires? Dread soverign, I cry,
Let him prove his indictment, or pay for his lie.

Then the emperor proclaimed, “I call God and the common welfare to witness that in future I give you license to write what you please; the charge brought against you was not susceptible of proof. It would be most unjust if the imperial decision allowed such latitude to private quarrels that evident malice might imperil by obscure charges nobles whom conscious innocence puts wholly off their guard…

(Epist.1.11.2-15: Dalton trans., 1.26-33. and Hodgkin trans., 2.425).

It is telling that, in the last days of the Roman state, opinion was strictly regulated.  The state that was too feeble to defend its citizens was not too feeble to imprison them for voicing the opinion that its rulers were inept.

Share

From my diary

I have been away on holiday for a while, so most of my projects have taken a back seat.

I’ve received the first draft of a translation of the 4th century Acts of ps.Linus, or rather of the “Peter” half.  This I hope to look at today.

I’ve also started to do more work on the PHP code for my Mithras pages.

It is summer time, although it doesn’t quite seem like it, and I notice everyone is blogging less.  We all need some kind of stimulation — anger, rage, envy, resentment, disagreement, the usual staple incentives for online posting — and this is rather lacking at the moment.  No-one has said anything I disagree with for ages!  Oh well.

Share