php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #20267 php_ini_scanned_files documentation
Submitted: 2002-11-05 15:52 UTC Modified: 2002-11-06 21:28 UTC
From: leon at leonatkinson dot com Assigned: philip (profile)
Status: Closed Package: Documentation problem
PHP Version: 4CVS-2002-11-05 OS:
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 this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: leon at leonatkinson dot com
New email:
PHP Version: OS:

 

 [2002-11-05 15:52 UTC] leon at leonatkinson dot com
We need documentation for php_ini_scanned_files()

string php_ini_scanned_files(void)
This function returns a comma-separated list of configuration files parsed after php.ini.  These files are found in a directory defined by the --with-config-file-scan-dir option sent to configure before compilation.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-06 01:54 UTC] philip@php.net
Please confirm the following description:

<function>php_ini_scanned_files</function> returns a comma-separated list of configuration files parsed after &php.ini;.  These files are found in a directory defined by the <literel>--with-config-file-scan-dir</literal> option which is set during compilation.  

Returns a comma-separated string of .ini files on success or an empty string if either no file scan directory was set, the directory was empty, or on failure.

--
Especially the last sentence :)
 [2002-11-06 12:09 UTC] leon at leonatkinson dot com
Yes, it looks right.  The comma-separated list has linebreaks after the commas, too.

Technically, I don't think there's a failure condition for this function.  It returns FALSE if there were no additional configuration files.

BTW, your opening literal tag is mis-typed.

Thanks,
Leon
 [2002-11-06 15:20 UTC] philip@php.net
> The comma-separated list has linebreaks after the
> commas, too.

Ahh, okay.

> Technically, I don't think there's a failure condition 
> for this function.  It returns FALSE if there were no
> additional configuration files.

Under what conditions does this function return an empty string, and when is boolean false returned?

> BTW, your opening literal tag is mis-typed.

Doh!  Thank goodness for 'make test' and keen eyes such as yours :)
 [2002-11-06 20:52 UTC] philip@php.net
Okay, did some tests with the following results:

a) If --with-config-file-scan-dir was set but the directory was empty, an empty string is returned.
b) If --with-config-file-scan-dir was not set, boolean false is returned.
c) If a file in the path is unrecognizable, one will get a "PHP: Error parsing /path/somefile on line 1" during both compile time and when using this function but the file name will still exist in the returned string so the function will not return false.  This error cannot be supressed, even with error_reporting(0) or @!

Someday (c) will require a little more testing, I'll email Rasmus (the creator of this directive) for further details.

Also it's worth mentioning that the file names are full paths, so they include the directory as set by --with-config-file-scan-dir
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 22:01:30 2024 UTC