Opened 18 years ago

Closed 15 years ago

#1879 closed defect (wontfix)

conflict with libgd

Reported by: dnadeau@… Owned by: dmorissette
Priority: high Milestone: 6.0 release
Component: MapScript-PHP Version: 4.10
Severity: normal Keywords:
Cc:

Description (last modified by dmorissette)

When building mapscript with php support, if using php-gd RPM file there is a
conflict between libgd.so used by mapserver and gd.so found in /usr/lib/php4/  

The first error I got was about in test_layer_mask.phtml:

$map->selectOutputFormat("PNG")

When deleting gd.so from /usr/lib/php4 here is the error I get:

PHP Warning:  dl(): Unable to loaddynamic library
'/usr/lib/php4/php_mapscript.so' - /usr/lib/php4/php_mapscript.so: undefined
symbol: php_gd_gdImageCopy in
/usr/local/mapserver/mapscript/php3/examples/test_layer_mask.phtml
          on line 27

php_gd_gdImageCopy not being found. 

To solve this, I recompiled php from the tarball using --with-gd option pointing
to libgd installation directory. (/usr in my case)

I recompiled php_mapscript.so and placed it in the extension directory.

Problem was solved.

Change History (5)

comment:1 by dmorissette, 18 years ago

Milestone: 4.10 release
Owner: changed from mapserverbugs to dmorissette
Disabling PHP's gd.so in php.ini led to the following undefined symbols, which
suggests that php_mapscript.c is compiled with references to the php_gd_* functions:

PHP Warning: dl(): Unable to load dynamic library
'/usr/lib/php4/php_mapscript.so' - /usr/lib/php4/php_mapscript.so: undefined
symbol: php_gd_gdImageCopy in
/usr/local/mapserver/mapscript/php3/examples/test_layer_mask.phtml on line 27

We need to find a way to detect at compile time that PHP contains the bundled GD
and refuse to build or produce huge warnings with big neons around them.

Taking this bug and setting target milestone to 4.10

comment:2 by dmorissette, 18 years ago

It just occured to me that removing any calls to gd-specific functions from
php_mapscript.c and moving those calls down to wrappers in the mapserver core
might be enough to solve the issue, but I am hesitant to change this for 4.10.0. 

comment:3 by dmorissette, 17 years ago

Description: modified (diff)
Milestone: 5.0 release5.2 release

Too late for such a change in 5.0 ... pushing to 5.2

comment:4 by dmorissette, 16 years ago

Milestone: 5.2 release5.4 release

comment:5 by dmorissette, 15 years ago

Milestone: 5.4 release6.0 release
Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.