|  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.
Block user comment
Status: Assign to:
Bug Type:
From: easteregg at verfriemelt dot org
New email:
PHP Version: OS:


 [2021-07-23 06:15 UTC] easteregg at verfriemelt dot org
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


Actual result:
Interactive mode enabled

php >


Add a Patch

Pull Requests

Add a Pull Request


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

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: Wed Apr 24 19:01:31 2024 UTC