Page 1 of 1

uncomment extension=php_sockets.dll

Posted: Tue Jul 10, 2007 5:02 am
by shivam0101
how to uncomment extension=php_sockets.dll programatically? from php.ini

Posted: Tue Jul 10, 2007 5:39 am
by onion2k
If you're in control of the environment then something as simple as grabbing the contents of the file using file_get_contents() then using str_replace() to replace the commented line with an uncommented version would work nicely. That would only be worthwhile if you're certain what the php.ini file is going to contain though. If you want it to work on any php.ini file even when people have editted by hand ... then you're going to need to write a parser. That's a lot of work.