uncomment extension=php_sockets.dll

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
shivam0101
Forum Contributor
Posts: 197
Joined: Sat Jun 09, 2007 12:09 am

uncomment extension=php_sockets.dll

Post by shivam0101 »

how to uncomment extension=php_sockets.dll programatically? from php.ini
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post 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.
Post Reply