WWWhost
06-04-2004, 09:10 AM
hi all,
i have the following in my php.ini:
disable_functions = dl,exec,passthru,proc_open,proc_close,shell_exec,system,popen
Now, is there a way to give access to all this functions for 1 account only on the server editing the httpd.conf?
If yes how?
Thanks a lot
NEO-Charlie
06-04-2004, 01:24 PM
Are you running phpsuexec or anything similar (i.e. php as a cgi), or is this php running as an Apache module?
If you are running phpsuexec on the server, you can drop a customized php.ini file in the root directory of this account with those options enabled, and it will run just fine.
If you are not running php as an Apache module, you will not be able to enable any of those functions on a per-account basis. The disable_functions option is only available in php.ini and cannot be overridden in httpd.conf or a .htaccess file.
Zenutech
06-04-2004, 10:43 PM
Hi Neo,
Thank you for this information. I was wondering this as well.
I would appreciate if someone else could come here and also agree with Neo if he is correct. Two people saying will add credibility to this statement. :)
Zenutech
06-04-2004, 10:47 PM
Actually, I'll be that second person :)
I did some more research and found:
http://www.weberblog.com/Manuals/PHP/features.safe-mode.html
quote for that URL: "You can also disable individual functions. Note that the disable_functions directive can not be used outside of the php.ini file which means that you cannot disable functions on a per-virtualhost or per-directory basis in your httpd.conf file."
Bashar
06-05-2004, 04:24 AM
first allow to all then disable it per accounts via the virtualhost entry
WWWhost
06-05-2004, 08:46 AM
ok this is a good solution if you have only a few accouts on server...
Zenutech
06-05-2004, 11:09 AM
Originally posted by Bashar
first allow to all then disable it per accounts via the virtualhost entry
I'll try this in the next 2 weeks.
Zenutech
06-08-2004, 11:17 AM
Originally posted by Bashar
first allow to all then disable it per accounts via the virtualhost entry
<VirtualHost...>
...
disable_functions = phpinfo
</VirtualHost>
/usr/local/apache/bin/apachectl configtest
Syntax error on line 1203 of /usr/local/apache/conf/httpd.conf:
Invalid command 'disable_functions', perhaps mis-spelled or defined by a module not included in the server configuration
http://bugs.php.net/bug.php?id=6982
I don't think it's possible. Have you tried it Bashard?
Zenutech
06-18-2004, 01:14 PM
I recommend everyone to go here:
http://www.webhostingtalk.com/showthread.php?s=&postid=2209103#post2209103
More people have discussed the matter at that URL.