Page 1 of 1

Allow fsockopen allow only a few accounts.

Posted: Mon Nov 05, 2012 6:16 am
by copernic2006
Hello,
In php, ini, I disabled fsockopen and I would activate only a few accounts, so I added the following entry in php.ini ( /usr/local/lib/php.ini )

Code: Select all

[PATH=/home/username/public_html]
fsockopen = On 
Unfortunately, this solution is not working, any help is welcome? :)

For information :
PHP: 5.3.17
Apache: 2.2.23

Re: Allow fsockopen allow only a few accounts.

Posted: Mon Nov 05, 2012 11:09 am
by breun
First of all: fsockopen is not a php.ini directive, so you can't set fsockopen to On. ASL disables several risky PHP functions by default via the disable_functions directive in php.ini.

http://www.php.net/manual/en/ini.core.p ... -functions says: "This directive must be set in php.ini For example, you cannot set this in httpd.conf." So, the disable_functions directive can only be set in the system-wide configuration.

There is a way to disable specific PHP functions per vhost if you're running Suhosin via its suhosin.executor.func.blacklist setting: http://www.hardened-php.net/suhosin/con ... .blacklist

Re: Allow fsockopen allow only a few accounts.

Posted: Mon Nov 05, 2012 3:12 pm
by faris
Have a look at:
http://www.atomicorp.com/forum/viewtopi ... 50&p=31649

And if you use php in fastcgi mode:
http://www.atomicorp.com/forum/viewtopic.php?f=2&t=6325

(Edit: first link corrected)

Re: Allow fsockopen allow only a few accounts.

Posted: Mon Nov 05, 2012 3:28 pm
by copernic2006
Thank you so much faris, I will read the links recommended.