Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Ticket #15909 (closed defect: fixed)

Opened 5 months ago

Last modified 12 days ago

freetype 2.3.7 / php5 5.2.6 - PHP imagettftext broken

Reported by: philip@… Owned by: ryandesign@…
Priority: Normal Milestone: Port Bugs
Component: ports Version: 1.6.0
Keywords: imagettftext Cc: jwa@…, cabanela@…, macsforever2000@…, simon@…, nox@…
Port: freetype php5 gd2

Description

building php5 with

port install php5 +apache +whatever

works fine, but calling PHP's imagettftext() causes apache2 to go crazy:

The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec().
Break on __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__() to debug.
[Mon Jul 07 18:51:27 2008] [notice] child pid 67161 exit signal Trace/BPT trap (5)

http://discussions.apple.com/message.jspa?messageID=5705589 suggests to rebuild freetype with

--with-fsspec=no --with-fsref=no --with-quickdraw-toolbox=no --with-quickdraw-carbon=no

changing freetype's Portfile in line 50 to

#    --with-old-mac-fonts \
    --with-fsspec=no --with-fsref=no --with-quickdraw-toolbox=no --with-quickdraw-carbon=no 

and php5's Portfile in line 94 to

    --with-gd \

works. I know, the --with-old-mac-fonts was somehow important to some people and php5 now uses the bundled GD2, but I'm not too familiar with changing stuff in macports, so maybe someone else can, so all the freetype functions in php5 will work again.

Change History

  Changed 5 months ago by philip@…

  • cc philip@… added

Cc Me!

  Changed 5 months ago by jmr@…

  • cc jwa@… added; philip@… removed
  • owner changed from macports-tickets@… to ryandesign@…
  • type changed from enhancement to defect
  • milestone set to Port Bugs

Assigning to maintainer.

  Changed 4 months ago by ryandesign@…

  • cc cabanela@… added
  • status changed from new to assigned

Has duplicates #16340 and #16341 which contain more info.

  Changed 4 months ago by macsforever2000@…

  • cc macsforever2000@… added

Cc Me!

  Changed 3 months ago by cabanela@…

Just knocking to see if anyone is considering making a freetype variant to disable old font support and allow me to use freetype on Leopard again.

  Changed 2 months ago by simon@…

I've just got stuck on this bug (and taken several hours to realise it was OSX/MacPorts related rather than either my code or PHP more generally). Any plans for fixing it, or are we waiting on some OS change?

  Changed 2 months ago by ryandesign@…

  • cc simon@… added
  • port set to freetype

Someone just please tell me what to change and why. This ticket says to remove --with-old-mac-fonts and add --with-fsspec=no --with-fsref=no --with-quickdraw-toolbox=no --with-quickdraw-carbon=no. #16341 says I only need to add --with-quickdraw-toolbox=no --with-quickdraw-carbon=no. If someone could tell me definitively what configure options to add or remove, and what the implications of each change are, then I can commit something.

  Changed 5 weeks ago by blb@…

Doing

 configure.args \
-    --with-old-mac-fonts
+    --with-quickdraw-toolbox=no --with-quickdraw-carbon=no

gets PHP5 working here. I suppose those can be swapped back in a variant for those who still need them, maybe with a ui_msg warning or one in the description about the CoreFoundation+forking issue.

follow-up: ↓ 10   Changed 5 weeks ago by ryandesign@…

Ok. I'm inclined to not make a variant, but rather to make that change globally for darwin 9 and above, and leave things the way they are for darwin 8 and earlier.

in reply to: ↑ 9   Changed 4 weeks ago by cabanela@…

Replying to ryandesign@…:

Ok. I'm inclined to not make a variant, but rather to make that change globally for darwin 9 and above, and leave things the way they are for darwin 8 and earlier.

Sounds like a reasonable solution, since this problem only seems to bite darwin9 users. If Apple fixes it later, then maybe it can become a variant.

  Changed 4 weeks ago by nox@…

  • cc nox@… added
  • keywords php5 freetype gd2 removed
  • port changed from freetype to freetype php5 gd2

  Changed 12 days ago by ryandesign@…

I finally did some testing myself, and it appears that the only thing I really need to change to get php's imagettftext() to work on Leopard when php is running as an apache module is to remove --with-old-mac-fonts. So now, as of r42513, that option is only used on Tiger and earlier. See comment 6 in ticket 13045 for why this hopefully won't be a problem.

  Changed 12 days ago by ryandesign@…

  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.