pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

GD, Apache, mod_PHP, mod_perl broken on Darwin (Mac OS X)

The GD extension for PHP  when running the command line php -i shows the 


GD Support => enabled
GD Version => bundled (2.0.34 compatible)
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.4.4
GIF Read Support => enabled
GIF Create Support => enabled
JPEG Support => enabled
libJPEG Version => 8
PNG Support => enabled
libPNG Version => 1.5.3rc02
WBMP Support => enabled
XBM Support => enabled
JIS-mapped Japanese Font Support => enabled

When loading the lib/httpd/ module in apache and trying to call GD 
functions we have

PHP Fatal error:  Call to undefined function imagecreate() 

Running the php function phpinfo(); inside a php script doesn't show that the 
GD extension is loaded unlike the command line php -i

Trying to load up mod_perl under apache shows the following error.

[Sat Jun 18 10:55:57 2011] [error] Can't load 
 for module GD: 
 1): Symbol not found: __cg_jpeg_resync_to_restart\n  Referenced from: 
  Expected in: /usr/pkg/lib/libjpeg.8.dylib\n in 
 at /usr/pkg/lib/perl5/5.12.0/darwin-thread-multi-2level/ line 
204.\n at (eval 941) line 2\nCompilation failed in require at (eval 941) line 
[Sat Jun 18 10:55:57 2011] [error] Can't load Perl module GD for server 
kristamari:80, exiting...

Running some perl scripts via cgi and using p5-GD does generate some images 
without error, showing that GD is functional to some extent.

Related installed pkgsrc packages

ap22-perl-2.0.5nb1  Module that embeds a Perl interpreter into Apache
ap22-php53-5.3.6    Apache (apache22) module for PHP5.3
ap22-py26-python-3.3.1 Apache module that embeds the Python interpreter
apache-2.2.19       Apache HTTP (Web) server, version 2.2
apr-1.4.5           Apache Portable Runtime
apr-util-1.3.12nb1  Apache Portable Runtime utilities
gd-2.0.35nb8        Graphics library for the dynamic creation of images
gdk-pixbuf2-2.22.1nb2 Image loaders for gtk2
jasper-1.900.1nb5   Software-based reference implementation of the JPEG-2000 
jpeg-8c             IJG's jpeg compression utilities
p5-Apache-DBI-1.08nb1 DBI support for Apache+mod_perl
p5-GD-2.46          Perl5 interface to gd graphics library
p5-GD-SecurityImage-1.70nb1 Perl5 security image (CAPTCHA) generator
perl-5.12.2nb2      Practical Extraction and Report Language
php-5.3.6nb2        PHP Hypertext Preprocessor version 5
php53-gd-5.3.6nb1   PHP extension for GD graphics library
php53-pdo-5.3.6     PHP extension for PHP Data Objects (base)
php53-pdo_mysql-5.3.6 PHP extension for PHP Data Objects (MySQL)
php53-suhosin- Advanced protection system for PHP installations
png-1.5.3rc02       Library for manipulating PNG images

Darwin 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 
29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386

Mac OS X (10.6.7)

Any ideas why GD isn't linking to jpeg libraries correctly greatly appreciated.

Ian McWilliam

Home | Main Index | Thread Index | Old Index