configuration-files

Is it mandatory to configure PHP in order to scan configuration INI files on a per-directory basis(i.e. .htaccess files in my case) by PHP?

血红的双手。 提交于 2019-12-30 07:49:31
问题 I'm using Windows 10 Home Single Language 64-bit Operating System on my machine. I've installed the latest copy of XAMPP server on my machine which ships with PHP 7.2.7 I read following pages from the PHP Manual : Scan directories .user.ini files After reading the text from these two pages one doubt came to my mind : To scan the configuration INI files on a per-directory basis( in my case '.htaccess files' ) by PHP is it mandatory to run PHP on CLI with the --with-config-file-scan-dir option

Is it mandatory to configure PHP in order to scan configuration INI files on a per-directory basis(i.e. .htaccess files in my case) by PHP?

房东的猫 提交于 2019-12-30 07:49:18
问题 I'm using Windows 10 Home Single Language 64-bit Operating System on my machine. I've installed the latest copy of XAMPP server on my machine which ships with PHP 7.2.7 I read following pages from the PHP Manual : Scan directories .user.ini files After reading the text from these two pages one doubt came to my mind : To scan the configuration INI files on a per-directory basis( in my case '.htaccess files' ) by PHP is it mandatory to run PHP on CLI with the --with-config-file-scan-dir option

When is web.config read?

非 Y 不嫁゛ 提交于 2019-12-30 05:16:26
问题 I'm doing research for an article on the ASP.NET Pipeline, but none of the resources I've covered so far adequately explain when the machine level, and application level, and possibly even sub-application level, web.config files are read. Also, most of my reading has mislead me to look for default HTTP handlers etc. in machine.config , which seems to, at some point, have been mysteriously replaced by a web.config at the machine level, i.e. in the same config framework folder as machine.config

Get connection string in class library project in a solution

淺唱寂寞╮ 提交于 2019-12-30 04:45:12
问题 In my .net 4 solution, i have two different projects- an web application project and a class library project. In web application project, database connection string is in web.config file. I would like to access that connection string from class library project. Is it possible? if yes, how? If there is any better approach to get connection string, please let me know. 回答1: To access it from your class library add a reference to System.Configuration then use System.Confinguration

How to use the global.php/local.php configs in the getConfig() of a module in a Zend Framework 2 application?

随声附和 提交于 2019-12-30 02:36:10
问题 In a ZF2 application I have some cofigs, that: 1. need to be different dependening on the environment; 2. are specific for a concrete module. I'm curently using it like here described: global.php & local.php return array( ... 'modules' => array( 'Cache' => array( 'ttl' => 1, // 1 second ) ) ... ); Module class Module { ... public function getServiceConfig() { try { return array ( 'factories' => array( 'Zend\Cache\Adapter\MemcachedOptions' => function ($serviceManager) { return new

TYPO3 ver. 6.x - additional configuration a.k.a. `localconf_local.php`

为君一笑 提交于 2019-12-29 06:12:13
问题 What we need In TYPO3 ver. 4.x we used to include additional configuration file for overwriting some settings (ie. DB credentials) by adding the include statement at the end of the localconf.php : @include_once('localconf_local.php'); Thanks to this trick it is possible for an example keep separate database settings or IM paths individual for each developer as we can just ignore our 'local' files from the git repository. What's the problem Unfortunately in TYPO3 ver. 6.x that approach

What is the best way to store configuration variables in PHP?

为君一笑 提交于 2019-12-28 05:14:24
问题 I need to store a bunch of configuration information in PHP. I have considered the following.... // Doesn't seem right. $mysqlPass = 'password'; // Seems slightly better. $config = array( 'mysql_pass' => 'password' ); // Seems dangerous having this data accessible by anything. but it can't be // changed via this method. define('MYSQL_PASSWORD', 'password'); // Don't know if this is such a good idea. class Config { const static MYSQL_PASSWORD = 'password'; } This is all I have thought of so

How to enable configSource attribute for Custom Configuration Section in .NET?

拜拜、爱过 提交于 2019-12-28 02:58:08
问题 following the wealth of information found here how can we get an external .config to work? I've tried the same setup I would use for an external appSettings file, but it is unable to find the file for my custom section. <configSections> ... <section name="CustomSettings" type="Fully.Qualified.TypeName.CustomSettings, AssemblyName" /> </configSections> <!-- this works --> <CustomSettings attrib1="val1" attrib2="val2" .../> however... <!--this does not work--> <CustomSettings configSource=

How to reference a file for variables using Bash?

岁酱吖の 提交于 2019-12-27 16:33:26
问题 I want to call a settings file for a variable, how can I do this in bash? So the settings file will define the variables (eg: CONFIG.FILE) : production="liveschool_joe" playschool="playschool_joe" And the script will use those variables in it #!/bin/bash production="/REFERENCE/TO/CONFIG.FILE" playschool="/REFERENCE/TO/CONFIG.FILE" sudo -u wwwrun svn up /srv/www/htdocs/$production sudo -u wwwrun svn up /srv/www/htdocs/$playschool How can I get bash to do something like that? Will I have to use

How to reference a file for variables using Bash?

拜拜、爱过 提交于 2019-12-27 16:33:08
问题 I want to call a settings file for a variable, how can I do this in bash? So the settings file will define the variables (eg: CONFIG.FILE) : production="liveschool_joe" playschool="playschool_joe" And the script will use those variables in it #!/bin/bash production="/REFERENCE/TO/CONFIG.FILE" playschool="/REFERENCE/TO/CONFIG.FILE" sudo -u wwwrun svn up /srv/www/htdocs/$production sudo -u wwwrun svn up /srv/www/htdocs/$playschool How can I get bash to do something like that? Will I have to use