Issue Bug Rejected

#22940Changes in core files for running TYPO3 on OS/2 or eComStation

Michael Oehlhof 06/20/10, 14:37 updated 06/10/14, 11:23

Description

To get TYPO3 running on OS/2 or eComStation there are little changes needed to change the PHP_OS checks, so that TYPO3 acts like windows and not like *nix when it run under OS/2.
With every TYPO3 update I had to patch the core to fix the PHP_OS checks, so it might be great if these changes could be made into the TYPO3 core.

In these files:
misc\phpcheck\incfile.php – Line 17
t3lib\thumbs.php – Line 69
typo3\init.php – Line 84
typo3\sysext\cms\tslib\index_ts.php – Line 60
typo3\sysext\cms\tslib\showpic.php – Line 67
typo3\sysext\install\mod\class.tx_install_ajax.php – Line 43

you have to change:
define(‘TYPO3_OS’, stristr(PHP_OS,‘win’)&&!stristr(PHP_OS,‘darwin’)?‘WIN’:’‘);

into:
define(‘TYPO3_OS’, (stristr(PHP_OS,‘win’)&&!stristr(PHP_OS,‘darwin’))||stristr(PHP_OS,‘os/2’)?‘WIN’:’‘);

In this file:
t3lib\class.t3lib_extmgm.php – Line 842

you have to change:
$os_type = stristr(PHP_OS, ‘win’)&&!stristr(PHP_OS, ‘darwin’)?‘WIN’:‘UNIX’;

into:
$os_type = (stristr(PHP_OS, ‘win’)&&!stristr(PHP_OS, ‘darwin’))||stristr(PHP_OS,‘os/2’)?‘WIN’:‘UNIX’;

In this File:
typo3\cli_dispatch.phpsh – Line 79

you have to change:
if (stristr(PHP_OS,‘win’) && !stristr(PHP_OS,‘darwin’)) {

into:
if ((stristr(PHP_OS,‘win’) && !stristr(PHP_OS,‘darwin’)))||stristr(PHP_OS,‘os/2’) {

In these files:
typo3\sysext\adodb\adodb\adodb-csvlib.inc.php – Line 280
typo3\sysext\adodb\adodb\adodb-pear.inc.php – Line 364
typo3\sysext\adodb\adodb\drivers\adodb-odbc_db2.inc.php – Line 115

you have to change:
… (strncmp(PHP_OS,‘WIN’,3) === 0) …

into:
… (strncmp(TYPO3_OS,‘WIN’,3) = 0) ...
or
... ((strncmp(PHP_OS,'WIN',3) = 0) || (strncmp(PHP_OS,‘OS/2’,4) === 0)) …
depending on the availability of the variable TYPO3_OS at that point, what I haven’t check yet.

(issue imported from #M14796)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.