php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #75386 report architecture in "php -v", e.g. x86, x64
Submitted: 2017-10-16 10:05 UTC Modified: 2017-10-30 16:49 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: maggus dot staab at googlemail dot com Assigned: kalle (profile)
Status: Assigned Package: CGI/CLI related
PHP Version: 7.0.24 OS: any
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2017-10-16 10:05 UTC] maggus dot staab at googlemail dot com
Description:
------------
when downloading extensions for your php installation you need to answer several questions to find the correct version.

see e.g. http://windows.php.net/downloads/pecl/releases/ast/0.1.6/

there are variants like TS and NTS.
also you need to know whether x86 or x64 fits your system.

php -v already answers the question regarding TS/NTS but doesnt for x86 vs. x64
would be great to have this info contained in php -v.

Test script:
---------------
invoke "php -v" on CLI


Expected result:
----------------
PHP 7.0.14 (cli) (built: Dec  6 2016 15:35:45) ( x64/x86, NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies

(difference in the 1st line: x64/x86)

Actual result:
--------------
PHP 7.0.14 (cli) (built: Dec  6 2016 15:35:45) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-10-16 10:08 UTC] maggus dot staab at googlemail dot com
I just realized that x64 is mentioned as expected.
the absence of a architecture seem to indicate x86. maybe this could be more explicit.

php -v
PHP 7.1.2 (cli) (built: Feb 14 2017 21:24:45) ( NTS MSVC14 (Visual C++ 2015) x64 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
 [2017-10-16 10:11 UTC] spam2 at rhsoft dot net
> the absence of a architecture seem to indicate x86

no it don't

[harry@rh:~]$ php -v
PHP 7.1.12-dev (cli) (built: Oct 13 2017 14:01:54) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies

[harry@rh:~]$ rpm -q php
php-7.1.10-3.0.fc26.20171013.1356.rh.sandybridge.x86_64
 [2017-10-16 10:35 UTC] requinix@php.net
Consistently saying x86/x64 in -v would be nice (PHP 7.1+ on Windows does) but -i tells you everything too, eg:

phpinfo()
PHP Version => 7.0.9

System => Windows NT [name] 10.0 build 15063 (Windows 10) AMD64
Build Date => Jul 20 2016 10:41:23
Compiler => MSVC14 (Visual C++ 2015)
Architecture => x64
 [2017-10-16 12:03 UTC] maggus dot staab at googlemail dot com
my reported problem might be a windows only issue then.

I can reproduce that php -v does neither tell the architecture on 7.0 nor 7.1

having to run a package manager dependent command to find out the architecture of the php-binary is a no-go IMO (also it doesnt work x-plattform).
 [2017-10-16 12:10 UTC] spam2 at rhsoft dot net
hwo do you come to the conclusion "my reported problem might be a windows only issue then" when i showed you that "the absence of a architecture seem to indicate x86" is not true because on my Linux machine which is 100% x86_64 there is no architecture

and *no* "php -i" don't tell you everyhing *relieable*

[harry@rh:~]$ php -i | grep -i arch
Phar: PHP Archive support => enabled
Phar-based phar archives => enabled
Tar-based phar archives => enabled
ZIP-based phar archives => enabled
Phar based on pear/PHP_Archive, original concept by Davey Shafik.
[harry@rh:~]$

[harry@rh:~]$ php -i
phpinfo()
PHP Version => 7.1.12-dev

System => Linux rh.thelounge.net 4.13.6-200.fc26.x86_64 #1 SMP Thu Oct 12 16:16:07 UTC 2017 x86_64
Build Date => Oct 13 2017 14:00:43
Configure Command =>  './configure'  '--host=x86_64-redhat-linux' '--build=x86_64-redhat-linux' '--target=x86_64-redhat-linux' '--prefix=/usr' '--program-prefix=' '--libdir=/usr/lib64/php' '--disable-all' '--enable-bcmath=shared' '--enable-calendar=shared' '--enable-cli' '--enable-ctype=shared' '--enable-dom=shared' '--enable-exif=shared' '--enable-fileinfo=shared' '--enable-filter' '--enable-hash=shared' '--enable-huge-code-pages' '--enable-inline-optimization' '--enable-intl=shared' '--enable-json=shared' '--enable-libxml' '--enable-mbregex' '--enable-mbstring=shared' '--enable-mysqlnd=shared' '--enable-opcache=shared' '--enable-pcntl=shared' '--enable-pdo=shared' '--enable-phar=shared' '--enable-posix=shared' '--enable-re2c-cgoto' '--enable-session=shared' '--enable-shared' '--enable-simplexml=shared' '--enable-soap=shared' '--enable-sockets=shared' '--enable-tokenizer=shared' '--enable-xml=shared' '--enable-xmlreader=shared' '--enable-xmlwriter=shared' '--enable-zip=shared' '--with-apxs2=/usr/bin/apxs' '--with-bz2=shared,/usr' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.lounge.d' '--with-curl=shared,/usr' '--with-freetype-dir=/usr' '--with-gd=shared,/usr' '--with-gettext=shared,/usr' '--with-iconv=shared' '--with-imap-ssl=/usr' '--with-imap=shared,/usr' '--with-kerberos=/usr' '--with-layout=GNU' '--with-libdir=lib64' '--with-libedit=shared,/usr' '--with-libxml-dir=/usr' '--with-libzip=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=shared,mysqlnd' '--with-openssl=shared,/usr' '--with-pcre-jit' '--with-pcre-regex=/usr' '--with-pdo-mysql=shared,mysqlnd' '--with-pic' '--with-system-ciphers' '--with-system-tzdata' '--with-tidy=shared,/usr' '--with-zlib=shared' '--with-zlib-dir=/usr' '--disable-cgi' '--disable-dmalloc' '--disable-dtrace' '--disable-gcov' '--disable-gd-jis-conv' '--disable-ipv6' '--disable-mysqlnd-compression-support' '--disable-opcache-file' '--disable-phpdbg' '--disable-rpath' '--disable-short-tags' '--disable-static' '--enable-gcc-global-regs' '--disable-debug' 'build_alias=x86_64-redhat-linux' 'host_alias=x86_64-redhat-linux' 'target_alias=x86_64-redhat-linux'
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
Scan this dir for additional .ini files => /etc/php.lounge.d
Additional .ini files parsed => /etc/php.lounge.d/apc.ini,
/etc/php.lounge.d/extensions.ini,
/etc/php.lounge.d/posix.ini

PHP API => 20160303
PHP Extension => 20160303
Zend Extension => 320160303
Zend Extension Build => API320160303,NTS
PHP Extension Build => API20160303,NTS
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => enabled                                                                                                                                                                                    
Zend Memory Manager => enabled                                                                                                                                                                                     
Zend Multibyte Support => provided by mbstring                                                                                                                                                                     
IPv6 Support => disabled                                                                                                                                                                                           
DTrace Support => disabled                                                                                                                                                                                         
                                                                                                                                                                                                                   
Registered PHP Streams => compress.bzip2, compress.zlib, https, ftps, php, file, glob, data, http, ftp, phar, zip                                                                                                  
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, tls, tlsv1.0, tlsv1.1, tlsv1.2
Registered Stream Filters => bzip2.*, zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, convert.iconv.*

This program makes use of the Zend Scripting Language Engine:
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
 [2017-10-17 02:58 UTC] kalle@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: Kalle
 [2017-10-17 10:27 UTC] derick@php.net
Please don't call it "x86" or "x64" though, as these are Windows naming conventions. "i386" and "amd64" are the 'proper' architecture names.
 [2017-10-17 13:08 UTC] kalle@php.net
-Assigned To: Kalle +Assigned To: kalle
 [2017-10-17 13:08 UTC] kalle@php.net
@derick, I think x86/x64 is fine for Windows and the real arch for anything else will do
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC