Open kaiohken1982 opened 11 years ago
@kaiohken1982 Do you know how to accurately detect 64 bit system ?
Hello Artur, my local configuration is Xampp installed on a 64bit windows machine. The _SERVER['SERVER_SOFTWARE'] returns this value:
Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 mod_perl/2.0.4 Perl/v5.10.1
so I think that I have a 32bit Apache installation that makes all architecture-aware php function act as they are on a 32bit OS. I did most of the tests of this discussion
http://stackoverflow.com/questions/2353473/can-php-tell-if-the-server-os-it-64-bit
Even the intval fail. Only the \COM test will succeed https://gist.github.com/kaiohken1982/6087916
However if this test is needed because the application will expect intval and other architecture-aware variables and function act as they are on a 64Bit environment, the current test on PHP_INT_SIZE should be ok.
What do you think?
Ok, so the confusion here is related to the fact that there are 2 checks being mentioned here:
These should be separated. Check\Is64bit
can stay as it is, as it's an accurate way of determining if PHP supports 64bit integers. We'll add new Check\Is64bitSystem
class that will try to determine if the OS is actually 64bit. The gist you've sent me looks fine, but we'll have to branch it so it works on more systems. I'll take a look at it soonish.
DirReadable class in "Check system paths" test is specified as DirRedable. Should be DirReadable .
'zfcuser' is not a service of ZfcUser module. Should be replaced for example with 'zfcuser_user_service'?
Test 'is64bit' could return false even in 64bit windows machine https://bugs.php.net/bug.php?id=64863, so is it a valid test?