Opened 15 years ago

Closed 15 years ago

#3117 closed defect (fixed)

MapScript for PHP 5.3 = undefined symbol php_gd_gdImageCopy

Reported by: mgleahy Owned by: aboudreault
Priority: normal Milestone: 5.4.3 release
Component: MapScript-PHP Version: 5.4
Severity: normal Keywords:
Cc: dmorissette

Description

I've recently tried upgrading to PHP 5.3 and found that php_mapscript has problems loading. The error I get is as follows:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/php_mapscript.so' - /usr/lib/php/modules/php_mapscript.so: undefined symbol: php_gd_gdImageCopy in Unknown on line 0

This happens with the distributed binaries for Fedora 12 alpha, as well as when I try compiling my own on a Fedora 10 system. On my Fedora 10 system, everything works fine when compiled against PHP 5.2.x - the only change when I get this error is the upgrade to PHP 5.3.

I haven't been able to find any recent references to this issue. Would anyone have any suggestions, or is this something that has already been fixed?

Attachments (1)

mapserver-542.spec (8.6 KB ) - added by mgleahy 15 years ago.
Spec file used to build mapserver rpms.

Download all attachments as: .zip

Change History (8)

comment:1 by dmorissette, 15 years ago

Cc: dmorissette added
Milestone: 5.4.3 release
Owner: changed from mapserverbugs to aboudreault

Which version of MapServer are you using? 5.4.2? Before we try to reproduce this, are you 100% sure that you are compiling against the correct php-devel (or whatever it's called) package for the version of PHP that you have upgraded to and that there is not an old copy of the PHP devel files that could interfere with the build?

comment:2 by mgleahy, 15 years ago

The version of MapServer is 5.4.2.

I definitely compiled with php-devel-5.3.0 installed (certainly on the Fedora 12 OS, which only has that version available). I just finished double-checking to be sure, and even recompiled my own mapserver 5.4.2 binaries for the Fedora 12 system, and the result is the same.

What's the next thing I should look for?

comment:3 by pdeffendol, 15 years ago

I can confirm the same on my end. This is a completely clean machine (used only to build custom CentOS 5.3 packages) with a new install of PHP 5.3. The PHP GD module is built with the bundled GD library, and I'm using Mapserver 5.4.2. I do not have this issue when building Mapserver 5.4.2 against PHP 5.2. If I can provide any additional information, I'd be glad to help.

comment:4 by aboudreault, 15 years ago

Status: newassigned

comment:5 by aboudreault, 15 years ago

May you verify what's happen if you do a simple "yum install php-gd" on your fedora system. I'm not able to reproduce it right now. Also, did you compiled your php with the switch "--with-gd" ?

comment:6 by mgleahy, 15 years ago

I'm building the rpms using the spec from the distributed MapServer rpms. The php-gd package is automatically required in order to install the rpms, and --with-gd is in the configure statement. I'll attach a version of the spec file I'm using for you to look at.

by mgleahy, 15 years ago

Attachment: mapserver-542.spec added

Spec file used to build mapserver rpms.

comment:7 by aboudreault, 15 years ago

Resolution: fixed
Status: assignedclosed

After further investigation, the problem is not related with PHP 5.3. I can reproduce the problem with 5.2.x as well. The problem happens when php is compiled with gd as a shared extension (--with-gd=shared option). For compatibility reasons, when php is compiled with this option, it renames almost all gd functions. You can easily fix any MapServer release by applying manually the following changeset: r9298. Fixed and committed in r9298.

Note: See TracTickets for help on using tickets.