Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

parse_ini_file() has been disabled for security reasons - alternative?

Is any alternative for parse_ini_file()? Is it really so dangerous? Is a good reason to have it disabled or can I somehow convince admin that its safe?

parse_ini_file() has been disabled for security reasons

There I've found what this error mean

error description

I use in this code (there was problem with some misspeling, but its solved and worked fine on one hosting but on another doesn't, casuse disabling that function)
my code

like image 932
user1097772 Avatar asked Sep 04 '25 04:09

user1097772


1 Answers

I honestly can't find a sensible reason to disable that function but, if parse_ini_string() is available and you're also allowed to read files, you should have the same functionality (just in a more convoluted way). If that's not an option either, you can:

  • Rewrite the binary function in plain PHP
  • Find a new hosting service

Whatever is cheaper for you ;-)

like image 163
Álvaro González Avatar answered Sep 05 '25 22:09

Álvaro González



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!