100+ results for 'php ini_get'

Not the results you expected?

crontab.php (https://github.com/rynodivino/system.git) PHP · 264 lines

1 <?php

2 /**

3 * @package Habari

96

97 // allow script to run for 10 minutes. This only works on host with safe mode DISABLED

98 if ( !ini_get( 'safe_mode' ) ) {

99 set_time_limit( 600 );

100 }

APCHostMode.php (https://github.com/ChuguluGames/mediawiki-svn.git) PHP · 202 lines

1 <?php

2

3 class APCHostMode {

9 APCUtils::tableRow( $r = 1 - $r, wfMsgHtml( 'viewapc-apc-version' ), phpversion( 'apc' ) ) .

10 APCUtils::tableRow( $r = 1 - $r, wfMsgHtml( 'viewapc-php-version' ), phpversion() ) .

11

12 APCUtils::tableRow( $r = 1 - $r, wfMsgHtml( 'viewapc-shared-memory' ),

64

65 $r = 1;

66 foreach ( ini_get_all( 'apc' ) as $k => $v ) {

67 $s .= APCUtils::tableRow( $r = 1 - $r,

68 htmlspecialchars( $k ),

TagTest.php (https://gitlab.com/techniconline/kmc) PHP · 314 lines

1 <?php

2 /**

3 * phpDocumentor Var Tag Test

4 *

5 * PHP version 5.3

6 *

7 * @author Daniel O'Connor <daniel.oconnor@gmail.com>

8 * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)

9 * @license http://www.opensource.org/licenses/mit-license.php MIT

10 * @link http://phpdoc.org

11 */

12

13 namespace phpDocumentor\Reflection\DocBlock;

14

15 use phpDocumentor\Reflection\DocBlock;

file.json.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 182 lines

1 <?php

2 /**

3 * @package Joomla.Administrator

46 // Get the user

47 $user = JFactory::getUser();

48 JLog::addLogger(array('text_file' => 'upload.error.php'), JLog::ALL, array('upload'));

49

50 // Get some data from the request

54 if (

55 $_SERVER['CONTENT_LENGTH']>($params->get('upload_maxsize', 0) * 1024 * 1024) ||

56 $_SERVER['CONTENT_LENGTH']>(int)(ini_get('upload_max_filesize'))* 1024 * 1024 ||

57 $_SERVER['CONTENT_LENGTH']>(int)(ini_get('post_max_size'))* 1024 * 1024 ||

58 $_SERVER['CONTENT_LENGTH']>(int)(ini_get('memory_limit'))* 1024 * 1024

59 )

60 {

Base.php (https://github.com/merlinthemagic/MTS.git) PHP · 254 lines

1 <?php

2 // 2016 Martin Madsen

3 namespace MTS\Common\Devices\Shells;

112 if ($this->getParentShell() === null) {

113

114 //PHP does not allow us to handle exceptions during shutdown. If termination fails on the base shell

115 //it will hang around forever taking up resources on the server. The only way to avoid this is to

116 //have a kill wait around to see if terminate completes its job. if not force the process termination

120

121 if ($this->getDebug() === true) {

122 $exeTimeout = \MTS\Factories::getActions()->getLocalPhpEnvironment()->getRemainingExecutionTime();

123 if ($exeTimeout == 0) {

124 //help debug when commands fail when "max_execution_time" was not long enough.

125 $this->addDebugData("Shell terminated because 'max_execution_time' value: ".ini_get('max_execution_time').", was exceeded.");

126 }

127

jobs.php (https://gitlab.com/koodersmiikka/operaatio-terveys) PHP · 234 lines

1 <?php

2 namespace Concrete\Controller\Frontend;

3 use Controller;

13 {

14

15 if (!ini_get('safe_mode')) {

16 @set_time_limit(0);

17 }

75 public function run_single()

76 {

77 if (!ini_get('safe_mode')) {

78 @set_time_limit(0);

79 }

168 public function check_queue()

169 {

170 if (!ini_get('safe_mode')) {

171 @set_time_limit(0);

172 }

WincacheEngineTest.php (https://gitlab.com/0072016/0072016-fbphp) PHP · 281 lines

1 <?php

2 /**

3 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)

4 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)

5 *

9 *

10 * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)

11 * @link http://cakephp.org CakePHP(tm) Project

12 * @since 2.0.0

13 * @license http://www.opensource.org/licenses/mit-license.php MIT License

35 parent::setUp();

36 $this->skipIf(!function_exists('wincache_ucache_set'), 'Wincache is not installed or configured properly.');

37 $this->skipIf(!ini_get('wincache.enablecli'), 'Wincache is not enabled on the CLI.');

38 Cache::enable();

39 $this->_configCache();

file.php (https://bitbucket.org/millien/illien.ch-wordpress.git) PHP · 333 lines

1 <?php

2

3 /**

202 */

203 function w3_get_open_basedirs() {

204 $open_basedir_ini = ini_get('open_basedir');

205 $open_basedirs = (W3TC_WIN ? preg_split('~[;,]~', $open_basedir_ini) : explode(':', $open_basedir_ini));

206 $result = array();

cb.xml.simplexml.php (https://github.com/Shigaru/shigaru.git) PHP · 134 lines

1 <?php

2 /**

3 * Abstraction class for PHP SimpleXMLElement for PHP 4 and 5, including < 5.1.3

4 * @version $Id: cb.xml.simplexml.php 1183 2010-09-25 23:16:33Z beat $

14 //define('JXML_TEST_DOMIT', '');

15

16 define('CB_PHP_XML', class_exists( 'SimpleXMLElement' ) && ( version_compare( phpversion(), '5.1.3', '>=' ) ) && ( ! @ini_get( 'zend.ze1_compatibility_mode' ) ) && ! defined('CBXML_TEST_CBXML') );

17

18 if ( CB_PHP_XML ) {

83 */

84 function &getAnyChildByNameAttr( $name, $attribute, $value = null ) {

85 $children = $this->children(); // this is needed due to a bug in PHP 4.4.2 where you can have only 1 iterator per array reference, so doing second iteration on same array within first iteration kills this.

86 foreach ( $children as $child ) {

87 if ( $child->name() == $name ) {

118 return $child;

119 }

120 /* THIS MOVED ONE LEVEL DOWN TO PHP-specific implementations !!!

121 *

122 * Get an element in the document by / separated path

edit.blade.php (https://github.com/gunet/openeclass.git) PHP · 183 lines

1 <?php

2 $form_enctype = 'application/x-www-form-urlencoded';

3 if ($form_input === 'file') {

108 <option value='0'>--</option>

109 @foreach ($resultcategories as $cat)

110 <?php

111 if (isset($form_input)) {

112 $selected = '';

173 <div class='form-group'>

174 <div class='col-sm-offset-2 col-sm-10'>

175 <div class='smaller right'>{{ trans('langMaxFileSize') }} {{ ini_get('upload_max_filesize') }}</div>

176 </div>

177 </div>

file.php (https://github.com/whiletrue/fluxcms.git) PHP · 147 lines

1 <?php

2

3 class bx_helpers_file {

134 $m = finfo_file($res, $src);

135 finfo_close($res);

136 } elseif(!strpos(ini_get('disable_functions'),'exec')) {

137 exec(escapeshellcmd('file -ib '. escapeshellarg($src)), $out);

138 $m = array_shift($out);

errors.php (https://github.com/jeffmay/Bonfire.git) PHP · 288 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: errors.php 1672 2008-03-02 04:47:34Z edwardzyang $

7 */

8

9 /**

10 * @ignore - PHP5 compatibility fix.

11 */

12 if (! defined('E_STRICT')) {

17 * Includes SimpleTest files.

18 */

19 require_once dirname(__FILE__) . '/invoker.php';

20 require_once dirname(__FILE__) . '/test_case.php';

SessionSection.php (https://github.com/langpavel/nette.git) PHP · 273 lines

1 <?php

2

3 /**

210 } else {

211 $time = Nette\DateTime::from($time)->format('U');

212 $max = ini_get('session.gc_maxlifetime');

213 if ($time - time() > $max + 3) { // bulgarian constant

214 trigger_error("The expiration time is greater than the session expiration $max seconds", E_USER_NOTICE);

validation.file.php (https://github.com/dodyrw/framework.git) PHP · 330 lines

1 <?php

2

3 /**

4 * Clonefish form generator class

5 * (c) phpformclass.com, Dots Amazing

6 * All rights reserved.

7 *

8 * @copyright 2010 Dots Amazing

9 * @link http://phpformclass.com

10 * @package clonefish

11 * @subpackage validation

34

35 var $_channels = Array(); // allowed channels for a JPEG file

36 var $_types = Array(); // filetypes - PHP constants rendered by the class

37 var $_jpgchannels = Array();

38

Session.class.php (https://gitlab.com/llwhois/woaimm) PHP · 628 lines

1 <?php

2 // +----------------------------------------------------------------------

3 // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]

4 // +----------------------------------------------------------------------

5 // | Copyright (c) 2006-2012 http://thinkphp.cn All rights reserved.

6 // +----------------------------------------------------------------------

7 // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )

9 // | Author: liu21st <liu21st@gmail.com>

10 // +----------------------------------------------------------------------

11 // $Id: Session.class.php 2702 2012-02-02 12:35:01Z liu21st $

12

13 define("HTTP_SESSION_STARTED", 1);

22 * @subpackage Util

23 * @author liu21st <liu21st@gmail.com>

24 * @version $Id: Session.class.php 2702 2012-02-02 12:35:01Z liu21st $

25 +------------------------------------------------------------------------------

26 */

errors.php (https://github.com/greevex/mzz-framework-blank-application.git) PHP · 288 lines

1 <?php

2 /**

3 * base include file for SimpleTest

4 * @package SimpleTest

5 * @subpackage UnitTester

6 * @version $Id: errors.php 2460 2008-04-08 21:03:22Z mz $

7 */

8

9 /**

10 * @ignore - PHP5 compatibility fix.

11 */

12 if (! defined('E_STRICT')) {

17 * Includes SimpleTest files.

18 */

19 require_once dirname(__FILE__) . '/invoker.php';

20 require_once dirname(__FILE__) . '/test_case.php';

AbstractDumper.php (https://gitlab.com/ealexis.t/trends) PHP · 176 lines

1 <?php

2

3 /*

22 abstract class AbstractDumper implements DataDumperInterface, DumperInterface

23 {

24 public static $defaultOutput = 'php://output';

25

26 protected $line = '';

38 public function __construct($output = null, $charset = null)

39 {

40 $this->setCharset($charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8');

41 $this->decimalPoint = (string) 0.5;

42 $this->decimalPoint = $this->decimalPoint[1];

timezone.php (https://gitlab.com/phamngsinh/baitaplon_sinhvien) PHP · 132 lines

1 <?php

2 /**

3 * @Project NUKEVIET 3.0

83 {

84 ini_set( 'date.timezone', $global_config['site_timezone'] );

85 if ( strcasecmp( ini_get( 'date.timezone' ), $global_config['site_timezone'] ) == 0 )

86 {

87 define( 'NV_SITE_TIMEZONE_GMT_NAME', preg_replace( "/^([\+|\-]{1}\d{2})(\d{2})$/", "$1:$2", date( "O" ) ) );

requirements.php (https://gitlab.com/deadgood/sportas) PHP · 137 lines

4 *

5 * In order to run this script use the following console command:

6 * php requirements.php

7 *

8 * In order to run this script from the web, you should copy it to the web root.

9 * If you are using Linux you can create a hard link instead, using the following command:

10 * ln requirements.php ../requirements.php

11 */

12

103 // PHP ini :

104 'phpExposePhp' => array(

105 'name' => 'Expose PHP',

107 'condition' => $requirementsChecker->checkPhpIniOff("expose_php"),

108 'by' => 'Security reasons',

109 'memo' => '"expose_php" should be disabled at php.ini',

110 ),

111 'phpAllowUrlInclude' => array(

Sql.php (https://github.com/sgtcarneiro/horde.git) PHP · 208 lines

1 <?php

2 /**

3 * SessionHandler storage implementation for SQL databases.

197 ' WHERE session_lastmodified >= ?',

198 $this->_params['table']);

199 $values = array(time() - ini_get('session.gc_maxlifetime'));

200

201 /* Execute the query. */

MemcacheSessionHandler.php (https://github.com/theosp/google_appengine.git) PHP · 181 lines

1 <?php

2 /**

3 * Copyright 2007 Google Inc.

19 *

20 * Nb. Does not yet implement session locking, as not available until

21 * MemcacheD is available for PHP runtime.

22 *

23 */

100

101 // Get session max lifetime to leverage Memcache expire functionality.

102 $this->expire = ini_get("session.gc_maxlifetime");

103 }

104

certify_certificate.php (https://github.com/atutor/certify.git) PHP · 166 lines

32 return $ret;

33 }

34 $max_upload_size = min(let_to_num(ini_get('post_max_size')), let_to_num(ini_get('upload_max_filesize')));

35

36 $certify_title = '';

144

145

146 <form enctype="multipart/form-data" name="certifydetails" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">

147 <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $max_upload_size; ?>"> <!-- We have no real need to restrict the upload here -->

148 <?php if (strlen($certify_id) > 0) { ?>

149 <input type="hidden" name="certify_id" value="<?php echo $certify_id; ?>">

164

165

166 <?php require (AT_INCLUDE_PATH.'footer.inc.php'); ?>

tiny_mce_gzip.php (https://bitbucket.org/stager94/skmz-joomla.git) PHP · 183 lines

1 <?php

2 /**

3 * $Id: tiny_mce_gzip.php 315 2007-10-25 14:03:43Z spocke $

71 $encodings = explode(',', strtolower(preg_replace("/\s+/", "", $_SERVER['HTTP_ACCEPT_ENCODING'])));

72

73 if ((in_array('gzip', $encodings) || in_array('x-gzip', $encodings) || isset($_SERVER['---------------'])) && function_exists('ob_gzhandler') && !ini_get('zlib.output_compression')) {

74 $enc = in_array('x-gzip', $encodings) ? "x-gzip" : "gzip";

75 $supportsGzip = true;

index.php (https://github.com/daemongh/Bonfire.git) PHP · 217 lines

1 <?php

2

3

35 case 'development':

36 error_reporting(E_ALL);

37 if (!ini_get('display_errors'))

38 {

39 ini_set('display_errors', 1);

58 |

59 */

60 // PHP 5.3 requires this

61 if(ini_get('date.timezone') == '')

97 * --------------------------------------------------------------------

98 *

99 * Normally you will set your default controller in the routes.php file.

100 * You can, however, force a custom routing by hard-coding a

101 * specific controller class/function here. For most applications, you

Console.php (https://github.com/catx23/xapp-php.git) PHP · 313 lines

23 /**

24 * property that contains instance of third party console class instance

25 * like "firephp" or "chromephp" since this class acts only as a wrapper

26 * for these console implementations

27 *

28 * @var ChromePhp|FirePHP|null

29 */

30 public $console = null;

83 case 'firephp':

84 xapp_import('firephp.firephp-core.*');

85 if(sizeof(ob_list_handlers()) === 0)

86 {

209 * shortcut function to dump all current ini values to console with optional option

210 * to only send values for a certain extension in first parameter $message according

211 * to phps ini_get_all sections see php help page.

212 *

213 * @error 10907

memory.php (https://github.com/orchestra-io/sample-openx.git) PHP · 128 lines

62 $phpMemoryLimit = ini_get('memory_limit');

63 if (empty($phpMemoryLimit) || $phpMemoryLimit == -1) {

64 // No memory limit

65 return -1;

70 'K' => 1024

71 );

72 $phpMemoryLimitInBytes = $phpMemoryLimit;

73 foreach($aSize as $type => $multiplier) {

74 $pos = strpos($phpMemoryLimit, $type);

77 }

78 if ($pos) {

79 $phpMemoryLimitInBytes = substr($phpMemoryLimit, 0, $pos) * $multiplier;

80 }

81 }

98 $newPhpMemoryLimitInBytes = OX_getMemoryLimitSizeInBytes();

99 $memoryCanBeSet = ($phpMemoryLimitInBytes != $newPhpMemoryLimitInBytes);

100

101 // Restore previous limit

class-ai1wm-import-controller.php (https://gitlab.com/vanafroo/landingpage) PHP · 125 lines

1 <?php

2 /**

3 * Copyright (C) 2014-2016 ServMask Inc.

94 // Do request

95 if ( $completed === false || ( $next = next( $filters ) ) && ( $params['priority'] = key( $filters ) ) ) {

96 return Ai1wm_Http::get( admin_url( 'admin-ajax.php?action=ai1wm_import' ), $params );

97 }

98 }

118 public static function max_chunk_size() {

119 return min(

120 ai1wm_parse_size( ini_get( 'post_max_size' ), AI1WM_MAX_CHUNK_SIZE ),

121 ai1wm_parse_size( ini_get( 'upload_max_filesize' ), AI1WM_MAX_CHUNK_SIZE ),

spipmotion_verifier_binaires.php (https://bitbucket.org/pombredanne/spip-zone-treemap.git) PHP · 217 lines

1 <?php

2 /**

3 * SPIPmotion

14 /**

15 * Fonction de vérification que les binaires utilisés soient correctement installés

16 * et exécutables ainsi que quelques éléments de configuration de PHP :

17 *

18 * -* l'état du safe_mode;

26 * -* le script spipmotion_vignette.sh;

27 * -* mediainfo;

28 * -* la class ffmpeg-php (facultatif);

29 *

30 * Si le safe_mode est activé, on l'inscrit dans les metas ainsi que son exec_dir

46 * On vérifie que safe_mode soit activé ou pas

47 */

48 $safe_mode = @ini_get('safe_mode');

49 if($safe_mode == 1){

50 ecrire_meta('spipmotion_safe_mode', 'oui','','spipmotion_metas');

display.php (https://github.com/nysenate/Bluebird-CRM.git) PHP · 181 lines

1 <?php

2 /**

3 * $Header$

9 /**

10 * The Log_display class is a concrete implementation of the Log::

11 * abstract class which writes message into browser in usual PHP maner.

12 * This may be useful because when you use PEAR::setErrorHandling in

13 * PEAR_ERROR_CALLBACK mode error messages are not displayed by

14 * PHP error handler.

15 *

16 * @author Paul Yanchenko <pusher@inaco.ru>

18 * @package Log

19 *

20 * @example display.php Using the display handler.

21 */

22 class Log_display extends Log

file.php (https://github.com/pratikdhaboo/kodelearn.git) PHP · 243 lines

1 <?php defined('SYSPATH') or die('No direct script access.');

2 /**

3 * File helper class.

13 /**

14 * Attempt to get the mime type from a file. This method is horribly

15 * unreliable, due to PHP being horribly unreliable when it comes to

16 * determining the mime type of a file.

17 *

47 }

48

49 if (ini_get('mime_magic.magicfile') AND function_exists('mime_content_type'))

50 {

51 // The mime_content_type function is only useful with a magic file

67 * $mime = File::mime_by_ext('png'); // "image/png"

68 *

69 * @param string extension: php, pdf, txt, etc

70 * @return string mime type on success

71 * @return FALSE on failure

Item.php (https://github.com/zanby/Core.git) PHP · 163 lines

1 <?php

2 /**

3 * Zanby Enterprise Group Family System

145 if (preg_match('/^([0-9]+)([a-zA-Z]*)$/', ini_get('upload_max_filesize'), $matches)) {

146 // see http://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes

147 switch (strtoupper($matches['2'])) {

148 case 'G':

sessions.php (https://github.com/taoistmath/demo_app.git) PHP · 194 lines

1 <?php

2 /*

3 $Id$

11 */

12

13 if ( (PHP_VERSION >= 4.3) && ((bool)ini_get('register_globals') == false) ) {

14 @ini_set('session.bug_compat_42', 1);

15 @ini_set('session.bug_compat_warn', 0);

102

103 if ($session_started == true) {

104 if (PHP_VERSION < 4.3) {

105 return session_register($variable);

106 } else {

117

118 function tep_session_is_registered($variable) {

119 if (PHP_VERSION < 4.3) {

120 return session_is_registered($variable);

121 } else {

AbstractSessionHandler.php (https://gitlab.com/jjpa2018/dashboard) PHP · 155 lines

1 <?php

2

3 /*

36 {

37 $this->sessionName = $sessionName;

38 if (!headers_sent() && !ini_get('session.cache_limiter') && '0' !== ini_get('session.cache_limiter')) {

39 header(sprintf('Cache-Control: max-age=%d, private, must-revalidate', 60 * (int) ini_get('session.cache_expire')));

67 $this->prefetchId = $sessionId;

68

69 if (\PHP_VERSION_ID < 70317 || (70400 <= \PHP_VERSION_ID && \PHP_VERSION_ID < 70405)) {

70 // work around https://bugs.php.net/79413

143 if (\PHP_VERSION_ID < 70300) {

144 setcookie($this->sessionName, '', 0, ini_get('session.cookie_path'), ini_get('session.cookie_domain'), filter_var(ini_get('session.cookie_secure'), \FILTER_VALIDATE_BOOLEAN), filter_var(ini_get('session.cookie_httponly'), \FILTER_VALIDATE_BOOLEAN));

145 } else {

146 $params = session_get_cookie_params();

smarty_internal_resource_php.php (https://gitlab.com/fiesta-framework/Documentation) PHP · 119 lines

1 <?php

2

3 /**

4 * Smarty Internal Plugin Resource PHP

5 * Implements the file system as resource for PHP templates

10 * @author Rodney Rehm

11 */

12 class Smarty_Internal_Resource_PHP extends Smarty_Resource_Uncompiled

13 {

14 /**

15 * container for short_open_tag directive's value before executing PHP templates

16 *

17 * @var string

php_ini.h (https://gitlab.com/Blueprint-Marketing/hhvm) C Header · 90 lines

35 PHPAPI int php_parse_user_ini_file(const char *dirname, char *ini_filename, HashTable *target_hash TSRMLS_DC);

36 PHPAPI void php_ini_activate_config(HashTable *source_hash, int modify_type, int stage TSRMLS_DC);

37 PHPAPI int php_ini_has_per_dir_config(void);

38 PHPAPI int php_ini_has_per_host_config(void);

39 PHPAPI void php_ini_activate_per_dir_config(char *path, uint path_len TSRMLS_DC);

40 PHPAPI void php_ini_activate_per_host_config(const char *host, uint host_len TSRMLS_DC);

41 PHPAPI HashTable* php_ini_get_configuration_hash(void);

42 END_EXTERN_C()

43

50 #define php_ini_entry zend_ini_entry

51

52 #define PHP_INI_MH ZEND_INI_MH

53 #define PHP_INI_DISP ZEND_INI_DISP

56 #define PHP_INI_END ZEND_INI_END

57

58 #define PHP_INI_ENTRY3_EX ZEND_INI_ENTRY3_EX

59 #define PHP_INI_ENTRY3 ZEND_INI_ENTRY3

response.php (https://bitbucket.org/asosso/joomla31.git) PHP · 340 lines

1 <?php

2 /**

3 * @package Joomla.Platform

227

228 // Don't compress something if the server is going to do it anyway. Waste of time.

229 if ($compress && !ini_get('zlib.output_compression') && ini_get('output_handler') != 'ob_gzhandler')

230 {

231 $data = self::compress($data);

267 }

268

269 if (!extension_loaded('zlib') || ini_get('zlib.output_compression'))

270 {

271 return $data;

SMTP.php (https://gitlab.com/nacridan/Nacridan) PHP · 254 lines

1 <?php

2

3 /**

4 * This is the SMTP handler for Swift Mailer, a PHP Mailer class.

5 *

6 * @package Swift

133 {

134 if ($server == SWIFT_AUTO_DETECT)

135 $server = @ini_get('SMTP');

136 if ($port == SWIFT_AUTO_DETECT)

137 $port = @ini_get('smtp_port');

acheckermailer.class.php (https://github.com/cindyli/AChecker.git) PHP · 141 lines

1 <?php

2 /************************************************************************/

3 /* AChecker */

14 if (!defined('AC_INCLUDE_PATH')) { exit; }

15

16 require(dirname(__FILE__) . '/class.phpmailer.php');

17

18 /**

19 * ACheckerMailer is modified from ATutorMailer

20 *

21 * ACheckerMailer extends PHPMailer and sets all the default values

22 * that are common for AChecker.

23 * @access public

24 * @see include/classes/phpmailer/class.phpmailer.php

25 * @since AChecker 0.2

26 * @author Cindy Li

Response.php (https://gitlab.com/x33n/grav) PHP · 219 lines

1 <?php

2 namespace Grav\Common\GPM;

3

131

132 /**

133 * Checks if the remote fopen request is enabled in PHP

134 * @return boolean

135 */

136 public static function isFopenAvailable()

137 {

138 return preg_match('/1|yes|on|true/i', ini_get('allow_url_fopen'));

139 }

140

mo.php (https://gitlab.com/Blueprint-Marketing/wordpress-unit-tests) PHP · 143 lines

1 <?php

2

3 class Tests_POMO_MO extends WP_UnitTestCase {

130 // skipIf() method skips the whole test case, not only this method

131 // that's why we are skipping it the stupid way

132 if ((ini_get("mbstring.func_overload") & 2) != 0) {

133 $mo = new MO();

134 $mo->import_from_file(DIR_TESTDATA . '/pomo/overload.mo');

MailSend.php (https://github.com/yvestan/sendnews.git) PHP · 170 lines

1 <?php

2

3 /**

9 */

10

11 require_once dirname(__FILE__) . "/../ClassLoader.php";

12 Swift_ClassLoader::load("Swift_Events_SendListener");

13 Swift_ClassLoader::load("Swift_Events_BeforeSendListener");

49 {

50 $this->setAdditionalParams($params);

51 $this->setOS(PHP_OS);

52 }

53 /**

153 public function doMail($to, $subject, $message, $headers, $params)

154 {

155 $original_from = @ini_get("sendmail_from");

156 @ini_set("sendmail_from", $this->returnPath);

157

Client.php (https://github.com/jyxo/php.git) PHP · 271 lines

1 <?php declare(strict_types = 1);

2

3 /**

4 * Jyxo PHP Library

5 *

6 * LICENSE

9 * with this package in the file license.txt.

10 * It is also available through the world-wide-web at this URL:

11 * https://github.com/jyxo/php/blob/master/license.txt

12 */

13

20 use function explode;

21 use function fclose;

22 use function ini_get;

23 use function is_resource;

24 use function preg_replace;

Parser.php (https://github.com/webkulture/net.webkulture.www.git) PHP · 173 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: Parser.php 9722 2008-06-18 12:36:35Z alexander $

20 */

21

22 require_once 'Zend/Soap/Wsdl/Parser/Result.php';

23

24 /**

46 $wsdl = file_get_contents($wsdl);

47 } else {

48 $tmp = new tempnam(ini_get('upload_tmp_dir'), 'ZF_Temp_');

49 file_put_contents($tmp, $wsdl);

50 $wsdl_result = new Zend_Soap_Wsdl_Parser_Result($tmp);

ExceptionHandler.php (https://github.com/fastslack/joomla-cms.git) PHP · 171 lines

1 <?php

2 /**

3 * Joomla! Content Management System

21 * Render the error page based on an exception.

22 *

23 * @param \Exception|\Throwable $error An Exception or Throwable (PHP 7+) object for which to render the error page.

24 *

25 * @return void

29 public static function render($error)

30 {

31 $expectedClass = PHP_MAJOR_VERSION >= 7 ? '\Throwable' : '\Exception';

32 $isException = $error instanceof $expectedClass;

33

34 // In PHP 5, the $error object should be an instance of \Exception; PHP 7 should be a Throwable implementation

35 if ($isException)

36 {

MongoDBTest.php (https://github.com/adamlundrigan/zf2.git) PHP · 156 lines

1 <?php

2 /**

3 * Zend Framework (http://framework.zend.com/)

17 * @group Zend_Session

18 */

19 class MongoDBTest extends \PHPUnit_Framework_TestCase

20 {

21 /**

52 ));

53

54 $mongoClass = (version_compare(phpversion('mongo'), '1.3.0', '<')) ? '\Mongo' : '\MongoClient';

55

56 $this->mongo = new $mongoClass();

93 * that to simulate natural session expiration.

94 */

95 $oldMaxlifetime = ini_get('session.gc_maxlifetime');

96 ini_set('session.gc_maxlifetime', 0);

97

functions_image.php (https://gitlab.com/mybbpl/ppm-1.6) PHP · 257 lines

1 <?php

2 /**

3 * MyBB 1.6

170 }

171

172 $memory_limit = @ini_get("memory_limit");

173 if(!$memory_limit || $memory_limit == -1)

174 {

Parser.php (https://github.com/lanmediaservice/lms-tplib.git) PHP · 173 lines

1 <?php

2 /**

3 * Zend Framework

17 * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)

18 * @license http://framework.zend.com/license/new-bsd New BSD License

19 * @version $Id: Parser.php 12080 2008-10-22 16:40:33Z beberlei $

20 */

21

22 /*** //*** require_once 'Zend/Soap/Wsdl/Parser/Result.php'; ***/

23

24 /**

46 $wsdl = file_get_contents($wsdl);

47 } else {

48 $tmp = tempnam(ini_get('upload_tmp_dir'), 'ZF_Temp_');

49 file_put_contents($tmp, $wsdl);

50 $wsdl_result = new Zend_Soap_Wsdl_Parser_Result($tmp);

GlobalState.php (https://gitlab.com/nmhieucoder/laravel_tintuc) PHP · 195 lines

1 <?php declare(strict_types=1);

2 /*

3 * This file is part of PHPUnit.

4 *

5 * (c) Sebastian Bergmann <sebastian@phpunit.de>

6 *

7 * For the full copyright and license information, please view the LICENSE

8 * file that was distributed with this source code.

9 */

10 namespace PHPUnit\Util;

11

12 use function array_keys;

16 use function get_included_files;

17 use function in_array;

18 use function ini_get_all;

19 use function is_array;

20 use function is_file;

Settings.php (https://github.com/friendica/friendica.git) PHP · 96 lines

1 <?php

2 /**

3 * @copyright Copyright (C) 2010-2022, the Friendica project

70 if (ini_get('log_errors')) {

71 $phplogenabled = DI::l10n()->t('PHP log currently enabled.');

72 } else {

73 $phplogenabled = DI::l10n()->t('PHP log currently disabled.');

90 '$phpheader' => DI::l10n()->t("PHP logging"),

91 '$phphint' => DI::l10n()->t("To temporarily enable logging of PHP errors and warnings you can prepend the following to the index.php file of your installation. The filename set in the 'error_log' line is relative to the friendica top-level directory and must be writeable by the web server. The option '1' for 'log_errors' and 'display_errors' is to enable these options, set to '0' to disable them."),

92 '$phplogcode' => "error_reporting(E_ERROR | E_WARNING | E_PARSE);\nini_set('error_log','php.out');\nini_set('log_errors','1');\nini_set('display_errors', '1');",

93 '$phplogenabled' => $phplogenabled,

94 ]);

95 }

timer.php (https://bitbucket.org/dreamriks/gift.git) PHP · 190 lines

44 $php_max_exec_time = @ini_get("maximum_execution_time");

45 if ( (!is_numeric($php_max_exec_time)) || ($php_max_exec_time == 0) ) {

46 // If we have no time limit, set a hard limit of about 10 seconds

47 // (safe for Apache and IIS timeouts, verbose enough for users)

125 $php_max_exec = 10;

126 }

127 if ( ($php_max_exec == "") || ($php_max_exec == 0) ) {

128 $php_max_exec = 10;

131 // the application, as well as another 500msec added for rounding

132 // error purposes. Also make sure this is never gonna be less than 0.

133 $php_max_exec = max($php_max_exec * 1000 - 1000, 0);

134

135 // Get the "minimum execution time per step" Akeeba Backup configuration variable

140 // Make sure we are not over PHP's time limit!

141 if($minexectime > $php_max_exec) $minexectime = $php_max_exec;

142

143 // Get current running time

debug.php (https://github.com/elkuku/EasyCreator.git) PHP · 138 lines

1 <?php defined('_JEXEC') || die('=;)');

2 /**

3 * @package EasyCreator

5 * @author Nikolai Plath (elkuku)

6 * @author Created on 16-May-2012

7 * @license GNU/GPL, see JROOT/LICENSE.php

8 */

9

69 $traces['Exception trace'] = $trace;

70

71 $linkFormat = ini_get('xdebug.file_link_format');

72

73 foreach($traces as $traceType => $trace)

soap.php (https://github.com/eeggenberger/ezpublish.git) PHP · 123 lines

1 <?php

2 /**

3 * @copyright Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.

18

19 // Set a default time zone if none is given. The time zone can be overriden

20 // in config.php or php.ini.

21 if ( !ini_get( "date.timezone" ) )

24 }

25

26 require 'autoload.php';

27

28 /*!

41

42 // Initialize/set the index file.

43 eZSys::init( 'soap.php', $ini->variable( 'SiteAccessSettings', 'ForceVirtualHost' ) === 'true' );

44 $uri = eZURI::instance( eZSys::requestURI() );

45 $GLOBALS['eZRequestedURI'] = $uri;

postie_test.php (https://bitbucket.org/rchlmrtn/chiari.git) PHP · 107 lines

3 require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . "postie-functions.php");

4 include_once (dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . "wp-config.php");

5 require_once("postie-functions.php");

8 extract($config);

9 $title = __("Postie Diagnosis");

10 $parent_file = 'options-general.php?page=postie/postie.php';

11 get_currentuserinfo();

12

16 exit();

17 }

18 DebugEcho("Error log: " . ini_get('error_log'));

19 $images = array("Test.png", "Test.jpg", "Test.gif");

20 ?>

21 <div class="wrap">

22 <h1>Postie Configuration Test</h1>

23 <?php

24 if (isMarkdownInstalled()) {

25 ?>

3.php (https://bitbucket.org/anneivycat/ebcookhouse.git) PHP · 114 lines

1 <?php

2 if ( ! defined( 'PB_IMPORTBUDDY' ) || ( true !== PB_IMPORTBUDDY ) ) {

3 die( '<html></html>' );

58 }

59

60 $old_connect_timeout = @ini_get( 'mysql.connect_timeout' );

61 $old_socket_timeout = @ini_get( 'default_socket_timeout' );

AbstractRedisSessionHandlerTestCase.php (https://github.com/pulzarraider/symfony.git) PHP · 145 lines

1 <?php

2

3 /*

12 namespace Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler;

13

14 use PHPUnit\Framework\TestCase;

15 use Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler;

16

95 $ttl = $this->redisClient->ttl(self::PREFIX.'id');

96

97 $this->assertLessThanOrEqual(ini_get('session.gc_maxlifetime'), $ttl);

98 $this->assertGreaterThanOrEqual(0, $ttl);

99 }

test_Minify.php (https://gitlab.com/flyhope/Hiblog) PHP · 245 lines

1 <?php

2

3 // currently these only test serve() when passed the 'quiet' options

4

5 require_once '_inc.php';

6

7 function test_Minify()

187

188 // Test Issue 132

189 if (function_exists('mb_strlen') && ((int)ini_get('mbstring.func_overload') & 2)) {

190 $output = $minify->serve($controller, array(

191 'files' => array(__DIR__ . '/_test_files/js/issue132.js')

compress_api.php (https://github.com/osarrat/sigmah-website.git) PHP · 138 lines

1 <?php

2 # MantisBT - a php based bugtracking system

18 * Compression API

19 *

20 * This API handles the ob_gzhandler in php.

21 *

22 * @package CoreAPI

65 // Since php 5.2.10, it's possible to set zlib.output_compression via ini_set.

66 // This method is preferred over ob_gzhandler

67 if( php_version_at_least( '5.2.10' ) && ini_get( 'output_handler' ) == '' && function_exists( 'ini_set' ) ) {

68 ini_set( 'zlib.output_compression', true );

69 // do it transparently

73 if ( OFF == $g_use_iis ) {

74 // disable compression when using IIS because of issue #2953.

75 // For windows compression, use zlib.output_compression in php.ini or a later version of php

76 return false;

77 }

timer.php (https://github.com/CCI-Studios/Wee-Magazine.git) PHP · 194 lines

60

61 // Apply bias

62 $php_max_exec_time = $php_max_exec_time * $bias;

63 $config_max_exec_time = $config_max_exec_time * $bias;

64

123 if(@function_exists('ini_get'))

124 {

125 $php_max_exec = @ini_get("maximum_execution_time");

126 }

127 else

135 // the application, as well as another 500msec added for rounding

136 // error purposes. Also make sure this is never gonna be less than 0.

137 $php_max_exec = max($php_max_exec * 1000 - 1000, 0);

138

139 // Get the "minimum execution time per step" Akeeba Backup configuration variable

144 // Make sure we are not over PHP's time limit!

145 if($minexectime > $php_max_exec) $minexectime = $php_max_exec;

146

147 // Get current running time

Filesystem.php (https://github.com/Exercise/zf2.git) PHP · 222 lines

1 <?php

2 /**

3 * Zend Framework

54 public function __construct($filename, $mode='r+b')

55 {

56 global $php_errormsg;

57

58 if (strpos($mode, 'w') === false && !is_readable($filename)) {

61 }

62

63 $trackErrors = ini_get('track_errors');

64 ini_set('track_errors', '1');

65

68 if ($this->_fileHandle === false) {

69 ini_set('track_errors', $trackErrors);

70 throw new Lucene\Exception($php_errormsg);

71 }

72

soap.php (https://github.com/Yannix/ezpublish.git) PHP · 123 lines

1 <?php

2 /**

3 * @copyright Copyright (C) 1999-2012 eZ Systems AS. All rights reserved.

18

19 // Set a default time zone if none is given. The time zone can be overriden

20 // in config.php or php.ini.

21 if ( !ini_get( "date.timezone" ) )

24 }

25

26 require 'autoload.php';

27

28 /*!

41

42 // Initialize/set the index file.

43 eZSys::init( 'soap.php', $ini->variable( 'SiteAccessSettings', 'ForceVirtualHost' ) === 'true' );

44 $uri = eZURI::instance( eZSys::requestURI() );

45 $GLOBALS['eZRequestedURI'] = $uri;

shared.php (https://github.com/rjdjohnston/core.git) PHP · 220 lines

1 <?php

2

3 class Check {

26 public static function warn ( $string ) { self::show_check_div( $string, 'warn' ); }

27

28 // Check the level of php available

29 public static function PHP ( $required ) {

30 if( 1 == version_compare( $required, phpversion() ) )

31 Check::bad( "Your PHP version is too low, the minimum required is $required." );

32 else

33 Check::good( "PHP Version " . phpversion() . " meets requirement." );

34 }

35

FlashMessengerTest.php (https://github.com/Exercise/zf2.git) PHP · 121 lines

1 <?php

2 /**

3 * Zend Framework

37 * @group Zend_Controller_Action_Helper

38 */

39 class FlashMessengerTest extends \PHPUnit_Framework_TestCase

40 {

41 /**

66 public function setUp()

67 {

68 $savePath = ini_get('session.save_path');

69 if (strpos($savePath, ';')) {

70 $savePath = explode(';', $savePath);

SessionConfiguration.php (https://github.com/Exercise/zf2.git) PHP · 281 lines

1 <?php

2 /**

3 * Zend Framework

40 {

41 /**

42 * Used with {@link _handleError()}; stores PHP error code

43 * @var int

44 */

45 protected $_phpErrorCode = false;

46

47 /**

230 if (empty($this->_validHashFunctions)) {

231 /**

232 * @see http://php.net/manual/en/session.configuration.php#ini.session.hash-function

233 * "0" and "1" refer to MD5-128 and SHA1-160, respectively, and are

234 * valid in addition to whatever is reported by hash_algos()

warnings.php (https://github.com/gpongelli/joomla-cms.git) PHP · 117 lines

1 <?php

2 /**

3 * @package Joomla.Administrator

39 $last = strtolower($val{strlen($val) - 1});

40 switch($last) {

41 // The 'G' modifier is available since PHP 5.1.0

42 case 'g':

43 $val *= 1024;

71 $upload_dir = ini_get('upload_tmp_dir');

72 if (!$upload_dir) {

73 $messages[] = array('message' => JText::_('COM_INSTALLER_MSG_WARNINGS_PHPUPLOADNOTSET'), 'description' => JText::_('COM_INSTALLER_MSG_WARNINGS_PHPUPLOADNOTSETDESC'));

74 } else {

75 if (!is_writeable($upload_dir)) {

76 $messages[] = array('message' => JText::_('COM_INSTALLER_MSG_WARNINGS_PHPUPLOADNOTWRITEABLE'), 'description' => JText::sprintf('COM_INSTALLER_MSG_WARNINGS_PHPUPLOADNOTWRITEABLEDESC', $upload_dir));

77 }

78 }

TagTest.php (https://gitlab.com/ealexis.t/trends) PHP · 313 lines

1 <?php

2 /**

3 * phpDocumentor Var Tag Test

4 *

5 * PHP version 5.3

6 *

7 * @author Daniel O'Connor <daniel.oconnor@gmail.com>

8 * @copyright 2010-2011 Mike van Riel / Naenius. (http://www.naenius.com)

9 * @license http://www.opensource.org/licenses/mit-license.php MIT

10 * @link http://phpdoc.org

11 */

12

13 namespace phpDocumentor\Reflection\DocBlock;

14

15 use phpDocumentor\Reflection\DocBlock;

PriceTest.php (https://github.com/strangerstudios/paid-memberships-pro.git) PHP · 153 lines

1 <?php

2

3 namespace PMPro\Tests\Functions;

4

5 use PHP_CodeSniffer\Generators\HTML;

6 use PMPro\Test_Support\TestCases\TestCase;

7

20 parent::setUp();

21

22 $this->original_precision = ini_get( 'precision' );

23 $this->original_serialize_precision = ini_get( 'serialize_precision' );

factory.php (https://gitlab.com/ricardosanchez/prueba) PHP · 142 lines

1 <?php

2 /**

3 * @package Joomla.Platform

43 {

44 // If allow_url_fopen is enabled

45 if (ini_get('allow_url_fopen'))

46 {

47 // This is an error

shared.php (https://gitlab.com/klausmig/CloudSemanticWeb) PHP · 111 lines

1 <?php

2

3 require_once(ROOT . DS . 'application' . DS . 'library' . DS . 'controller.class.php');

4 require_once(ROOT . DS . 'application' . DS . 'library' . DS . 'SQLQuery.class.php');

5 require_once(ROOT . DS . 'application' . DS . 'library' . DS . 'model.class.php');

6

7 require_once(ROOT . DS . 'application' . DS . 'models' . DS . 'User.php');

8 require_once(ROOT . DS . 'application' . DS . 'models' . DS . 'Slide.php');

9 require_once(ROOT . DS . 'application' . DS . 'models' . DS . 'DeckList.php');

10 require_once(ROOT . DS . 'application' . DS . 'models' . DS . 'Deck.php');

11 require_once(ROOT . DS . 'application' . DS . 'models' . DS . 'Stream.php');

12 require_once(ROOT . DS . 'application' . DS . 'models' . DS . 'Statistics.php');

LoggerAppenderMailEvent.php (https://bitbucket.org/thomashii/vtigercrm-6-for-postgresql.git) PHP · 170 lines

1 <?php

2 /**

3 * log4php is a PHP port of the log4j java logging package.

4 *

5 * <p>This framework is based on log4j (see {@link http://jakarta.apache.org/log4j log4j} for details).</p>

8 * {@link http://jakarta.apache.org/log4j/docs/contributors.html contributors}).</p>

9 *

10 * <p>PHP port, extensions and modifications by VxR. All rights reserved.<br>

11 * For more information, please see {@link http://www.vxr.it/log4php/}.</p>

21 * @ignore

22 */

23 if (!defined('LOG4PHP_DIR')) define('LOG4PHP_DIR', dirname(__FILE__) . '/..');

24

25 /**

26 */

27 require_once(LOG4PHP_DIR . '/LoggerAppenderSkeleton.php');

28 require_once(LOG4PHP_DIR . '/LoggerLog.php');

file.php (https://github.com/o1iver/Code-Backup.git) PHP · 243 lines

1 <?php defined('SYSPATH') or die('No direct access allowed.');

2 /**

3 * File helper class.

13 /**

14 * Attempt to get the mime type from a file. This method is horribly

15 * unreliable, due to PHP being horribly unreliable when it comes to

16 * determining the mime type of a file.

17 *

47 }

48

49 if (ini_get('mime_magic.magicfile') AND function_exists('mime_content_type'))

50 {

51 // The mime_content_type function is only useful with a magic file

67 * $mime = File::mime_by_ext('png'); // "image/png"

68 *

69 * @param string extension: php, pdf, txt, etc

70 * @return string mime type on success

71 * @return FALSE on failure

Tokenizer.php (https://github.com/pauln/moodle.git) PHP · 322 lines

1 <?php

2

3 /*

4 * This file is part of Mustache.php.

5 *

6 * (c) 2010-2015 Justin Hileman

93 // Let's do everyone a favor and scan this string as ASCII instead.

94 $encoding = null;

95 if (function_exists('mb_internal_encoding') && ini_get('mbstring.func_overload') & 2) {

96 $encoding = mb_internal_encoding();

97 mb_internal_encoding('ASCII');

php_ini.h (https://github.com/gmphp/PHP.git) C Header · 90 lines

35 PHPAPI int php_parse_user_ini_file(const char *dirname, char *ini_filename, HashTable *target_hash TSRMLS_DC);

36 PHPAPI void php_ini_activate_config(HashTable *source_hash, int modify_type, int stage TSRMLS_DC);

37 PHPAPI int php_ini_has_per_dir_config(void);

38 PHPAPI int php_ini_has_per_host_config(void);

39 PHPAPI void php_ini_activate_per_dir_config(char *path, uint path_len TSRMLS_DC);

40 PHPAPI void php_ini_activate_per_host_config(const char *host, uint host_len TSRMLS_DC);

41 PHPAPI HashTable* php_ini_get_configuration_hash(void);

42 END_EXTERN_C()

43

48 #define PHP_INI_ALL ZEND_INI_ALL

49

50 #define php_ini_entry zend_ini_entry

51

52 #define PHP_INI_MH ZEND_INI_MH

Redis.php (https://github.com/nbari/DALMP.git) PHP · 211 lines

1 <?php

2 namespace DALMP\Sessions;

3

122 {

123 $ref = (isset($GLOBALS[$this->dalmp_sessions_ref]) && !empty($GLOBALS[$this->dalmp_sessions_ref])) ? $GLOBALS[$this->dalmp_sessions_ref] : null;

124 $timeout = ini_get('session.gc_maxlifetime');

125 $expiry = time() + $timeout;

126

FileTest.php (https://github.com/leerbag/zf2.git) PHP · 178 lines

1 <?php

2 /**

3 * Zend Framework

26 Zend\Form\Element\File as FileElement,

27 Zend\Form\Element,

28 Zend\View\PhpRenderer as View;

29

30 /**

38 * @group Zend_Form

39 */

40 class FileTest extends \PHPUnit_Framework_TestCase

41 {

42 /**

105 public function setupElementWithMaxFileSize()

106 {

107 $max = $this->_convertIniToInteger(trim(ini_get('upload_max_filesize')));

108

109 $element = new FileElement('foo');

Environment.php (https://github.com/WebTricks/WebTricks-CMS.git) PHP · 195 lines

1 <?php

2 /**

3 * WebTricks - PHP Framework

19

20 /**

21 * Provides information about, and means to manipulate, the current PHP

22 * environment and platform.

23 *

45 protected function getSetting($name)

46 {

47 return ini_get($name);

48 }

49

75

76 /**

77 * Returns the memory limit which can be used by the PHP script

78 *

79 * @return string

test_Minify.php (https://github.com/splittingred/minify.git) PHP · 223 lines

1 <?php

2

3 // currently these only test serve() when passed the 'quiet' options

4

5 require_once '_inc.php';

6 require_once 'Minify.php';

172

173 // Test Issue 132

174 if (function_exists('mb_strlen') && ((int)ini_get('mbstring.func_overload') & 2)) {

175 $output = Minify::serve('Files', array(

176 'files' => array(dirname(__FILE__) . '/_test_files/js/issue132.js')

init.php (https://gitlab.com/goolic/PrestaShop) PHP · 124 lines

30 if (version_compare(preg_replace('/[^0-9.]/', '', PHP_VERSION), '5.2', '<')) {

31 die('You need at least PHP 5.2 to run PrestaShop. Your current PHP version is '.PHP_VERSION);

32 }

33

34 // we check if theses constants are defined

35 // in order to use init.php in upgrade.php script

36 if (!defined('__PS_BASE_URI__')) {

37 define('__PS_BASE_URI__', substr($_SERVER['REQUEST_URI'], 0, -1 * (strlen($_SERVER['REQUEST_URI']) - strrpos($_SERVER['REQUEST_URI'], '/')) - strlen(substr(dirname($_SERVER['REQUEST_URI']), strrpos(dirname($_SERVER['REQUEST_URI']), '/') + 1))));

52 require_once(_PS_CORE_DIR_.'/config/bootstrap.php');

53 require_once(_PS_CORE_DIR_.'/config/defines_uri.inc.php');

54

55 // Generate common constants

69 require_once(_PS_CORE_DIR_.'/config/alias.php');

70 require_once(_PS_INSTALL_PATH_.'classes/exception.php');

71 require_once(_PS_INSTALL_PATH_.'classes/languages.php');

ajaxSearchCtrl.class.inc.php (https://github.com/gunf/novo-isaak.local.git) PHP · 197 lines

1 <?php

2 /* -----------------------------------------------------------------------------

3 * Snippet: AjaxSearch

162 else $this->searchString = strip_tags($_POST['search']);

163

164 if (($this->asCfg->pgCharset != 'UTF-8') && (ini_get('mbstring.encoding_translation') == '' || strtolower(ini_get('mbstring.http_input')) == 'pass')) {

165 $this->searchString = mb_convert_encoding($this->searchString, $this->asCfg->pgCharset, "UTF-8");

166 $this->asOutput->setNeedsConvert(true);

p_c.php (https://bitbucket.org/niidees/madserve.git) PHP · 167 lines

61 }

62

63 // Test for existence of "array_intersect", "explode", "ini_get"

64 // and "trim", which are all required as part of the code to test

65 // which functions are in the "disabled_functions" list below...

95 // Test the disabled functons list with required functions list

96 // defined above in $aRequiredFunctions

97 $aDisabledFunctions = explode(',', ini_get('disable_functions'));

98 foreach ($aDisabledFunctions as $key => $value) {

99 $aDisabledFunctions[$key] = trim($value);

107 }

108

109 // Check PHP version, as use of PHP < 5.1.4 will result in parse errors

110 $errorMessage = "PHP version 5.1.4, or greater, was not detected.";

124 $phpMemoryLimit = MAD_getMemoryLimitSizeInBytes();

125 if ($phpMemoryLimit > 0 && $phpMemoryLimit < $minimumRequiredMemory) {

126 // The memory limit is too low, but can it be increased?

127 $memoryCanBeSet = MAD_checkMemoryCanBeSet();

AbstractDumper.php (https://gitlab.com/mdabutaleb/bitm-laravel-1) PHP · 177 lines

1 <?php

2

3 /*

25 const DUMP_STRING_LENGTH = 2;

26

27 public static $defaultOutput = 'php://output';

28

29 protected $line = '';

44 {

45 $this->flags = (int) $flags;

46 $this->setCharset($charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8');

47 $this->decimalPoint = (string) 0.5;

48 $this->decimalPoint = $this->decimalPoint[1];

SiteInformationForm.php (https://gitlab.com/geeta7/drupal) PHP · 223 lines

1 <?php

2

3 /**

95 $site_mail = $site_config->get('mail');

96 if (empty($site_mail)) {

97 $site_mail = ini_get('sendmail_from');

98 }

99

data.php (https://bitbucket.org/pastor399/newcastleunifc.git) PHP · 125 lines

1 <?php

2 /**

3 * @package EasyBlog

4 * @copyright Copyright (C) 2010 Stack Ideas Private Limited. All rights reserved.

5 * @license GNU/GPL, see LICENSE.php

6 *

7 * EasyBlog is free software. This version may have been modified pursuant

9 * is derivative of works licensed under the GNU General Public License or

10 * other free or open source software licenses.

11 * See COPYRIGHT.php for copyright notices and details.

12 */

13 defined('_JEXEC') or die('Restricted access');

112 }

113

114 // http://php.net/manual/en/function.getallheaders.php

115 if (!function_exists("getallheaders")) {

116 function getallheaders() {

fg.api.php (https://bitbucket.org/vectorbase/vectorbase.git) PHP · 130 lines

1 <?php

2 // $Id:

3

93 }

94 // turn off compatibility mode as simple xml throws a wobbly if you don't.

95 if (ini_get('zend.ze1_compatibility_mode') == 1) {

96 ini_set ('zend.ze1_compatibility_mode', 0);

97 }

LegacyApcUniversalClassLoaderTest.php (https://gitlab.com/4gdevs/online-class-record-system) PHP · 190 lines

1 <?php

2

3 /*

18 * @requires extension apc

19 */

20 class LegacyApcUniversalClassLoaderTest extends \PHPUnit_Framework_TestCase

21 {

22 protected function setUp()

23 {

24 if (ini_get('apc.enabled') && ini_get('apc.enable_cli')) {

25 apc_clear_cache('user');

26 } else {

31 protected function tearDown()

32 {

33 if (ini_get('apc.enabled') && ini_get('apc.enable_cli')) {

34 apc_clear_cache('user');

35 }

cpanel.php (https://github.com/zarkos/Kunena-2.0.git) PHP · 141 lines

1 <?php

2 /**

3 * Kunena Component

106

107 //try to connect via fopen

108 if (function_exists('fopen') && ini_get('allow_url_fopen') && $data == '') {

109

110 //set socket timeout

default-constants.php (https://gitlab.com/Gashler/dp) PHP · 309 lines

1 <?php

2 /**

3 * Defines constants and global variables that can be overridden, generally in wp-config.php.

41 // set memory limits.

42 if ( function_exists( 'memory_get_usage' ) ) {

43 $current_limit = @ini_get( 'memory_limit' );

44 if ( -1 != $current_limit && ( -1 == WP_MEMORY_LIMIT || ( intval( $current_limit ) < abs( intval( WP_MEMORY_LIMIT ) ) ) ) )

45 @ini_set( 'memory_limit', WP_MEMORY_LIMIT );

49 define( 'WP_CONTENT_DIR', ABSPATH . 'wp-content' ); // no trailing slash, full paths only - WP_CONTENT_URL is defined further down

50

51 // Add define('WP_DEBUG', true); to wp-config.php to enable display of notices during development.

52 if ( !defined('WP_DEBUG') )

53 define( 'WP_DEBUG', false );

54

55 // Add define('WP_DEBUG_DISPLAY', null); to wp-config.php use the globally configured setting for

56 // display_errors and not force errors to be displayed. Use false to force display_errors off.

57 if ( !defined('WP_DEBUG_DISPLAY') )

WincacheEngineTest.php (https://github.com/LubosRemplik/cakephp.git) PHP · 279 lines

1 <?php

2 /**

3 * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)

4 * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

5 *

9 *

10 * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

11 * @link https://cakephp.org CakePHP(tm) Project

12 * @since 2.0.0

13 * @license https://opensource.org/licenses/mit-license.php MIT License

33 parent::setUp();

34 $this->skipIf(!function_exists('wincache_ucache_set'), 'Wincache is not installed or configured properly.');

35 $this->skipIf(!ini_get('wincache.enablecli'), 'Wincache is not enabled on the CLI.');

36 Cache::enable();

37 $this->_configCache();

VarClonerTest.php (https://github.com/livinglab/openlab.git) PHP · 269 lines

1 <?php

2

3 /*

12 namespace Symfony\Component\VarDumper\Tests\Cloner;

13

14 use PHPUnit\Framework\TestCase;

15 use Symfony\Component\VarDumper\Cloner\VarCloner;

16

22 public function testMaxIntBoundary()

23 {

24 $data = array(PHP_INT_MAX => 123);

25

26 $cloner = new VarCloner();

56

57 EOTXT;

58 $this->assertSame(sprintf($expected, PHP_INT_MAX), print_r($clone, true));

59 }

60

UploadedFileTest.php (https://bitbucket.org/laborautonomo/laborautonomo-site.git) PHP · 232 lines

1 <?php

2

3 /*

14 use Symfony\Component\HttpFoundation\File\UploadedFile;

15

16 class UploadedFileTest extends \PHPUnit_Framework_TestCase

17 {

18 protected function setUp()

19 {

20 if (!ini_get('file_uploads')) {

21 $this->markTestSkipped('file_uploads is disabled in php.ini');

loaddatamodel.php (https://github.com/viggof/moodle.git) PHP · 111 lines

1 <?php

2 // This file is part of Moodle - http://moodle.org/

3 //

15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.

16

17 require_once("../../config.php");

18 require_once('locallib.php');

25

26 //IE 6 Bug workaround

27 if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 6') !== false && ini_get('zlib.output_compression') == 'On') {

28 ini_set('zlib.output_compression', 'Off');

29 }

53 }

54

55 $url = new moodle_url('/mod/scorm/loaddatamodel.php', array('scoid'=>$scoid, 'id'=>$cm->id, 'attempt'=>$attempt));

56 if ($mode !== '') {

57 $url->param('mode', $mode);

Db.class.php (https://github.com/liu21st/thinkphp.git) PHP · 193 lines

1 <?php

2

3 // +----------------------------------------------------------------------

4 // | ThinkPHP [ WE CAN DO IT JUST THINK IT ]

5 // +----------------------------------------------------------------------

6 // | Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.

47 public function open($savePath, $sessName)

48 {

49 $this->lifeTime = C('SESSION_EXPIRE') ? C('SESSION_EXPIRE') : ini_get('session.gc_maxlifetime');

50 $this->sessionTable = C('SESSION_TABLE') ? C('SESSION_TABLE') : C("DB_PREFIX") . "session";

51 //分布式数据库

AbstractBackend.php (https://github.com/Exercise/zf2.git) PHP · 273 lines

1 <?php

2 /**

3 * Zend Framework

176 }

177 }

178 $upload = ini_get('upload_tmp_dir');

179 if ($upload) {

180 $dir = realpath($upload);

245

246 // Create a default logger to the standard output stream

247 $logger = new Log\Logger(new Log\Writer\Stream('php://output'));

248 $this->_directives['logger'] = $logger;

249 }

README.rst (https://github.com/GunioRobot/ezpublish.git) ReStructuredText · 124 lines

40 'PHP_VERSION' => PHP_VERSION,

41 'PHP_OS' => PHP_OS,

42 'PHP_SAPI' => PHP_SAPI,

48 'include_path' => ini_get( 'include_path' ),

49 'PHP_MAXPATHLEN' => defined('PHP_MAXPATHLEN') ? PHP_MAXPATHLEN : null,

50 'PHP_EOL' => PHP_EOL,

84 root: "/" without index.php in url on both vh and nvh test

85

86 utf8: "[/index.php]/News/Blåbær-Øl-med-d'or-新闻军事社会体育中超" where [/index.php] is only added in nvh mode

87

88 view: "[/index.php]/content/view/full/44" Same as utf8, but with a simpler url

112

113 File name and path to store them in is:

114 server/<mode>/<type>/<os>_<httpd><httpd_version>_<php_mode>_php<php_version>.php

115

116 php_mode: The mode php is running in, either 'mod' (mod_php), 'fpm' or 'fastcgi'.

modstaticresource.class.php (https://github.com/gbds/revolution.git) PHP · 201 lines

1 <?php

2 /**

3 * A derivative of modResource that stores content on the filesystem.

108 public function getFileContent($file, array $options = array()) {

109 $content= false;

110 $memory_limit= ini_get('memory_limit');

111 if (!$memory_limit) $memory_limit= '8M';

112 $byte_limit= $this->_bytes($memory_limit) * .5;

173

174 /**

175 * Converts to bytes from PHP ini_get() format.

176 *

177 * PHP ini modifiers for byte values:

183 *

184 * @access protected

185 * @param string $value Number of bytes represented in PHP ini value format.

186 * @return integer The value converted to bytes.

187 */

rich_filemanager-filemanager-php.tmpl (git://github.com/justingit/dada-mail.git) Go Template · 119 lines

1 <?php

2 ini_set('session.save_path',realpath('<!-- tmpl_var i_rich_filemanager_session_dir -->'));

3

4 /**

5 * Entry point for PHP connector, put your customizations here.

6 *

7 * @license MIT License

14 // ini_set('display_errors', '1');

15

16 require 'vendor/autoload.php';

17

18 // fix display non-latin chars correctly

20 setlocale(LC_CTYPE, 'en_US.UTF-8');

21

22 // fix for undefined timezone in php.ini

23 // https://github.com/servocoder/RichFilemanager/issues/43

24 if(!ini_get('date.timezone')) {

PhpMail.php (https://gitlab.com/reasonat/test8) PHP · 115 lines

1 <?php

2

3 namespace Drupal\Core\Mail\Plugin\Mail;

14 * id = "php_mail",

15 * label = @Translation("Default PHP mailer"),

16 * description = @Translation("Sends the message as plain text, using PHP's native mail() function.")

49 * TRUE if the mail was successfully accepted, otherwise FALSE.

50 *

51 * @see http://php.net/manual/function.mail.php

52 * @see \Drupal\Core\Mail\MailManagerInterface::mail()

53 */

56 // as an additional parameter instead of in the header.

57 if (isset($message['headers']['Return-Path'])) {

58 $return_path_set = strpos(ini_get('sendmail_path'), ' -f');

59 if (!$return_path_set) {

60 $message['Return-Path'] = $message['headers']['Return-Path'];

admin.php (https://bitbucket.org/chiamingyen/cmsimple-and-plugins.git) PHP · 132 lines

1 <?php

2

3 /**

4 * @version $Id: admin.php 290 2012-09-20 15:27:03Z cmb69 $

5 */

6

27

28 if ($action === 'plugin_save') { // refresh

29 include $pth['folder']['plugins'] . $plugin . '/config/config.php';

30 }

31

103 //$browser->view->error('error_not_uploaded', utf8_ucfirst($tx['filetype']['file']));

104 $browser->view->error('error_file_too_big',

105 array('?', ini_get('post_max_size')));

106 }

107

Debug.php (https://github.com/shooray/oscommerce.git) PHP · 83 lines

1 <?php

2 /**

3 * osCommerce Online Merchant

41 }

42

43 if ( (SERVICE_DEBUG_CHECK_SESSION_AUTOSTART == '1') && (bool)ini_get('session.auto_start') ) {

44 $OSCOM_MessageStack->add('debug', OSCOM::getDef('warning_session_auto_start'), 'warning');

45 }

function.mcrypt-list-modes.html (https://bitbucket.org/thncr/manuals.git) HTML · 95 lines

10 <div class="next" style="text-align: right; float: right;"><a href="function.mcrypt-module-close.html">mcrypt_module_close</a></div>

11 <div class="up"><a href="ref.mcrypt.html">Mcrypt 函数</a></div>

12 <div class="home"><a href="index.html">PHP Manual</a></div>

13 </div><hr /><div id="function.mcrypt-list-modes" class="refentry">

14 <div class="refnamediv">

15 <h1 class="refname">mcrypt_list_modes</h1>

16 <p class="verinfo">(PHP 4 &gt;= 4.0.2, PHP 5)</p><p class="refpurpose"><span class="refname">mcrypt_list_modes</span> &mdash; <span class="dc-title">Gets an array of all supported modes</span></p>

17

18 </div>

22 <div class="methodsynopsis dc-description">

23 <span class="type">array</span> <span class="methodname"><strong>mcrypt_list_modes</strong></span>

24 ([ <span class="methodparam"><span class="type">string</span> <code class="parameter">$lib_dir</code><span class="initializer"> = ini_get(&quot;mcrypt.modes_dir&quot;)</span></span>

25 ] )</div>

26

ApcuEngineTest.php (https://github.com/LubosRemplik/cakephp.git) PHP · 336 lines

1 <?php

2 /**

3 * ApcuEngineTest file

4 *

5 * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)

6 *

7 * Licensed under The MIT License

10 *

11 * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)

12 * @link https://cakephp.org CakePHP(tm) Project

13 * @since 3.5.4

14 * @license https://opensource.org/licenses/mit-license.php MIT License

63 $this->skipIf(!function_exists('apcu_store'), 'APCu is not installed or configured properly.');

64

65 if ((PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg')) {

66 $this->skipIf(!ini_get('apc.enable_cli'), 'APCu is not enabled for the CLI.');

qqFileUploader.php (https://bitbucket.org/markmoskalenko/svitor.git) PHP · 151 lines

1 <?php

2 /**

3 * Handle file uploads via XMLHttpRequest

9 */

10 function save($path) {

11 $input = fopen("php://input", "r");

12 $temp = tmpfile();

13 $realSize = stream_copy_to_stream($input, $temp);

82

83 private function checkServerSettings(){

84 $postSize = $this->toBytes(ini_get('post_max_size'));

85 $uploadSize = $this->toBytes(ini_get('upload_max_filesize'));

extprofile_options.h (https://github.com/tmjnaid/hiphop-php.git) C Header · 277 lines

1 /*

2 +----------------------------------------------------------------------+

3 | HipHop for PHP |

4 +----------------------------------------------------------------------+

5 | Copyright (c) 2010 Facebook, Inc. (http://www.facebook.com) |

6 | Copyright (c) 1997-2010 The PHP Group |

7 +----------------------------------------------------------------------+

8 | This source file is subject to version 3.01 of the PHP license, |

9 | that is bundled with this package in the file LICENSE, and is |

10 | available through the world-wide-web at the following url: |

11 | http://www.php.net/license/3_01.txt |

12 | If you did not receive a copy of the PHP license and are unable to |

13 | obtain it through the world-wide-web, please send a note to |

14 | license@php.net so we can mail you a copy immediately. |

15 +----------------------------------------------------------------------+

16 */

phantm.php (https://github.com/theospears/phantm.git) PHP · 117 lines

1 <?php

2 /**

3 * Phantm

51 $vars['GLOBALS']['_SERVER'] = &$vars['_SERVER'];

52

53 if (ini_get('register_long_arrays')) {

54 $vars['HTTP_GET_VARS'] = &$vars['_GET'];

55 $vars['HTTP_POST_VARS'] = &$vars['_POST'];

FloatEncoder.php (https://bitbucket.org/fastestsolution/dev_concitatech_cz.git) PHP · 148 lines

1 <?php

2

3 namespace Riimu\Kit\PHPEncoder\Encoder;

7 * @author Riikka Kalliomäki <riikka.kalliomaki@gmail.com>

8 * @copyright Copyright (c) 2014-2018 Riikka Kalliomäki

9 * @license http://opensource.org/licenses/mit-license.php MIT License

10 */

11 class FloatEncoder implements Encoder

43

44 /**

45 * Encodes the number as a PHP number representation.

46 * @param float $float The number to encode

47 * @param array $options The float encoding options

87 private function encodeInteger($float, callable $encode)

88 {

89 $minimum = \defined('PHP_INT_MIN') ? \PHP_INT_MIN : ~\PHP_INT_MAX;

90

91 if ($float >= $minimum && $float <= \PHP_INT_MAX) {