Board index   FAQ   Search  
Register  Login
Board index System Administration Server security

php.ini - disable_functions not working

Discussions about server security -- questions and answeres

Moderators: macek, egami, gesf

php.ini - disable_functions not working

Postby kiwiplayer » Fri Sep 21, 2012 3:59 am

Hello there,

I've been looking at disabling certain php functions for security reasons, and it turned into a mammoth task identifying which ones to deactivate, so ...

As an exercise, I decided to try deactivating every single function (about 5000 of them *gulp!*), then access my site and see what errors I'd get ... the idea being that I would then 'punch holes' in my disabled list to allow only those functions that my site actually uses.

So having generated a complete list of all 5000-odd functions, and applying it to my php.ini, then confirming that they were listed as disabled in phpinfo, I was surprised to find that my site continued working just fine ... even though functions like mysql_connect and mysql_query were being called.

Furthermore - being a function in it's own right - I would've expected that phpinfo itself would've been blocked, but I was able to access it via the web just fine.

I ran this test on my single-user development machine, so I know my php.ini isn't being over-ridden somehow, nor have I accidentally got more than one 'disable_functions' definition in my ini file causing my list to be ignored ... and in any case the disabled list is correctly displayed in phpinfo.

So now I wonder whether this 'disable_functions' ini setting even works at all, it doesn't look like it based on my tests!

Any thoughts or insights would be much appreciated ...

Thanks!
kiwiplayer
New php-forum User
New php-forum User
 
Posts: 2
Joined: Fri Sep 21, 2012 3:45 am

Re: php.ini - disable_functions not working

Postby kiwiplayer » Fri Sep 21, 2012 5:16 am

Just to answer my own question - I've got this working now ... turns out the list of disabled functions must be a continuous comma-delimited string, whereas I had a comma-delimited list with each function on a separate line. Now I'm getting lots of errors, as expected!

Whilst I prefer this approach to security - meaning "have everything switched off unless expressly permitted" - I'm not sure it's practical, as the processing overhead might be substantial.

Any thoughts ?
kiwiplayer
New php-forum User
New php-forum User
 
Posts: 2
Joined: Fri Sep 21, 2012 3:45 am

burberry outlet Burberry Outlet Online Sale (2)

Postby sherman79 » Tue Jun 04, 2013 11:37 am

"Careers, like rockets, don't always take off on burberry london feminino schedule. The key is to keep working the engines." - Gary Sinese
If you pay close attention to the words and inferences of some who use freelance writers you will see that freelancers must be superhuman.
The Top Ten Signs you Have Found [url]burberry outlet[/url] a Perfect Freelance Writer
1) They are never too busy to work on my project.
2) They are always efficient enough to have the project completed yesterday.
3) They are willing burberry coats white to write for a fee less than the poverty level.
4) They are willing to provide unlimited rewrites.
5) They always know exactly the style of writing I need.
6) They do burberry coat not have a personal life.
7) They are knowledgeable about every subject known to man.
8) They never get sick.
9) They never expect prompt payment.
10) They like it when I'm snippy.
As a freelance writer you may be finding some truth to this list, but the burden of proof is on your shoulders as a freelancer. You do need to adopt a can-do attitude, but be honest enough to pass on a project if you are uncertain about the subject, deadline or volume of work.
The reason a good freelancer may seem superhuman is they have learned the value of follow-up, follow through, customer service and commitment.
All freelance writers have had clients that have more than likely been burberry quilted jacket refused service from other freelancers. burberry london trench These clients refused to be pleased with any work they are presented with. They have an idea writer in mind, but sadly that writer does not exist.
In these cases it is difficult to end the relationship gracefully. It could be you have provided numerous rewrites and the client remains dissatisfied. At that point you may need to stand up to the client and ask for payment or to be released from the obligation.
When you do hear from satisfied customers, you should not hesitate to ask for a brief testimonial you can use for the benefit of other customers who may be considering you as a means of reaching their content objectives.
Stretch your wings and learn new skills. A good freelancer may specialize in one type of service, but is adaptable enough to facilitate new writing formats when needed. The more you learn about freelancing the more marketable your skills will be.
"Do a little more each day than you think you possibly can." - Lowell Thomas

Related articles:


burberry coat women Burberry Outlet Online Sale (18)

burberry womens shirt Burberry Outlet Online Sale (53)

burberry weekend for women Burberry Outlet Online
sherman79
New php-forum User
New php-forum User
 
Posts: 85
Joined: Mon Jan 07, 2013 12:01 pm


Return to Server security

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron