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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
17 + 3 = ?
Subscribe to this entry?

 
 [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-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 06:01:30 2024 UTC