Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

216
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!