ID:               26635
 Updated by:       [EMAIL PROTECTED]
 Reported By:      choinet at rocketmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         GD related
 Operating System: Windows XP
 PHP Version:      4CVS-2003-12-28
 New Comment:

Please don't reopen this, there is no bug here.
There's something wrong with your system..
(most likely you're not installing the snapshot correctly)



Previous Comments:
------------------------------------------------------------------------

[2003-12-28 18:26:14] choinet at rocketmail dot com

eh, that hyperlink should be without the comma

------------------------------------------------------------------------

[2003-12-28 18:25:22] choinet at rocketmail dot com

What am I doing wrong, then? Here's a screenshot at
http://icandy.sourceforge.net/phperror.gif, showing the script and font
file in c:\htdocs and c:\htdocs\test directory, respectively, as well
as the source code and the instance of the problem.

The warning was generated on Windows XP and Apache2 using the latest
STABLE CVS (I also checked 4.3.4, latest 5.x CVS, and 5.0.0 beta 3)

------------------------------------------------------------------------

[2003-12-28 14:24:51] [EMAIL PROTECTED]

I have tried path with spaces in them on Windows XP and they work
properly.

------------------------------------------------------------------------

[2003-12-26 01:34:05] choinet at rocketmail dot com

When I read the previous response, I was almost completely baffled. I
see two confirmations that the bug has been fixed, yet here I am at my
computer with clean installs of the various PHP4,PHP4 CVS, PHP5 beta 3,
and PHP5 CVS, and still have the problem. I even went to my other
computer running Windows XP/Apache2/PHP to verify that I wasn't
encountering an isolated problem. Still, I found it quite odd that the
bug was fixed by the developers and that the bug was unreplicable.

Then I remembered having to place NetPBM binaries in a directory like
"c:\netpbm" without any spaces in the pathname in order for a
php-powered gallery application to recognize them. I decided to try the
same thing with the Apache DocumentRoot directive and set it to the
location of a copy of the test script, "C:/htdocs", instead of the
usual "C:/Program Files/Apache Group/Apache2/htdocs". After restarting
the server, the pathnames worked fine just like Iliaa described.

So, I found that the culprit (spaces in the pathname) affected not only
the absolute pathnames but the relative ones as well. For the absolute
pathnames, if they contain spaces, the same error in opening the font
will occur. This can only be remedied by using the MS-DOS 8.3
convention, e.g. "C:/Progra~1/Apache~1/Apache2/htdocs/arial.ttf" as
aforementioned. However, there is no such alternative for Linux
pathnames with spaces in them. Furthermore, concerning relative
pathnames, which much of the responses have been centered around: the
fonts work as intended when called as 'arial', 'arial.ttf', and so on
only if the directory containing them has no spaces in its pathname.
I'm not sure why the naming format of the parent directories affects
the relative pathname, but it somehow does. That is why the two gd
functions work only when the font file is located in a pathname without
spaces (c:\htdocs) and does not for the other (c:\Program Files\Apache
Group\Apache2\htdocs). So, I think that the problem of spaces is
affecting all of the other remaining issues.

I am assuming that the developers reported no problems on the Windows
setup because the http document root's or the fontfile's pathname had
no spaces. The thing is, the Apache webserver installs by default at
"c:\Program Files\Apache Group", so the DocumentRoot will still
generate this error.

Sorry for making this report seem long and drawn out, but the problem
has finally been pinpointed after much obfuscation, and I am wondering
if the outstanding issues can be fixed.

------------------------------------------------------------------------

[2003-12-25 13:56:59] [EMAIL PROTECTED]

Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php

Neither Jani (sniper) nor I could replicate the bug on 
Win32 or Linux. The font checking code works with full 
paths, font name (without extension) and font name with 
extension. 

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/26635

-- 
Edit this bug report at http://bugs.php.net/?id=26635&edit=1

Reply via email to