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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

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-2022 The PHP Group
All rights reserved.
Last updated: Sat May 28 17:05:46 2022 UTC