php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81281 cli.prompt ignored as argument
Submitted: 2021-07-23 06:15 UTC Modified: 2021-07-23 08:19 UTC
From: easteregg at verfriemelt dot org Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 8.0.8 OS: Debian GNU/Linux 11 (bullseye)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: easteregg at verfriemelt dot org
New email:
PHP Version: OS:

 

 [2021-07-23 06:15 UTC] easteregg at verfriemelt dot org
Description:
------------
when i pass the configuration for cli.prompt as a commandline argument, it will reset the value from the php.ini but will not use the provided one.

Test script:
---------------
echo cli.prompt=foo > test.ini
PHPRC=`pwd`/test.ini php -a -ccli.prompt=bar


Expected result:
----------------
Interactive mode enabled

bar

Actual result:
--------------
Interactive mode enabled

php >

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-07-23 08:06 UTC] patrickallaert@php.net
-Status: Open +Status: Not a bug
 [2021-07-23 08:06 UTC] patrickallaert@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

You used "-c" to set a configuration entry while "-c" is to define a *path* to a file to use as INI file.

You could for example use the following to load your "test.ini" file:
$ php -a -c test.ini

Adding a specific INI setting entry is done with "-d" and can be repeated, for example:

$ php -a -c test.ini -d cli.prompt=bar -d memory_limit=-1
 [2021-07-23 08:19 UTC] easteregg at verfriemelt dot org
oh god, sorry for wasting your time on this! i was confused about -d and -c :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Sep 08 22:01:28 2024 UTC