[PHP-DEV] Bug #12956: libgd2 + TTF = ugly fonts.
From: [EMAIL PROTECTED] Operating system: Debian GNU/Linux PHP version: 4.0CVS-2001-08-25 PHP Bug Type: GD related Bug description: libgd2 + TTF = ugly fonts. It all started when my boss wanted better looking thumbnails. I found that imagecopyresampled() would make better thumbnails. It requires libgd2 for it to work. I removed libgd1 and installed libgd2. The thumbnails are great now, but the ttf's are very bad. They are larger and I think that the anti-alias is turned off or something. I went back to libgd1 and the fonts look good. I downloaded the CVS php4 and tried with that, still same problem. I can't use libgd2 and have nice fonts. I can't use libgd1 and have nice thumbnails. I'm stuck. Here is my configure line: ./configure --with-apxs=/www/bin/apxs --enable-track-vars --enable-trans-sid --with-gd --enable-gd-native-ttf --with-pgsql --without-mysql --with-imap --with-openssl and also: ./configure --with-apxs=/www/bin/apxs --enable-track-vars --enable-trans-sid --with-freetype-dir=/usr/lib --with-gd --enable-gd-native-ttf --with-ttf --with-t1lib --with-pgsql --without-mysql --with-imap --with-openssl -- Edit bug report at: http://bugs.php.net/?id=12956edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] Bug #12956 Updated: libgd2 + TTF = ugly fonts.
ID: 12956 User updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] Old Status: Feedback Status: Open Bug Type: GD related Operating System: Debian GNU/Linux PHP Version: 4.0CVS-2001-08-25 New Comment: More on the problem. (This could be a libGD bug, but the libGD test works fine, but I'm not sure if its doing the same thing) This is from the ./configure to show that it is configured right (I have removed some lines to make it shorter): checking whether to include GD support... yes checking whether to enable truetype string function in gd... yes checking for freetype(2)... yes checking whether to include include FreeType 1.x support... no checking whether to include T1lib support... yes checking for T1_LoadFont in -lt1... yes checking for gdImageCreateFromPng in -lgd... yes checking for gdImageCreateFromJpeg in -lgd... yes checking for gdImageCreateTrueColor in -lgd... Yes So here is the script: ?php Header (Content-type: image/jpeg); $im = imagecreatetruecolor (400, 30); $black = ImageColorAllocate ($im, 0, 0, 0); $white = ImageColorAllocate ($im, 255, 255, 255); ImageTTFText ($im, 20, 0, 10, 20, $white, /Fonts/arial.ttf, Testing... Omega: #937;); ImageJPEG ($im); ImageDestroy ($im); ? I have also found out if I do not use truecolor, then the font is ok, but if I create from a jpeg or png, I get crap fonts. I guess its a truecolor problem. I dont know if it is in PHP or in GD. Maybe I'm posting this to the wrong place. Is anyone else using libGD2 and truecolor TTF graphics? Here is some samples that I made: http://rtfm.c0de.net/helpfiles/ttf-test.html Thank you for your help. Previous Comments: [2001-08-25 07:50:48] [EMAIL PROTECTED] First, create a short but complete example script and include it here so we can test it. Second, you should use the correct paths for the configure options: --with-freetype-dir=/usr And btw. This configure option is for freetype2. ( --with-ttf is for freetype 1.x ) Also note that GD2 is in BETA. This might instead being a bug in PHP, be a bug in GD2. --Jani [2001-08-25 03:15:14] [EMAIL PROTECTED] It all started when my boss wanted better looking thumbnails. I found that imagecopyresampled() would make better thumbnails. It requires libgd2 for it to work. I removed libgd1 and installed libgd2. The thumbnails are great now, but the ttf's are very bad. They are larger and I think that the anti-alias is turned off or something. I went back to libgd1 and the fonts look good. I downloaded the CVS php4 and tried with that, still same problem. I can't use libgd2 and have nice fonts. I can't use libgd1 and have nice thumbnails. I'm stuck. Here is my configure line: ./configure --with-apxs=/www/bin/apxs --enable-track-vars --enable-trans-sid --with-gd --enable-gd-native-ttf --with-pgsql --without-mysql --with-imap --with-openssl and also: ./configure --with-apxs=/www/bin/apxs --enable-track-vars --enable-trans-sid --with-freetype-dir=/usr/lib --with-gd --enable-gd-native-ttf --with-ttf --with-t1lib --with-pgsql --without-mysql --with-imap --with-openssl Edit this bug report at http://bugs.php.net/?id=12956edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #5987 Updated: PHP crashes when using mktime()
ID: 5987 User Update by: [EMAIL PROTECTED] Old-Status: Feedback Status: Open Bug Type: Scripting Engine problem Description: PHP crashes when using mktime() I tested with the latest binary from www.php4win.de and with the RC6 binary from ftp.phpuk.org. Both crash when doing the following: D:\php\php-4.0.5RC6-win32php ?php echo mktime(1,0,0,1,1,1970,1); ? ^Z D:\php\php-4.0.5RC6-win32 (on Windows 2000 RC2) - Martin Previous Comments: --- [2001-04-27 20:04:27] [EMAIL PROTECTED] This works fine for me now. Please retest with latest win32 binaries from php4win.de or the 4.0.5 binaries and give feedback. - James --- [2000-08-08 08:57:48] [EMAIL PROTECTED] this is a dup of 4096 --- [2000-08-07 07:19:36] [EMAIL PROTECTED] checked again in NT with latest CVS - doesn't crash both in release debug mode. Could someone provide a backtrace? --- [2000-08-07 00:17:28] [EMAIL PROTECTED] crashes me too an W2K --- [2000-08-06 23:46:20] [EMAIL PROTECTED] negative timestamp (before 1970 that is) seem to crash windows time functions ... see also #4096 --- The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online. Full Bug description available at: http://bugs.php.net/?id=5987 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #8895 Updated: xslt_process() documentation problem
ID: 8895 User Update by: [EMAIL PROTECTED] Old-Status: Closed Status: Open Bug Type: Sablotron XSL Description: xslt_process() documentation problem This is ridiculous - this is the second time this bug has been closed by someone who never bothered to read the report! According to the documentation: The xslt_process() takes a string containing the XSLT stylesheet as its first argument, it takes a second string containing the XML data you want to transform and then a third string containing the results of the transformation. xslt_process() will return true on success and false on failure, to get the error number and error string if an error occurs use the xslt_errno() and xslt_error() functions. There is no conceivable way returning an untrappable fatal error can be seen as a simple return false, particularly since the comment about errors suggests that your script will continue executing if xslt_process() encounters an error. Currently, there's no way to call xslt_errno() / xslt_error(). There are three options at this point: actually fixing the Sablotron extension or changing the documentation to say something like "If the transform fails, PHP will immediately terminate with a fatal error". Or you could just close it a 3rd time with a bogus comment - I won't bother reopening it, as I don't use Sablotron regularly. This still reproduces with 4.0.5-dev, built from a CVS checkout on 3/26. Previous Comments: --- [2001-04-05 14:16:06] [EMAIL PROTECTED] this is the correct behavior, if the transformation fails so will php. --- [2001-02-14 10:53:39] [EMAIL PROTECTED] Please try to read the bug report before closing it. xslt_process() does *NOT* return false with some errors. Instead, it returns a PHP fatal error which cannot be trapped using @. --- [2001-02-14 06:19:21] [EMAIL PROTECTED] not a bug. xslt_process() returns false on failure, you can supress errors using the @ sign. --- [2001-01-25 02:02:18] [EMAIL PROTECTED] According to the documentation xslt_process() is supposed to return false and allow you to check errors with xslt_errno() xslt_error(). I found several situations where a validation error in the XSL stylesheet would cause it to instead fail with a fatal error: PHP Fatal error: msgtype: error in /var/www/stone2/index.php on line 18 (One example of an error would be a HTML tag with unquoted parameters (e.g. BORDER=0), which is legal for numeric values in HTML but not XML) Needless to say, this made debugging rather tricky as it never reached the error display in my code: if (xslt_process($XSL, $XML, $result)) { echo $result; } else { echo 'PXSL transformation error: /P'; echo xslt_errno() . ': ' . xslt_error(); } PHP config info: PHP Version 4.0.4pl1 System Linux gigante 2.2.18pre21 #1 Sat Nov 18 18:47:15 EST 2000 i686 unknown Build Date Jan 24 2001 Configure Command './configure' '--with-apxs' '--enable-shared' '--with-bz2' '--with-java=/usr/local/jdk1.3' '--with-gettext' '--with-mcrypt' '--with-zlib' '--with-openssl=/usr/local/ssl' '--enable-magic-quotes' '--enable-calendar' '--with-curl' '--with-mcrypt' '--with-dom=/usr/local/lib' '--enable-ftp' '--enable-gd-imgstrttf' '--with-gd' '--with-jpeg-dir' '--with-ttf' '--with-t1lib' '--with-imap-ssl' '--with-imap' '--with-ldap' '--with-mysql' '--with-pdflib=/usr/local/lib' '--with-zlib-dir' '--with-jpeg-dir' '--with-png-dir' '--with-tiff-dir' '--with-pgsql' '--with-pspell' '--with-readline' '--with-sablot' '--with-sablot-errors-descriptive' '--enable-trans-sid' '--enable-shmop' '--enable-sockets' '--with-swf' '--enable-sysvsem' '--enable-sysvshm' '--enable-inline-optimization' '--enable-memory-limit' --- Full Bug description available at: http://bugs.php.net/?id=8895 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DEV] PHP 4.0 Bug #8896: mhash compilation error
From: [EMAIL PROTECTED] Operating system: Linux (Debian 2.2r2) PHP version: 4.0.4pl1 PHP Bug Type: Compile Failure Bug description: mhash compilation error mhash.c: In function `php_if_mhash_keygen_s2k': mhash.c:206: `KEYGEN' undeclared (first use in this function) mhash.c:206: (Each undeclared identifier is reported only once mhash.c:206: for each function it appears in.) mhash.c:206: parse error before `keystruct' mhash.c:226: `KEYGEN_S2K_SALTED' undeclared (first use in this function) mhash.c:244: `keystruct' undeclared (first use in this function) From the mhash.h installed with libmhash: /* $Id: mhash.h,v 1.3 1999/10/04 12:13:10 sascha Exp $ */ ./configure --with-gettext --with-mcrypt --with-zlib --with-apxs --with-openssl=/usr/local/ssl --enable-magic-quotes --with-bz2 --enable-calendar --with-curl --with-mcrypt --with-dom=/usr/local/lib --enable-ftp --enable-gd-imgstrttf --with-gd --with-jpeg-dir --with-ttf --with-t1lib --with-imap-ssl --with-imap --with-java=/usr/local/jdk1.3 --with-ldap --with-mysql --with-pdflib=/usr/local/lib --with-zlib-dir --with-jpeg-dir --with-png-dir --with-tiff-dir --with-pgsql --with-pspell --with-readline --with-sablot --with-sablot-errors-descriptive --enable-trans-sid --enable-shmop --enable-sockets --with-swf --enable-sysvsem --enable-sysvshm --enable-inline-optimization --enable-memory-limit --enable-shared -- Edit Bug report at: http://bugs.php.net/?id=8896edit=1 -- PHP Development Mailing List http://www.php.net/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]