From: Olly B. <ol...@su...> - 2013-04-10 02:50:26
|
Rodolfo Ochoa writes: > I think ./Source/Modules/php.cxx381: Printf(f_phpcode, " if (!dl('php_%s.dll')) return;\n", module); > > shouldn't have php_ prefix hardcoded on windows, since I modify my output for different platforms and have a standard name for all libraries, this gives me problems on the output using CMAKE. The intention of this code is to try to load the C/C++ extension part of the binding if it hasn't already been loaded. But these days it's very common to have dl() disabled for security reasons, usually via this in php.ini: enable_dl = Off And so you can't really rely on this code working on an arbitrary installation of PHP anyway. I recommend you load your module from php.ini, and then the name passed to dl() is irrelevant as it'll never get called. You want something like this in php.ini: extension=foo.dll Really the only reason the dl() call is still there is that removing it might break things for some existing users, which seems unfriendly. But so would changing the filename passed, so it makes no sense to do that. Cheers, Olly |