Re: map internal extension name to actual file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Zac Barton wrote:
> Hi,
> 
> Does anyone have any good ideas of how to find out what extension was loaded/enabled from what actual file.
> 
> For example the "ming" extension (thats its internal name) could come from php_ming.dll in my extensions dir. But if the file name is say mingFlash.dll how can i determine (in php) that my ming functions come from the mingFlash.dll file?
> 
> I had thoughts of getting the name of the first function from get_extension_funcs("ming") and then seeing if the text of the function name appeared in the actual content of mingFlash.dll, but it seems a bit inaccurate and slow. Can unpack help me here?
> 
> To re-cap id love to be able to say (from within php), yea the ming extension was loaded by enabling the mingFlash.dll in php.ini.
> 

If you just want to know that an extension was loaded then the easiest
way would be this function:

http://www.php.net/manual/en/function.extension-loaded.php

<wild_guess>If you really need more specific information about an
extension (such as where the extension library is stored on disk) then
you might be able to pull it out of the PHP class ReflectionExtension
</wild_guess>

http://www.php.net/manual/en/language.oop5.reflection.php

> Hope that makes sense
> 
> Zac


-- 
Teach a man to fish...

NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://www.php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux