|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2013-11-12 16:44 UTC] michael at bigmichi1 dot de
Description:
------------
when i run the imagettfbox() under windows and also in linux with exactly the same parameters both calls return differnt results.
Linux:
gd
GD Support => enabled
GD Version => 2.1.1-dev
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.4.12
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => 8
PNG Support => enabled
libPNG Version => 1.2.49
WBMP Support => enabled
XPM Support => enabled
libXpm Version => 30411
XBM Support => enabled
WebP Support => enabled
Directive => Local Value => Master Value
gd.jpeg_ignore_warning => 0 => 0
Windows:
gd
GD Support => enabled
GD Version => bundled (2.1.0 compatible)
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.4.10
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => unknown
PNG Support => enabled
libPNG Version => 1.5.14
WBMP Support => enabled
XPM Support => enabled
libXpm Version => 30411
XBM Support => enabled
WebP Support => enabled
Directive => Local Value => Master Value
gd.jpeg_ignore_warning => 0 => 0
Linux:
PHP Version => 5.5.5-1chl1~saucy1
System => Linux i920 3.11.0-13-generic #20-Ubuntu SMP Wed Oct 23 07:38:26 UTC 2013 x86_64
Build Date => Oct 21 2013 21:01:50
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => /etc/php5/cli
Loaded Configuration File => /etc/php5/cli/php.ini
Scan this dir for additional .ini files => /etc/php5/cli/conf.d
Additional .ini files parsed => /etc/php5/cli/conf.d/05-opcache.ini,
/etc/php5/cli/conf.d/10-pdo.ini,
/etc/php5/cli/conf.d/20-curl.ini,
/etc/php5/cli/conf.d/20-gd.ini,
/etc/php5/cli/conf.d/20-geoip.ini,
/etc/php5/cli/conf.d/20-gmp.ini,
/etc/php5/cli/conf.d/20-imagick.ini,
/etc/php5/cli/conf.d/20-intl.ini,
/etc/php5/cli/conf.d/20-ldap.ini,
/etc/php5/cli/conf.d/20-mcrypt.ini,
/etc/php5/cli/conf.d/20-mongo.ini,
/etc/php5/cli/conf.d/20-mysql.ini,
/etc/php5/cli/conf.d/20-mysqli.ini,
/etc/php5/cli/conf.d/20-pdo_mysql.ini,
/etc/php5/cli/conf.d/20-pdo_pgsql.ini,
/etc/php5/cli/conf.d/20-pdo_sqlite.ini,
/etc/php5/cli/conf.d/20-pgsql.ini,
/etc/php5/cli/conf.d/20-readline.ini,
/etc/php5/cli/conf.d/20-sqlite3.ini,
/etc/php5/cli/conf.d/20-tidy.ini,
/etc/php5/cli/conf.d/20-xdebug.ini,
/etc/php5/cli/conf.d/20-xmlrpc.ini,
/etc/php5/cli/conf.d/20-xsl.ini
PHP API => 20121113
PHP Extension => 20121212
Zend Extension => 220121212
Zend Extension Build => API220121212,NTS
PHP Extension Build => API20121212,NTS
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => disabled
Zend Memory Manager => enabled
Zend Multibyte Support => provided by mbstring
IPv6 Support => enabled
DTrace Support => disabled
Registered PHP Streams => https, ftps, compress.zlib, compress.bzip2, php, file, glob, data, http, ftp, phar, zip
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, tls
Registered Stream Filters => zlib.*, bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, mcrypt.*, mdecrypt.*
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
Windows:
PHP Version => 5.5.5
System => Windows NT LAPTOP 6.1 build 7601 (Windows 7 Home Premium Edition Service Pack 1) AMD64
Build Date => Oct 15 2013 11:43:22
Compiler => MSVC11 (Visual C++ 2012)
Architecture => x64
Configure Command => cscript /nologo configure.js "--enable-snapshot-build" "--enable-debug-pack" "--disable-zts" "--disable-isapi" "--disable-nsapi" "--without-mssql" "--without-pd
o-mssql" "--without-pi3web" "--with-pdo-oci=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=C:\php-sdk\oracl
e\instantclient11\sdk,shared" "--with-enchant=shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--disable-static-analyze" "--with-pgo"
Server API => Command Line Interface
Virtual Directory Support => disabled
Configuration File (php.ini) Path => C:\Windows
Loaded Configuration File => C:\Users\Michael\Dropbox\pear\php\5.5\php.ini
Scan this dir for additional .ini files => (none)
Additional .ini files parsed => (none)
PHP API => 20121113
PHP Extension => 20121212
Zend Extension => 220121212
Zend Extension Build => API220121212,NTS,VC11
PHP Extension Build => API20121212,NTS,VC11
Debug Build => no
Thread Safety => disabled
Zend Signal Handling => disabled
Zend Memory Manager => enabled
Zend Multibyte Support => disabled
IPv6 Support => enabled
DTrace Support => disabled
Registered PHP Streams => php, file, glob, data, http, ftp, zip, compress.zlib, https, ftps, phar
Registered Stream Socket Transports => tcp, udp, ssl, sslv3, sslv2, tls
Registered Stream Filters => convert.iconv.*, mcrypt.*, mdecrypt.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, zlib.*
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
Test script:
---------------
$bounds = imagettfbbox(12, 0, "Vera.ttf", "one");
print_r($bounds);
Expected result:
----------------
both calls return the same result regardless of the operating system
Actual result:
--------------
Windows:
(
[0] => -1
[1] => -1
[2] => 26
[3] => -1
[4] => 26
[5] => -10
[6] => -1
[7] => -10
)
Linux:
(
[0] => -1
[1] => 0
[2] => 30
[3] => 0
[4] => 30
[5] => -11
[6] => -1
[7] => -11
)
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 23 00:00:02 2025 UTC |
tried with the 7.1-dev with bundled gd but still different outputs. win: PHP 7.1.0-dev (cli) (built: Sep 26 2016 21:23:33) ( NTS MSVC14 (Visual C++ 2015) x64 ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies gd GD Support => enabled GD Version => bundled (2.1.0 compatible) FreeType Support => enabled FreeType Linkage => with freetype FreeType Version => 2.6.2 GIF Read Support => enabled GIF Create Support => enabled JPEG Support => enabled libJPEG Version => 9 compatible PNG Support => enabled libPNG Version => 1.6.21 WBMP Support => enabled XPM Support => enabled libXpm Version => 30411 XBM Support => enabled WebP Support => enabled Array ( [0] => 1 [1] => 0 [2] => 28 [3] => 0 [4] => 28 [5] => -9 [6] => 1 [7] => -9 ) linux: PHP 7.1.0RC1 (cli) (built: Sep 27 2016 13:10:41) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies gd GD Support => enabled GD Version => bundled (2.1.0 compatible) FreeType Support => enabled FreeType Linkage => with freetype FreeType Version => 2.6.1 GIF Read Support => enabled GIF Create Support => enabled PNG Support => enabled libPNG Version => 1.2.54 WBMP Support => enabled XBM Support => enabled Array ( [0] => -1 [1] => -1 [2] => 26 [3] => -1 [4] => 26 [5] => -10 [6] => -1 [7] => -10 )> PHP 7.1.0-dev (cli) (built: Sep 26 2016 21:23:33) ( NTS MSVC14 > (Visual C++ 2015) x64 ) > PHP 7.1.0RC1 (cli) (built: Sep 27 2016 13:10:41) ( NTS ) Ah, we're comparing apples and oranges here. :-) Note that the fix for 53504 is not contained in any QA release of PHP 7.1 yet; it is scheduled for PHP 7.1.0RC3 only. Running with current Windows 7.1 snapshots and the current 7.1 head on Linux both produces: Array ( [0] => 1 [1] => 0 [2] => 28 [3] => 0 [4] => 28 [5] => -9 [6] => 1 [7] => -9 ) You can download the current 7.1 head via <https://github.com/php/php-src/archive/PHP-7.1.zip>. Please try this one on Linux.