php-ini

Overriding PHP.ini in a shared development environment

半城伤御伤魂 提交于 2019-12-31 05:08:22
问题 My development environment is shared with other developers of my startup and is setup on Rackspace. The php.ini file is located in /etc/ folder, and I believe this is a centralized location from where every other developer's dev environment setting is being configured from. I want to customize this php.ini file specifically for myself rather than having to do it in the /etc / location. Specifically I am setting up XDEBUG in my environment, some other developers don't want it, so I don't want

Overriding PHP.ini in a shared development environment

冷暖自知 提交于 2019-12-31 05:08:14
问题 My development environment is shared with other developers of my startup and is setup on Rackspace. The php.ini file is located in /etc/ folder, and I believe this is a centralized location from where every other developer's dev environment setting is being configured from. I want to customize this php.ini file specifically for myself rather than having to do it in the /etc / location. Specifically I am setting up XDEBUG in my environment, some other developers don't want it, so I don't want

PHP denying use of short hand “<?”

感情迁移 提交于 2019-12-28 06:50:14
问题 I just installed php 5.3.0 and it won't run php scripts utilizing short open tags like <?, only <?PHP. 回答1: You need to update your php.ini file. Set short_open_tag = 1 See the PHP Manual 回答2: That's because it's simply a bad practice. I suggest re-converting all your scripts to use <?php . If you're lazy, you can use a find and replace, if you have access to powerful command lines like bash you can use sed to do this for you. 回答3: http://us2.php.net/manual/en/ini.core.php you need to ini_set

php version issue in auto_prepend_file

蹲街弑〆低调 提交于 2019-12-25 05:30:56
问题 I am trying to include a class file using auto_prepend_file feature in php.ini I added below line in PHP auto_prepend_file="file.php" It is working fine from the browser but when i am running from terminal, its working fine in PHPversion 5.3.8 but not in version 5.2.4 来源: https://stackoverflow.com/questions/16013378/php-version-issue-in-auto-prepend-file

Why would auto_prepend_file works in .htaccess but not in php.ini?

血红的双手。 提交于 2019-12-25 02:38:16
问题 So I'm using PHP's auto_prepend_file to load a config file I use. I tried doing it from php.ini but the file was never loaded. After some ... hours, I used .htaccess and voila, it works! I'm using my own machine on windows 7 with wamp installed. The app is found under D:\wamp\www\myawesomeapp the global file (called config.php) is found at the root directory (I have some folders in there). auto_prepend_file = "D:\wamp\www\myawesomeapp\config.php" did not work, however, adding php_value auto

Does the term 'INI files' mean configuration files parsed after 'php.ini' or the '.user.ini-style INI files' like '.htaccess' files?

别等时光非礼了梦想. 提交于 2019-12-25 02:27:05
问题 I'm using PHP 7.2.8 . I've installed PHP using the latest version of XAMPP package which has also installed Apache/2.4.34 (Win32) I come across the following text from the PHP Manual : In addition to the main php.ini file, PHP scans for INI files in each directory, starting with the directory of the requested PHP file, and working its way up to the current document root (as set in $_SERVER['DOCUMENT_ROOT'] ). In case the PHP file is outside the document root, only its directory is scanned.

Setting timezone not applying?

依然范特西╮ 提交于 2019-12-25 02:20:49
问题 With PHP 5.4 adding warnings to alert of timezone issues, this error is quite common: Warning: strtotime(): It is not safe to rely on the system's timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in somefile

PHP disable_functions in .user.ini file gives “no value” in phpinfo() output

删除回忆录丶 提交于 2019-12-24 11:52:25
问题 I put the following code in .user.ini file under apache virtual host document root. And when I view the phpinfo() output, the disable_functions fields says "no value". Please help me to figure out why. (The "memory_limit" and "max_execution_time" are setting correctly.) Thanks in advance. memory_limit = 2048M max_execution_time = 3600 disable_functions = apache_child_terminate,apache_get_modules,apache_getenv,apache_note,apache_setenv,curl_multi_exec,define_syslog_variables,disk_free_space

How do I get Mac to install php with a php.ini file?

烈酒焚心 提交于 2019-12-24 07:07:44
问题 I'm using Mac High Sierra. I need to install php with the php.ini file installed. I ran the following command without errors: brew install php71 --build-from-source However, when I search for a configuration file, I get nothing: localhost:stratum-php-master davea$ php -i | grep "Loaded Configuration File" Loaded Configuration File => (none) How do I get Mac to recognize a php.ini file? 回答1: If you install PHP 7.1 using Homebrew, the php.ini file will be generated in /usr/local/etc/php/7.1/php

php.ini disable daylight saving

柔情痞子 提交于 2019-12-23 21:16:37
问题 Our country stopped daylight saving. Now the time is 20:16 But on PHP the time is 21:16. Is there any way to disable daylight saving? My code is: echo date('Y-m-d H:i:s'); 回答1: The 2016 change for Azerbaijan is correctly reflected in the time zone database for the Asia/Baku time zone as of release 2016c. PHP gets its time zone information from the timezonedb PECL package. The 2016c tz data, inclusive of the Azerbaijan change, is in timezonedb version 2016.3. An embedded copy of this is