28-Feb-2017

Back to the beginning
Publishing a post, or updating one, proved to be impossible. Whatever done, publishing it would end in an error:

Status: 502
Script-Control: X-error-text="Cannot access script, i/o error.."
Script-Control: X-error-module="PHPWASD"
Script-Control: X-error-line=1337

and afterwards, there is part of the request submitted – including the text I added:
...
post_title=28-Feb-2017&samplepermalinknonce=90a9da665a&content=
%3Cstrong%3E%3Cfont+color%3D%22red%22%3EMore+on+PHP+5.3%2B+%28and+MySQL%29%3C%2Ffont%29%3C%2Fstrong%3E%0
It%27s+troublesome+to+add+%28or+edit%29+a+post%2C+because+if+it+takes+too+long%2C+publishing+%28or+even+saving
+a+draft%29+fails...+Being+the+supplier+of+both+PHP+and+MySQL%2C+I+have+asked+Mark+Berryman+for+advise
...

In PHP_errors since last night, theer is just one message, every 3 minutes or so:

PHP Fatal error: Maximum execution time of 60 seconds exceeded in Unknown on line 0

so I decided to revert this update until the system is more stable…

27-Feb-2017

Still issues with 5.4
For some reason access to any blog fails due to an error signalled by the PHP engine: failure to access a script: IO error. But it doesn’t tell which one, and it’s not signalled in the error log file. If one blog fails, all will – until the cache is flushed and all PHP-connections are aborted.
This not just happens with this blog but with Travels as well, and with my friend’s site. Got inn trouble there to start with, I installed a plugin for agenda (linked to Google agenda) and when setting it up, trouble seems to happen. One thing however was found after properly assigning Tracks: had it defined to the wrong directory (but all seemed to be there): that one failed to finish database access within the time set in PHP.ini (30 seconds); This has now been extended to one minute.
But even adding this simple post made the server freeze. – I couldn’t publish it, and when returning at some point, I lost connection to some scripts that take care of the look-and-feel of the dashboard. It seems to happen after the content has been saved as draft automatically….

So I disabled 5.4 and started 5.3; See if that helps (it is the minimum I need for the agenda software). But the problem exists here as well. However, it will get back to activity – after some time (perhaps it’s just the save that takes too much time?)

26-Feb-2017

Update succeeded
I renamed the directory holding the ‘bad’ WP version, and renamed the directory holding the correct version to the proper name, so all I needed to do next was tell WASD to restart.
Next, I set the PHP version to 5.4

That’s what you’re looking at now.

I have version 5.5 and 5.6 also on the system but I’m not sure the startup procedures have been updated to my setup. So that needs to be checked first; if all is well, I nay update PHP even further.

23-Feb-2017

More on PHP 5.3 and up: Continued
Discussed the matter on the WASD-INFO list – and agreed it is a local issue: Mark Daniel has checked the installation of WordPress on his systems and he found no extra bytes. The only thing that may have caused the problem is unzip. The executable on Diana is quite old, and I found the latest (6.0) on info-zip.com. Downloaded it, built it on VMS and used it to install a separate version of WordPress. There are no extra bytes (good), all directories are lowercase now, files look good – but still, multiple dots in the filenames still occur, so the wp2vms procedure is still needed (ran it anyway to find out). For that, I set up a logical, and next, defined SYSBLOG to use it.
Well, this post has been added using this version!
It means I have to do some extra work, so all blogs run this version. After that, higher versions of PHP will probably work now.

22-Feb-2017

More on PHP 5.3 and beyond
I remembered I defined PHP_ERROR.LOG in PHP.ini, and took a look into that file. There I found what I ran into some time ago:

[31-May-2015 12:13:48 UTC] PHP Parse error: syntax error, unexpected end of file in /sysblog/000000/wp-includes/post-template.php on line 734

This was because the file (in fact, many files) missed the PHP end tag “?>”. I recall I contacted Mark Berryman on this but it never came to an conclusion.
With 5.4, the problem is a bit different:

[19-Feb-2017 19:53:09 UTC] PHP Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE) in /sysblog/000000/wp-load.php on line 94

So I looked into this file; The weird thing is that in the editor, the file is only 93 lines long, ending in
...
        wp_die( $die, __( 'WordPress › Error' ) );
}
[End of file]
 Buffer: WP-LOAD.PHP                                                                                                  | Write | Insert | Forward
Command: line 94
You are already at the bottom of the buffer.

and the result is

Buffer has only 93 lines.  (Now going to End of Buffer).

So, there is no line 94????

Dumped the file – and behold: after the last LF, there is another character:


Dump of file WP472:[000000]wp-load.php;1 on 22-FEB-2017 21:25:30.44
File ID (14870,4,0) End of file block 7 / Allocated 8

Virtual block number 7 (00000007), 512 (0200) bytes

666E6F63 2D70773E 65646F63 3C270909 0A2C2920 222E656C 69662065 68742065 e the file." ),...'<code>wp-conf 000000
69642409 0A3B273E 702F3C27 202E2029 090A273E 65646F63 2F3C7068 702E6769 ig.ph</code>'..) . '</p>';..$di 000020
2227202E 20687461 7024202E 2027223D 66657268 20613C3E 703C2720 3D2E2065 e .= '<p><a href="' . $path . '" 000040
2E20273E 22656772 616C2D6E 6F747475 62206E6F 74747562 223D7373 616C6320 class="button button-large">' . 000060
6C694620 6E6F6974 61727567 69666E6F 43206120 65746165 72432220 285F5F20 __( "Create a Configuration Fil 000080
5F202C65 69642420 28656964 5F707709 0A0A3B27 3E612F3C 27202E20 29202265 e" ) . '</a>';...wp_die( $die, _ 0000A0
20292027 726F7272 45203B6F 75716173 72262073 73657250 64726F57 2720285F _( 'WordPress › Error' ) 0000C0
00000000 00000000 00000000 00000000 00000000 00000000 0000270A 7D0A3B29 );.}.'.......................... 0000E0
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 000100
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 000120
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 000140
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 000160
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 000180
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 0001A0
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 0001C0
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 ................................ 0001E0

Removed that byte – and that solved this problem, for this file.
There were numerous other ones that need a similar edit, because each of these files appear to be one byte too long.
Looked into the directory listing of the file, before edit:

$ dir/full wp472:[000000]wp-load.php;1

Directory WP472:[000000]

wp-load.php;1                 File ID:  (14870,4,0)
Size:            7/8          Owner:    [SYSTEM]
Created:    25-OCT-2016 03:15:30.00
Revised:    25-OCT-2016 03:15:30.00 (0)
Expires:    
Backup:     
Effective:  
Recording:  

Accessed:    4-FEB-2017 21:35:34.00
Attributes: 25-OCT-2016 03:15:30.00
Modified:   25-OCT-2016 03:15:30.00
Linkcount:  1
File organization:  Sequential
Shelved state:      Online
Caching attribute:  Writethrough
File attributes:    Allocation: 8, Extend: 0, Global buffer count: 0, No version limit
Record format:      Stream_LF, maximum 0 bytes, longest 0 bytes
Record attributes:  Carriage return carriage control
RMS attributes:     None
Journaling enabled: None
File protection:    System:RWED, Owner:RWD, Group:R, World:R
Access Cntrl List:  None
Client attributes:  None

Total of 1 file, 7/8 blocks.

and after edit:
$ dir/full wp472:[000000]wp-load.php;2

Directory WP472:[000000]

wp-load.php;2                 File ID:  (16777,7,0)
Size:            7/8          Owner:    [SYSTEM]
Created:    22-FEB-2017 16:05:59.27
Revised:    22-FEB-2017 16:05:59.30 (1)
Expires:    
Backup:     
Effective:  
Recording:  

Accessed:   

Attributes: 22-FEB-2017 16:05:59.30
Modified:   22-FEB-2017 16:05:59.27
Linkcount:  1
File organization:  Sequential
Shelved state:      Online
Caching attribute:  Writethrough
File attributes:    Allocation: 8, Extend: 0, Global buffer count: 0, No version limit
Record format:      Stream_LF, maximum 0 bytes, longest 
153
 bytes
Record attributes:  Carriage return carriage control
RMS attributes:     None
Journaling enabled: None
File protection:    System:RWED, Owner:RWD, Group:R, World:R
Access Cntrl List:  None
Client attributes:  None

Total of 1 file, 7/8 blocks.
$

So edit adds the size…There is more to check…

As stated, quite a lot of files need to be edited before the blog shows in PHP 5.4, but eventually is succeeds. Admin works as well but the page doesn’t show right – there may be things missing (not executed directly but referenced and linked so if that fails, there is no error.
It seems that all files are one byte longer than is actually the case. Not sure yet where it comes from, The fun part (luckily) is that 5.2 is fine, even with the edited files. But PHP 5.3 and later consider the file one byte longer. Now it.s a matter to find out what causes this extra byte: is it Unzip.exe, or is it added when the kit is created?

Anyway, if this is the case with all files (it looks as it is) it might be that a procedure to remove the last byte could do the trick.