note 13057 added to function.imagepstext.php
| From: | npdavis at hotmail dot com | Date: | Thu, 24 May 2001 13:09:35 +0000 |
| Subject: | note 13057 added to function.imagepstext.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-14248@lists.php.net to get a copy of this message | ||
If you have a programming error in your code, using ImagePsText, sometimes t1lib crashes with an
unrecoverable error. Because of this, httpd needs to be restarted.
This problem only occurs if there is a programming error, but can drive you crazy when debugging, if
you don't know about it. By killing the parent process(httpd) you "reset" t1lib. When
debugging, if you get an error then make a code change, restart httpd before testing it again. This
will save hours of frustration. Make it a habit to just restart httpd after every error, and you
will be much happier.
Also, to see debugging messages, (if you are rendering x's) comment the jpeg header, and the
ImageJpeg statement. You will get beautiful error messages. When you get a blank page, your
ImagePsText code is working correctly. Uncomment the Header() and ImageJpeg() and see what you have.
You might be passing parameters that render a white image with no text, but the code is working!
Numeric t1lib error messages can be decoded using the t1lib_doc.pdf file that comes with t1lib. PHP
simply relays these errors from t1lib to the page. Please don't ask the PHP people about these
errors... t1lib has beautiful documentation.... use it: )
thx,
Neil
http://www.php.net/manual/en/function.imagepstext.php