Re: GD & Fonts
| From: | Ernest E Vogelsinger | Date: | Fri, 09 May 2003 11:57:02 +0000 |
| Subject: | Re: GD & Fonts | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-146994@lists.php.net to get a copy of this message | ||
At 12:38 09.05.2003, Chris Blake said:
--------------------[snip]--------------------
>----------------------------------------
>//Let GD2 know where fonts reside
> putenv('GDFONTPATH = fonts');
> $fontname = 'beast_wars.ttf';
>-----------------------------------------
>....but it fails with
>
>Warning: Could not find/open font in
>/home/data/ClientWebs/chrisplay/Generic/make_buttons.php on line 38
>
>Warning: Could not find/open font in
>/home/data/ClientWebs/chrisplay/Generic/make_buttons.php on line 71
>
>Warning: Cannot add header information - headers already sent by (output
>started at /home/data/ClientWebs/chrisplay/Generic/make_buttons.php:1)
>in /home/data/ClientWebs/chrisplay/Generic/make_buttons.php on line 73
--------------------[snip]--------------------
(1) make sure GDFONTPATH points to a _valid_ path. Please take into account
that the webserver starts the script at $_SERVER['DOCROOT'] - is GDFONTPATH
setup for this?
(2) if 1. proves ok, check the permissions on the folders and files. Can
PHP see the GDFONTPATH directory? Can it read it, and can it open a file? Try
print_r(exec('ls -al ' . GDFONTPATH));
and
fopen(GDFONTPATH.'/beast-wars.ttf','r') || die ('Cannot open font
file');
To check the file system basics if everything has been set up correctly.
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/