Unload an extension

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Unload an extension

Post by anjanesh »

Hi

Is there anyway to uload an extension during run-time ?

Code: Select all

if (extension_loaded('someext'))
 {
 u_dl('php_someext.dll'); # Unload php_someext.dll
 }
Is this possible ?

Thanks
derchris
Forum Commoner
Posts: 44
Joined: Sat Jun 10, 2006 6:14 pm

Post by derchris »

No,

extensions can only be disabled by editing php.ini
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

No way to unload it using ini_set ?

Code: Select all

<?php
ini_set('extension', 'php_curl.dll'); # Need the opposite of this - make it to #extension or something
phpinfo(); 
?>
derchris
Forum Commoner
Posts: 44
Joined: Sat Jun 10, 2006 6:14 pm

Post by derchris »

Only if the extension has an attribute for that.
Like:

extension.bla_enabled = 0/1 in php.ini

Then you can set it in runtime by:

Code: Select all

ini_set("extension.bla_enabled", "0");
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

that I know of, that will not actually unload the extension, per se, but just tell it not to process.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Just out of interest, why are you trying to unload an extension?

Mac
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post by anjanesh »

Need to get mod_gzip to stop working so that flush() works.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

mod_gzip is an apache module. Do you mean ob_gzhandler()? If so, look at the notes found on the linked page.
Post Reply