Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

217
Vistas
How to define multiple ini settings using php command line?

I am trying to allow the allow_url_fopen and rename functions temporarily for a script. I can do it with just one function, but not both.

Something like this:

php -d allow_url_fopen=on rename=on <file>

I'm using PHP 5.6

Update

Apparently rename() is in the disable_functions in my php.ini file (whereas allow_url_fopen is turned off outside of that), so I'm assuming the -d option doesn't change the settings for the disable_functions directive.

Therefore, the original question still stands, and a new one:

Is it possible to enable a disabled function with the command line tool? Or would I have to redefine the whole disable_functions directive (if possible)?

Update Two

This works for my situation:

php -d disable_functions=fn1,fn2,etc -r 'ini_set("allow_url_fopen", "1");' <file> <args>

You cannot use ini_set() to change the disable_functions directive. If there is another directive in your php.ini file that cannot be changed by ini_set() then I don't know how to solve that. My issue has been resolved, although the original question hasn't been answered yet.

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You must only define a -d OPTION block for each setting you like to define.

You need to run:

php -d allow_url_fopen=on -d rename=on <file>

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda