[mapserver-users] PHP-MapScript with PHP 5.3 fastcgi warning

William Kyngesburye woklist at kyngchaos.com
Thu Sep 2 10:41:36 EDT 2010


So, I'm *finally* getting around to updating my OS X PHP package to 5.3 and found an important change that affects MapServer mapscripts (and I didn't see it mentioned in the MapScript docs).  I'm others have run into this already and figured it out (sorry if this is old news), but documentation is good.

dl() is disabled in all but CGI, CLI and embed builds of PHP.  That means PHP will throw an error, not a warning, when you try to dl("php_mapscript.so").  You *must* load extensions from the php.ini when using PHP as DSO (those that don't have a choice), or as fastcgi, or any of the obscure PHP SAPIs.

I guess the best way to handle this is to test if php_mapscript is already loaded before trying.  And checking for the existence of the dl() function just in case, if it isn't loaded.


This stumped me for a while because my *fastcgi* PHP build didn't work.  Then I realized that they really mean "CGI", and not also fastcgi.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

All generalizations are dangerous, even this one.




More information about the mapserver-users mailing list