30-Mar-2013

Router replaced
The update supplied by Draytek didn’t solve the problems: After 6 minutes or so after login on the admin GUI, connection is lost. So I had to replace the Draytek with the Fritzbox supplied by the ISP, in order to ship the Draytek to the supplier to have it checked and fixed; there is no alternative as to work with equipment that does not fit my requirements. No real problem as long as it works – and the situation is expected to be temporary.

28-Mar-2013

Router problems
When I am at my empoyers office, I usually open a VPN to my home network, so I can access mail directly into Outlook, combining the connection with the working environment – and it offers secure access to the servers.
Last Monday, after a required reboot of my laptop without disconnecting the VPN before, I could no longer setup a VPN connection: the credentials are incorrect (I’m sure they are!) of the VPN server could not be contacted. Even worse, access to the web-interface failed as well, the server could not be contacted. But incoming and outgoing internet traffic: mail and web, is not effected….
That evening I checked, but I could not access the router, be it by wifi of fixed line. The only way was to switch it off and on. This gives a window of a few minutes – up to 7, it seems – to access the administration pages; I opened ‘online status’ that is refereshed every 5 seconds or so; this works for a few minutes and all of sudden, the connection can no longer be established.
At home, I cannot establish a VPN session so there is no way to find out if that works….
Another problem – likely to be related – is that VoIP will fail as well. It depends on the socket, it seems. On the second port, I tried to call the supplier of the router, but as soon as a connection was established, the line was set to occupied…However, calling using my cellphone, I could explain my problem. I have been sent an update of the router software, but I still need to install it.
Just a few minutes ago, I learned that the other – normal – socket experiences the same problem: the connection is cut off after a minute or so….
Time to install the update and hope it solves the problems. Otherwise, I will have to install the Fritzbox again…..
More updates to come
If time permits tomorrow, Diana will be update to VMS 8.4 and latest update as well. Next action could well be that PHP and WordPress are updated next. It will mean the site will be off-line for some time

18-Mar-2013

WordPress 3.5 test – a final updare
In the last two weeks, I’ve been busy with testing the new version of WordPress (at least, verison 3.5) to find out how to set things up in the WASD configuration, and it’s pretty close to be finalized. Two issues have been found – apart from problems within WordPress itself: The tests revealed an error in the PHP port, that could have caused the problem in cleanibg up the PHP environment after status has been returned to the server (a times that isn’t cleared when it should) but that is easily circumvented by specifying PHP.INI parameter max_execution_time to zero – meaning”indefentely”. In this case, it’s not a problem since WordPress won’t run into that situation :).
The other problem is to be solved by HP.
PHPWASD calls c-function chdir to change the ‘current directory’ for the running image, and next calls c-function setenv to change environment variable PATH to the same value. chdir succeeds – but setenv fails when the new value is longer than the last issued, or the default value that is passed when it wasn’t set before (being the current default). In such a case, PATH is set to NULL, the advantage being that from that moment on, any value is accepted, no matter what size it has, compared to the previously specified value.
There is a simple workaround: just re-specify the new value one more time. If all is well, it will than be accepted. The right solution if for HP to solve the issue. I created a reproducer and sent it to OpenVMS engineering.
(The full communication on the WordPress issue can be found on the WASD mailing list for 2013, thread on “WordPress: Config? UPDATE”. When applicable, some data may be downloadable from this site – links are included in the messages. The message to HP – including the reproducer, can be found on the same list – search for “setenv issue”).
Updates to be applied
This means I can now start thinking of an update of the blogs. Besides this one, I’m also thinking of updating Diana to VMS 8.4. One thing that may have caused the problem with PHP 5.3 on this system may be caused by a version difference in CRTL – or even VMS: if PHP5.3 is linked on 8.4 and run as-is on 8.3, it may have lead to the End-Of-Files issues I encountered before.

07-Mar-2013

Update on WordPress upgrade
Finally, the new version of WordPress – that is: 3.5) runs on Daphne, under WASD 10.2 and PHP 5.3.14, in a basic theme, but it required a very different mapping than I used originally:

redirect /wptest /wptest/index.php
map /wptest**/ /wptest*/index.php
exec+ /wptest/**.php* (cgi-bin:[000000]phpwasd.exe)/wptest/*.php* ods=5
pass /wptest/* /wptest/* ods=5 search=none dir=noaccess

There might be some additions, thanks to UMA, but this setting does the (most basic) job.
Nevertheless, there are still a few things to take care of – but since I don’t control the PHP-port, PHPWASD or C-RTL, the few things that still don’t work as expected, or wanted, cannot be resolved immediately.
Mark Berryman identified an error in PHP but there is a workaround: setting max_execution_time in PHP.INI to zero will probably solve some timer-related issues – as the sort-of keep-alive of PHPWASD.EXE and the PHP environment. He will solve this issue, so there is some more testing required.
Not that this workaround solved all the issues – when WordPress admin page is started, it may take a while before they show up – and the number of open channels keep going up, to 150 or so. But later on, it’s MUCH faster, and requires less channels, even when PHPWASD is restarted from scratch. This has to do with paging, I guess, because Daphne is small – compared to the systems that Mark Berryman and Mark Daniel appear to be using.
More problematic is a dysfunctional C function.
As Mark Daniel has explained, PHPWASD.EXE uses the chdir function to change the location where the images should run – in the Unix-way of thinking – in practice, the directory specified in the URL that starts the PHP code. So http://<site>/wptest/index.php will cause a chdir to /wptest, and http://<site>/wptest/wp-admin/index.php will chdir to /wptest/wp-admin. That is working fine. But next, PHPWASD.EXE calls function setenv to set environment variable PATH to the same value. In itself, that’s fine also – but this fails when the second assignment uses a string longer than the preivious one. This happens within WordPress: On the first URL (http://<site>/wptest), nothing is wrong chdir ("/wptest") is executed as well as setenv("PATH","/wptest"), but after the login sequence, when http://<site>/wptest/wp-admin/index.php is to be excuted (which is reflected in the address bar of the browser), chdir ("/sptest/wp-admin") succeeds, but setenv ("PATH","/wptest/wp-admin") fails and PHPWASD exits after returning a 502 status to the server, causing a non-cgi-conform response….
When you next start the same URL, all is well, and the pages show up nicely. However, you may encounter similar problems on executing other PHP code that re-executes setenv.

After Mark Daniel had specified a test program for chdir, getenv and setenv, I adapted this program to do some testing. And my assumption that size maters, becomes clear: the length of the last assignment determines the maximum size of the next string! If longer, the status of setenv is -1 – stating an error, and the environment variable is set to null:

$ run test3
1 - Longest (/wptest/wp-includes)
getenv PATH == sys$sysroot:[sysmgr]
setenv PATH == 0
getenv PATH == /wptest/wp-includes
chdir PATH == 0
getenv PATH == /wptest/wp-includes
2 - Midsize (/wptest/wp-admin)
setenv PATH == 0
getenv PATH == /wptest/wp-admin
chdir PATH == 0
getenv PATH == /wptest/wp-admin
3 - shortest (/wptest)
setenv PATH == 0
getenv PATH == /wptest
chdir PATH == 0
getenv PATH == /wptest
4 - Midsize again (/wptest/wp-admin)
setenv PATH == -1
getenv PATH == (null)
chdir PATH == -1
getenv PATH == (null)

I would call this a bug. It might have been introduced in an UPDATE on VMS 8.3 and 8.4, Jeremy Begg has located that there has been an update on this function to prevent a memory leak. Quit possible that the way it has been solved causes this erroneous behavior.
Alas, there is no way to get around this, except that PHPWASD should NOT change PATH this way. So I would need the PHPWASD-code for PHP 5.3.14 (The version for PHP 5.2 has another interface to PHP which is not compatible…).

But for the normal user – who reads the blogs – there seems to be no a problem. So the next step is to try the newest release of WordPress (3.5.1) and the themes I would like to use, and see if it all works fine.

Finally, there may be another thing to consider, and this may have caused the end-of-file problems I encountered on Diana with PHP 5.3: If the code is built on VMS 8.4, it may cause problems when executed on VS 8.3. It shouldn’t, but because CRTL is involved, it could cause problems.

All information on the issue can be found on the WASD mailing list, look for “wordpress: CONFIG?” in the 2012 and 2013 directories, and the test programs I used are available here. Note this is a VMS-created ZIPfile so you’ll have to move the file to VMS (binary!) and unzip it there….(The other files in this directory are Windows-based ZIPs containing NOTAPAD files.)

03-Mar-2013

Maintenance
Nothing strange….
Except it has been quiet on the SPAM front:
PMAS statistics for February
Total messages    :   2482 = 100.0 o/o
DNS Blacklisted   :    740 =  29.8 o/o (Files: 28)
Relay attempts    :     28 =   1.1 o/o (Files: 28)
Accepted by PMAS  :   1714 =  69.0 o/o (Files: 28)
 Handled by explicit rule
        Rejected :   1120 =  65.3 o/o (processed),  45.1 o/o (all)
        Accepted :    232 =  13.5 o/o (processed),   9.3 o/o (all)
 Handled by content
       Discarded :     86 =   5.0 o/o (processed),   3.4 o/o (all)
    Quarantained :    239 =  13.9 o/o (processed),   9.6 o/o (all)
       Delivered :     37 =   2.1 o/o (processed),   1.4 o/o (all)

Also, there were just a few relay attempts: there were some but none of the files where these are logged, exceeded 4 blocks in size.
Weird, though, is the number of messages on port can (blocked by the router) that seem to be originated by the VMS server; apart from messages on port 53 (BIND). there are similar messages from a load of other, high-numbered ports to the same address that BIND seems to access on port 53. There is no reason why these addresses would be accessed, I don’t find them in any other logfile.
I didn’t see these before because I left them out of the SYSLOG signaling, and I included that last Thursday.
Some more tests on WordPress
I reversed parameter max_execution_time in PHP.INI back to its default of 30 seconds, and included the mapping definitions that are required to show images and stylesheets. Now the normal page comes up nicely, and rather fast, but the admin pages remain a problem: there is an error that causes an error so the admin page does not show up directly; the URL in the browser is updated, so it is happening within wp-admin/index.php. However, directly accessing this file – by using the spec in the browser address window, the pages show up nicely, though the widgets don’t: “Incoming Links” show the infamous “IO error” message on cron.php – though I have no proof that there are over 512 channels opened – and the other ones: “Plugins”, “WordPress blog” and “Other WordPress News” are stopped because the maximum execution time has expired – in different locations. These are accesses to external locations from within the PHP code, WATCH doesn’t show these accesses!
Though I have created replies to the WASD mailing list, something seems to have gone wrong: the list does not include the last mails…..