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:13
Avg. Score:4.4 ± 1.1
Reproduced:13 of 13 (100.0%)
Same Version:4 (30.8%)
Same OS:9 (69.2%)
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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: rudi at rudiv dot se
New email:
PHP Version: OS:

 

 [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-2018 The PHP Group
All rights reserved.
Last updated: Tue Sep 25 11:01:25 2018 UTC