Project

General

Profile

Actions

Bug #22940

closed

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

Added by Michael Oehlhof over 14 years ago. Updated over 10 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-06-20
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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)


Files

patch_433_os2.diff (9.29 KB) patch_433_os2.diff Administrator Admin, 2010-06-26 21:42
patch_440_os2.diff (8.8 KB) patch_440_os2.diff Administrator Admin, 2010-06-26 21:43
Actions

Also available in: Atom PDF