Welcome Guest, Not a member yet? Register   Sign In
OS X Leopard and Image_Lib Issue (Solved)

The following is an account of my experience setting up OS X 10.5.x to work with CodeIgniter 1.7.0. My issue was that some of the Image_Lib functions where returning errors.

PLEASE NOTE: There were no CodeIgniter Bugs related to this issue, all problems you experience with OS X Leopard are related to your apache and php environment.

The Basics:
OSX 10.5.x's Apache Server and PHP engine are compiled to run 64bit. So if you're running a new Machine that is 64bit (Core 2 Duo) then problem stems from the fact that GD and other plugin libraries for PHP are only 32bit and they wont run.

I had just installed Freakauth and was having problems displaying the captcha image.
I saw the error occurring when in Image_Lib.php in function image_create_gd($path = '', $image_type = '') where it checks:
if ( ! function_exists('imagecreatefromjpeg'))

THE Solution:
The solution isn't pretty, but it works... it requires:
- stripping out 64 bit support for your apache server
- compiling the latest version of PHP (5.2.6) for 32bit
- compiling and installing the JPEG, PNG and FREETYPE Libraries with MacPorts

After doing all of the above steps I still had an issue where the page was returning blank and my Apache log displayed the following error:
() to debug.
Which lead to the last step:
- fix the MacPorts "freetype" problem (allows the PHP command 'imagettftext' to work)

To do this you MUST follow the instructions provided by the 2 links below carefully.
You need the following
-root/su user access through terminal
-you need to install XCode (Came with your Leopard Install Disc)
-you need to install X11 SDK (Also on the Install Disc)

I recommend Following the same tutorials that i found online

Apache 32bit and PHP Compile Instructions

MacPorts Freetype Fix

Hope this helps

Messages In This Thread
OS X Leopard and Image_Lib Issue (Solved) - by El Forum - 11-17-2008, 11:37 PM
OS X Leopard and Image_Lib Issue (Solved) - by El Forum - 12-17-2008, 11:24 PM
OS X Leopard and Image_Lib Issue (Solved) - by El Forum - 12-18-2009, 10:59 PM

Theme © iAndrew 2016 - Forum software by © MyBB