php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61988 imagettftext() does not support UNC Paths
Submitted: 2012-05-10 08:32 UTC Modified: 2017-10-24 16:24 UTC
Votes:14
Avg. Score:4.3 ± 1.2
Reproduced:14 of 14 (100.0%)
Same Version:5 (35.7%)
Same OS:9 (64.3%)
From: rudi at rudiv dot se Assigned:
Status: Suspended Package: GD related
PHP Version: 5.3.13 OS: Windows Server 2008 R2
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2012-05-10 08:32 UTC] rudi at rudiv dot se
Description:
------------
GD does not support UNC paths to fonts in the standard format of \\SERVER\Share\File\Path.ext. Instead, //SERVER\Share\File\Path.ext must be used.

Test script:
---------------
<?php
$gdimg = imagecreatetruecolor(200, 200);
$color = imagecolorallocate($gdimg, 0, 0, 0);
imagettftext($gdimg, 5, 5, '\\\\WEBFARM1\WEBDATA\fonts\arial.ttf', 'Test!');
header('Content-Type: image/jpeg');
imagejpeg($gdimg);

Expected result:
----------------
There will be no errors.

Actual result:
--------------
Warning: imagettftext(): Could not find/open font in \\WEBFARM1\WEBDATA\webroot\test.local\font.php on line 6

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-09-04 17:36 UTC] cmb@php.net
-Status: Open +Status: Verified -Assigned To: +Assigned To: cmb
 [2016-09-04 17:36 UTC] cmb@php.net
Confirmed. This is a libgd issue[1], and as such should be fixed
upstream first.

[1] <https://github.com/libgd/libgd/blob/gd-2.2.3/src/gdft.c#L1686-L1701>
 [2017-10-24 05:26 UTC] kalle@php.net
-Status: Verified +Status: Assigned
 [2017-10-24 16:24 UTC] cmb@php.net
-Status: Assigned +Status: Suspended -Assigned To: cmb +Assigned To:
 [2017-10-24 16:24 UTC] cmb@php.net
I have filed a ticket against libgd[1], and suspend this ticket
until the issue is resolved upstream.

[1] <https://github.com/libgd/libgd/issues/413>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 06:01:30 2024 UTC