[TYPO3-dev] Changes for running TYPO3 on OS/2 or eComStation

Michael typo3 at oehlhof.de
Sat Jun 19 16:59:14 CEST 2010


Hello TYPO3 core developer.

Is it possible that you make some little changes to the source to get 
TYPO3 running on OS/2 or eComStation out of the box?
There are little changes needed that have no side effect to Windows or 
*nix. You have to change the PHP_OS checks, so that TYPO3 acts like 
windows and not like *nix when it run under OS/2.

I have checked the source files of TYPO3 4.3.3 for the lines to change.


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.



Kind regards
Michael Oehlhof




More information about the TYPO3-dev mailing list