Greg
animals brewing
food and drink fiction
gardening general
health history
language music
multimedia opinion
photography politics
Stones Road house technology
Greg's diary
recent entries
Translate this page
Select day in September 2019:
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Select month:
2019 Jan Feb Mar Apr
2019 May Jun Jul Aug
2019 Sep Oct Nov Dec
Today's diary entry
Diary index
About this diary
Greg's home page
Greg's photos
Network link stats
Greg's other links
Copyright information
    
Groogle

Sunday, 15 September 2019 Dereel Images for 15 September 2019
Top of page
next day
last day

Bloody Iranians!
Topic: politics, opinion Link here

One of the more interesting strategies in modern warfare is the use of drones. The Houthis in Yemen have been using them for a while, inflicting some damage on the territory of the Saudi invaders.

But yesterday they damaged key Saudi oil installations. That's a completely different level, and various reports claim (almost certainly incorrectly) that up to half the world's oil supply could be threatened. Did they deny responsibility? No, quite the contrary: they claimed to have done it, which sounds plausible.

But that's all fake news. US Secretary of State Mike Pompeo got up on his hind legs and claimed:

Tehran is behind nearly 100 attacks on Saudi Arabia while Rouhani and Zarif pretend to engage in diplomacy. Amid all the calls for de-escalation, Iran has now launched an unprecedented attack on the world’s energy supply. There is no evidence the attacks came from Yemen.

Fascinating:

  1. Rouhani and Zarif “pretend to engage in diplomacy”. That clearly puts them apart from the US, who don't even pretend.
  2. “There is no evidence the attacks came from Yemen”. Well, that depends on what he means by “evidence”. At the very least there are the claims made by the probably perpetrators.
  3. No evidence? OK, Pompeo, where's your evidence for Irani involvement?

I was hoping that after the sacking of John Bolton the USA might become saner again. I can't see any evidence. I'd like to say “I'm disgusted” and be done with it. But this irresponsible behaviour of the USA makes war ever more likely.


Where did my mail go?
Topic: technology, opinion Link here

For the last couple of days I have had no automatic daily reports from teevee. Why? It's still running normally. Off to take a look.

The first part of the problem was that I had removed the wrong disk when swapping the backup disks I have on eureka. I have two separate photo backup disks, and one is kept at Chris Bahlo's place. But a couple of days ago I accidentally removed the video backup disk, with the result that the nightly backups didn't continue (some hang, strangely). Fix that and run the nightly cleanup script:

=== root@teevee (/dev/pts/10) ~ 27 -> mailme cleanup

It ran, but I got no output. What happened? From /var/log/maillog:

Sep 15 14:30:12 teevee postfix/pickup[70746]: 166EB8ADD6: uid=0 from=<root@teevee.lemis.com>
Sep 15 14:30:12 teevee postfix/cleanup[70791]: 166EB8ADD6: message-id=<20190915043012.166EB8ADD6@teevee.lemis.com>
Sep 15 14:30:12 teevee postfix/qmgr[909]: 166EB8ADD6: from=<root@teevee.lemis.com>, size=21089, nrcpt=1 (queue active)
Sep 15 14:30:12 teevee postfix/smtp[70795]: 166EB8ADD6: to=<root@teevee.lemis.com>, relay=eureka.lemis.com[192.109.197.137]:25, delay=0.22, delays=0.12/0.06/0/0.03, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 52B89264C5D)
Sep 15 14:30:12 teevee postfix/smtpd[70796]: connect from eureka[192.109.197.137]
Sep 15 14:30:12 teevee postfix/smtpd[70796]: 7FEC18AF55: client=eureka[192.109.197.137]
Sep 15 14:30:12 teevee postfix/qmgr[909]: 7FEC18AF55: from=<root@teevee.lemis.com>, size=21859, nrcpt=1 (queue active)
Sep 15 14:30:12 teevee postfix/smtp[70795]: 7FEC18AF55: to=<root@teevee.lemis.com>, relay=eureka.lemis.com[192.109.197.137]:25, delay=0.01, delays=0/0/0/0, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 93F86264C5D)
...
Sep 15 14:30:13 teevee postfix/qmgr[909]: 5F3E78AF56: from=<>, size=41479, nrcpt=1 (queue active)
Sep 15 14:30:13 teevee postfix/smtp[70795]: 5F3E78AF56: to=<root@teevee.lemis.com>, relay=eureka.lemis.com[192.109.197.137]:25, delay=0.01, delays=0/0/0/0, dsn=5.4.0, status=bounced (host eureka.lemis.com[192.109.197.137] said: 554 5.4.0 Error: too many hops (in reply to end of DATA command))
Sep 15 14:30:13 teevee postfix/qmgr[909]: 5F3E78AF56: removed

A mail loop! But how did that happen? It was working fine before. How did the problem occur? Back looking through /usr/local/etc/postfix/main.cf:

# For the sake of consistency between sender and recipient addresses,
# myorigin also specifies the default domain name that is appended
# to recipient addresses that have no @domain part.
#
#myorigin = $myhostname
myorigin = $mydomain

That looks right. The mail should go to root@lemis.com, not root@teevee.lemis.com.

Oh, wait, that's the From: address. Where does this message get sent? mailme is a shell function:

  mailme()
    {
    cmd=$1
    shift
    xtset mailme $cmd
    date
    $cmd $* 2>&1 | tee /dev/tty | mail -s "mailme: $cmd $*" `who am i|awk '{print $1}'`
    cd .
    date
  }
fi

OK, it invokes mail. Try running that. It hangs! Normally mail stops reading input when it gets a line with a single period on it. But today it didn't. It didn't even (directly) respond to Ctrl-C.

Finally it dawned on me:

=== root@teevee (/dev/pts/10) ~ 27 -> wh mail
4256743 -rwxr-xr-x  1 root  wheel  212104  4 Jul 12:57 /usr/local/bin/mail
 980079 -r-xr-xr-x  3 root  wheel  115440  7 Jul 14:49 /usr/bin/mail

And yes, I put /usr/local/bin before /usr/bin in my PATH, which usually works better. But what's that /usr/local/bin/mail doing there? I didn't ask for that.

=== grog@teevee (/dev/pts/5) ~ 76 -> pkg which /usr/local/bin/mail
/usr/local/bin/mail was installed by package mailutils-3.7_1

OK, get rid of that:

=== root@teevee (/dev/pts/10) ~ 21 -> pkg delete mailutils-3.7_1
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 2 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        mailutils-3.7_1
        emacs-26.2,3

Somewhere I swear there's a conspiracy to ensure that any package removal includes removing Emacs. But clearly that's not an option.

=== root@teevee (/dev/pts/10) ~ 22 -> chmod -x /usr/local/bin/mail

That did the trick. But why did this happen now? After some consideration, it's clearly because I had elevated myself to root with su rather than logging in directly. As a result it used my PATH rather than root's PATH.


Monday, 16 September 2019 Dereel Images for 16 September 2019
Top of page
previous day

Spring is here
Topic: gardening, opinion Link here

Mid-September, a time of month when I used to do my monthly flower photos. I've put that off until the Equinox, but particularly right now the flowers are of interest. The north garden is full of flowering bulbs, and the succulent bed is flowering nicely:


This should be North-bed.jpeg.  Is it missing?
Image title: North bed          Dimensions:          5184 x 3889, 5695 kB
Make a single page with this image Hide this image
Make this image a thumbnail Make thumbnails of all images on this page
Make this image small again Display small version of all images on this page
All images taken on Monday, 16 September 2019, thumbnails          All images taken on Monday, 16 September 2019, small
Diary entry for Monday, 16 September 2019 Complete exposure details

 
This should be Succulent.jpeg.  Is it missing?
Image title: Succulent          Dimensions:          5184 x 3888, 4459 kB
Make a single page with this image Hide this image
Make this image a thumbnail Make thumbnails of all images on this page
Make this image small again Display small version of all images on this page
All images taken on Monday, 16 September 2019, thumbnails          All images taken on Monday, 16 September 2019, small
Diary entry for Monday, 16 September 2019 Complete exposure details

 

The Iris (plant) are also flowering, including the new dark ones that we got from Petra Gietz:

And so are the Alyogyne huegelii:

I almost wonder if I want to hide them by planting tomatoes there.

But one plant is giving cause for concern: the Echium that looked so good only last week. Here then (first image) and now:


This should be Echium.jpeg.  Is it missing?
Image title: Echium          Dimensions:          3888 x 5186, 3032 kB Display location on map
Make a single page with this image Hide this image
Make this image a thumbnail Make thumbnails of all images on this page
Make this image small again Display small version of all images on this page
All images taken on Tuesday, 3 September 2019, thumbnails          All images taken on Tuesday, 3 September 2019, small
Diary entry for Tuesday, 3 September 2019 Complete exposure details

 
This should be Echium-1.jpeg.  Is it missing?
Image title: Echium 1          Dimensions:          5184 x 3888, 5028 kB
Make a single page with this image Hide this image
Make this image a thumbnail Make thumbnails of all images on this page
Make this image small again Display small version of all images on this page
All images taken on Monday, 16 September 2019, thumbnails          All images taken on Monday, 16 September 2019, small
Diary entry for Monday, 16 September 2019 Complete exposure details

 
This should be Echium-2.jpeg.  Is it missing?
Image title: Echium 2          Dimensions:          3888 x 5185, 2050 kB
Make a single page with this image Hide this image
Make this image a thumbnail Make thumbnails of all images on this page
Make this image small again Display small version of all images on this page
All images taken on Monday, 16 September 2019, thumbnails          All images taken on Monday, 16 September 2019, small
Diary entry for Monday, 16 September 2019 Complete exposure details

 

What has happened? Went looking and discovered something similar for last year.


This should be Echium-1.jpeg.  Is it missing?
Image title: Echium 1          Dimensions:          5184 x 3888, 9696 kB Display location on map
Make a single page with this image Hide this image
Make this image a thumbnail Make thumbnails of all images on this page
Make this image small again Display small version of all images on this page
All images taken on Friday, 5 October 2018, thumbnails          All images taken on Friday, 5 October 2018, small
Diary entry for Friday, 5 October 2018 Complete exposure details

 

Does it need more fertilizer? Or water? There should be plenty of water.


Web site configuration, next step
Topic: technology, opinion Link here

I've been dragging my feet on configuring the new web site, but time is moving on. I need to complete the migration by the end of the month, and that includes moving Chris Bahlo's stuff as well. The current status was that Apache works, but I hadn't configured PHP. OK, off to look at the documentation.

What documentation? I didn't find much of use. Though this page gave some ideas, it didn't relate directly to what I was looking for, and it also wasn't official. The official just had an indication to install mod_php71, and at FreeBSD handbook just had an indication to install mod_php56, not exactly the latest release, and said nothing about configuration. I had already done that, and I know there's more to it than that. But I couldn't find any documentation that says what to do, though there was some mention of a file /usr/local/etc/php.ini, which didn't exist.

OK, from memory: you need to install base PHP separately. Why doesn't the module depend on it? And why PHP 5.6? A bit of investigation showed that 7.3 is the latest version, though it's not clear whether it's a supported release or beta. What the hell, install it anyway. That gave me /usr/local/etc/php.ini-production and /usr/local/etc/php.ini-development. Which do I use? What's the difference? It seems mainly related to error reporting.

OK, based on my configuration on the old www, just add the include_path:

--- php.ini     2019/09/07 01:13:29     1.1
+++ php.ini     2019/09/16 05:56:44
@@ -734,7 +734,9 @@

 ; UNIX: "/path1:/path2"
 ;include_path = ".:/php/includes"
-;
+
+include_path = ".:/home/grog/www.lemis.com/grog/php/includes"
+
 ; Windows: "\path1;\path2"
 ;include_path = ".;c:\php\includes"
 ;

Is that enough? No, first I need to add stuff to httpd.conf. Also did some comparison with www, and ended up with:

--- httpd.conf  2019/08/22 04:02:47     1.1
+++ httpd.conf  2019/09/16 06:12:48
@@ -178,7 +178,16 @@
 #LoadModule userdir_module libexec/apache24/mod_userdir.so
 LoadModule alias_module libexec/apache24/mod_alias.so
 #LoadModule rewrite_module libexec/apache24/mod_rewrite.so
+LoadModule php7_module        libexec/apache24/libphp7.so

+# Does this belong here?  Greg 20190916
+<FilesMatch "\.php$">
+    SetHandler application/x-httpd-php
+</FilesMatch>
+<FilesMatch "\.phps$">
+    SetHandler application/x-httpd-php-source
+</FilesMatch>
+
 # Third party modules
 IncludeOptional etc/apache24/modules.d/[0-9][0-9][0-9]_*.conf

@@ -213,7 +222,7 @@
 # e-mailed.  This address appears on some server-generated pages, such
 # as error documents.  e.g. admin@your-domain.com
 #
-ServerAdmin you@example.com
+ServerAdmin grog@lemis.com

 #
 # ServerName gives the name and port that the server uses to identify itself.
@@ -222,7 +231,7 @@
 #
 # If your host doesn't have a registered DNS name, enter its IP address here.
 #
-#ServerName www.example.com:80
+ServerName www.lemis.com:80

 #
 # Deny access to the entirety of your server's filesystem. You must
@@ -246,8 +255,10 @@
 # documents. By default, all requests are taken from this directory, but
 # symbolic links and aliases may be used to point to other locations.
 #
-DocumentRoot "/usr/local/www/apache24/data"
-<Directory "/usr/local/www/apache24/data">
+# DocumentRoot "/usr/local/www/data"
+# <Directory "/usr/local/www/data">
+DocumentRoot "/home/grog/www.lemis.com"
+<Directory "/home/grog/www.lemis.com">
     #
     # Possible values for the Options directive are "None", "All",
     # or any combination of:
@@ -260,8 +271,8 @@
     # http://httpd.apache.org/docs/2.4/mod/core.html#options
     # for more information.
     #
-    Options Indexes FollowSymLinks
-
+    Options FollowSymLinks
+    Options -Indexes
     #
     # AllowOverride controls what directives may be placed in .htaccess files.
     # It can be "All", "None", or any combination of the keywords:
@@ -280,7 +291,7 @@
 # is requested.
 #
 <IfModule dir_module>
-    DirectoryIndex index.html
+    DirectoryIndex index.php index.html
 </IfModule>

, "1"); /* >>> */ ?>

Doing my comparisons on www, I also found these diffs:

-#LoadModule session_module libexec/apache24/mod_session.so
+LoadModule session_module libexec/apache24/mod_session.so

 # Server-pool management (MPM specific)
-#Include etc/apache24/extra/httpd-mpm.conf
+Include etc/apache24/extra/httpd-mpm.conf

What's that? I don't know, but I'm sure I don't need them at the moment, so I put them off until later.

Finally, start. Does it work? Sort of. First I needed to modify /etc/rc.conf:

apache24_enable=YES

Otherwise it won't allow apachectl start: it wanted apachectl onestart, which doesn't exist.

Finally started. It works. But it logged to the wrong place, and in the wrong format; I can check that later. More to the point, /var/log/httpd-error.log grew alarmingly:

-rw-r--r--  1 root  wheel       38,997 16 Sep 07:04 httpd-access.log
-rw-r--r--  1 root  wheel    3,419,426 16 Sep 07:04 httpd-error.log

What's that? The main error message was:

[Mon Sep 16 06:18:11.915844 2019] [php7:notice] [pid 68504] [client 207.46.13.178:5277] PHP Notice:  A non well formed numeric value encountered in /home/grog/www.lemis.com/grog/php/includes/onephoto.php on line 1020
[Mon Sep 16 06:18:11.915873 2019] [php7:notice] [pid 68504] [client 207.46.13.178:5277] PHP Notice:  A non well formed numeric value encountered in /home/grog/www.lemis.com/grog/php/includes/onephoto.php on line 1080
[Mon Sep 16 06:18:11.915893 2019] [php7:notice] [pid 68504] [client 207.46.13.178:5277] PHP Notice:  A non well formed numeric value encountered in /home/grog/www.lemis.com/grog/php/includes/onephoto.php on line 1214
[Mon Sep 16 06:18:11.915916 2019] [php7:notice] [pid 68504] [client 207.46.13.178:5277] PHP Notice:  A non well formed numeric value encountered in /home/grog/www.lemis.com/grog/php/includes/onephoto.php on line 1225

That proved to be implicit numerical conversions. It's in the function exposuredetails(), and the variable $focal_length was a string with contents like 30 mm. It got it right, but it didn't like the mm at the end. OK, that's easy enough to fix.

And then I got other messages:

[Mon Sep 16 06:19:50.920874 2019] [php7:notice] [pid 68505] [client 207.46.13.103:3503] PHP Notice:  Uninitialized string offset: 0 in /home/grog/www.lemis.com/grog/php/includes/utils.php on line 29

That's also fixable, apparently a parameter passing error that I can check somewhere. But where's that coming from? What's 207.46.13.103? httpd should have resolved the name before logging, but that's on the to-do list. It proves to be msnbot-207-46-13-103.search.msn.com.. I've only just brought up this system (w3.lemis.com) and already the search bots are crawling it. OK, shut down again, lick my (few) wounds, and plan what to do next:

And when it's all done: document the procedure for people who come after.


This page contains (roughly) yesterday's and today's entries. I have a horror of reverse chronological documents, so all my diary entries are chronological. This page normally contains the last two days, but if I fall behind it may contain more. You can find older entries in the archive. Note that I often update a diary entry a day or two after I write it.     Do you have a comment about something I have written? This is a diary, not a “blog”, and there is deliberately no provision for directly adding comments. It's also not a vehicle for third-party content. But I welcome feedback and try to reply to all messages I receive. See the diary overview for more details. If you do send me a message relating to something I have written, please indicate whether you'd prefer me not to mention your name. Otherwise I'll assume that it's OK to do so.


Greg's home page This month Greg's photos Greg's links

RSS 2.0 Valid XHTML 1.0!