12-Aug-2012

PHP upgrade – continued
Got a reply from Mark – I sent him some WATCH output on the errors I encountered last Friday – and he noticed PHP code in the log – where it shouldn’t.
Admitted: I completely overlooked this part of the output….But these lines explained both the database-access problems with WP 2.6.3, and the shown PHP-code using WP 3.4.: the log shows no space, or better: line termination, between the PHP starttag and the first characters of the next line:
<?phpdefine or<?php/**
where you would expect
<?php
define
or
<?php
/**

like the files read.
I encountered the first of these when I ran the blog using WP 2.6.3, with PHP 5.3. I thought the absence of the mysql and mysqli extensions were to blame, but that seems not to be the case, but the fact this file wasn’t interpreted. Apart from the other messages (that now seem to be suppressed in the PHP.INI file) this was unexpected, but it explaines the database access issue: the file is not included and interpreted but simply outputted – since there is no starttag stating this is PHP-code: the system simply concatenated the tag (which does exist in the file) and the next line – causing “<?phpdefine“. This is the databse-access file, kept outrside the normal path, but included in wp-config.php. And, in the WP 2.6.3 environment, it is the only file in Variable format.
As for the second example, this is a plain WP 3.4 file – the one I have converted to Variable format on request of Mark. Again: the lines are simply concatenated – WITHOUT addein Linefeed or NULL character, causing it to be interpreted as plain text to be outputted, in stead of being PHP code to be interpreted. Therefore, the database access file is never reached, so you would never see the first message showing up.

After I reversed the change and used the Stream-LF version again, I got the missing end-tag message again….

It looks like End-Of-File processing is not correct, nor is the End-Of-Line processing for Variable files….

To be continued