Opened 15 years ago

Last modified 15 years ago

#3065 closed defect

php/mapscript w/ php 5.3: "regex/regex_extra.h cannot be found" — at Version 1

Reported by: dfuhry Owned by: aboudreault
Priority: normal Milestone: 5.4.2 release
Component: MapScript-PHP Version: svn-trunk (development)
Severity: normal Keywords:
Cc: dmorissette, assefa, jmckenna

Description (last modified by dmorissette)

Php 5.3, released yesterday, seems to change at least the layout of regex-related files. Hence, you get the error "regex/regex_extra.h cannot be found" when running configure.

Hardcoding that condition to true, mapscript/php3/php_regex.c failed to compile since its

#include "regex/regex_extra.h"
#include "regex/regex.h"

files didn't exist. After commenting those out and adding

#include "ext/ereg/regex/regex.h"

things compiled, but apache processes would die with glibc free() errors. In mapscript/php3/php_regex.c, by commenting out the call to regexec() in ms_regexec() (hardcoding return -1), and the calls to regfree() and free() in ms_regfree(), processes no longer segfault.

I hope this info helps in developing a proper patch.

I'm not sure if this matters, but I also changed API_EXPORT #define stuff in mapregex.h to better match that in php's php/ext/ereg/regex/regex.h, which includes an extra clause for

#elif defined(__GNUC__) && __GNUC__ >= 4
#define API_EXPORT(type)    __attribute__ ((visibility("default"))) type

Change History (1)

comment:1 by dmorissette, 15 years ago

Cc: dmorissette assefa jmckenna added
Description: modified (diff)
Milestone: 5.4.2 release
Owner: changed from mapserverbugs to aboudreault

Assigned to Alan to look into this.

Assefa, Jeff: MS4W 3.0-beta seems to be using a RC of PHP 5.3. Did you not encounter those issues?

Note: See TracTickets for help on using tickets.