PageRenderTime 3707ms queryTime 1097ms sortTime 13ms getByIdsTime 289ms findMatchingLines 1018ms

100+ results results for 'php chmod' (3707 ms)

Not the results you expected?
Result.php https://gitlab.com/remyvianne/krowkaramel | PHP | 208 lines
                    
1<?php
                    
2namespace MailPoetVendor\Doctrine\DBAL\ForwardCompatibility;
                    
42 }
                    
43 public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null)
                    
44 {
                    
44 {
                    
45 return $this->stmt->setFetchMode($fetchMode, $arg2, $arg3);
                    
46 }
                    
46 }
                    
47 public function fetch($fetchMode = null, $cursorOrientation = PDO::FETCH_ORI_NEXT, $cursorOffset = 0)
                    
48 {
                    
51 }
                    
52 public function fetchAll($fetchMode = null, $fetchArgument = null, $ctorArgs = null)
                    
53 {
                    
54 Deprecation::triggerIfCalledFromOutside('doctrine/dbal', 'https://github.com/doctrine/dbal/pull/4019', 'Result::fetchAll() is deprecated, use Result::fetchAllNumeric(), fetchAllAssociative() or ' . 'fetchFirstColumn() instead.');
                    
55 return $this->stmt->fetchAll($fetchMode, $fetchArgument, $ctorArgs);
                    
56 }
                    
                
search.php https://gitlab.com/alexprowars/bitrix | PHP | 532 lines
                    
1<?php
                    
2/**
                    
70
                    
71	public static function searchUsers($params = array(), &$searchModified)
                    
72	{
                    
93			),
                    
94			$searchModified
                    
95		);
                    
401		{
                    
402			$searchModified = false;
                    
403			$result["USERS"] = self::searchUsers(array(
                    
407				'requestFields' => $requestFields
                    
408			), $searchModified);
                    
409
                    
409
                    
410			if (!empty($searchModified))
                    
411			{
                    
                
Config.php https://bitbucket.org/webpolis/liiv.git | PHP | 514 lines
                    
34 */
                    
35require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ImagesConfig.php";
                    
36
                    
157     */
                    
158    var $_chmodFolders = 0755;
                    
159    /**
                    
337    {
                    
338        return $this->_chmodFiles;
                    
339    }
                    
479        if (isset($GLOBALS['config']['ChmodFiles'])) {
                    
480            $this->_chmodFiles = $GLOBALS['config']['ChmodFiles'];
                    
481        }
                    
482        if (isset($GLOBALS['config']['ChmodFolders'])) {
                    
483            $this->_chmodFolders = $GLOBALS['config']['ChmodFolders'];
                    
484        }
                    
                
Filesystem.php https://github.com/bhaumik25/zend-framework.git | PHP | 363 lines
                    
1<?php
                    
2/**
                    
23/** Zend_Search_Lucene_Storage_Directory */
                    
24require_once 'Zend/Search/Lucene/Storage/Directory.php';
                    
25
                    
26/** Zend_Search_Lucene_Storage_File_Filesystem */
                    
27require_once 'Zend/Search/Lucene/Storage/File/Filesystem.php';
                    
28
                    
184
                    
185        global $php_errormsg;
                    
186        $trackErrors = ini_get('track_errors'); ini_set('track_errors', '1');
                    
186        $trackErrors = ini_get('track_errors'); ini_set('track_errors', '1');
                    
187        if (!@chmod($this->_dirPath . '/' . $filename, self::$_defaultFilePermissions)) {
                    
188            ini_set('track_errors', $trackErrors);
                    
188            ini_set('track_errors', $trackErrors);
                    
189            throw new Zend_Search_Lucene_Exception($php_errormsg);
                    
190        }
                    
                
MysqliStatement.php https://gitlab.com/techniconline/kmc | PHP | 370 lines
                    
252
                    
253        $fetchMode = $fetchMode ?: $this->_defaultFetchMode;
                    
254
                    
267            default:
                    
268                throw new MysqliException("Unknown fetch type '{$fetchMode}'");
                    
269        }
                    
276    {
                    
277        $fetchMode = $fetchMode ?: $this->_defaultFetchMode;
                    
278
                    
353     */
                    
354    public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null)
                    
355    {
                    
355    {
                    
356        $this->_defaultFetchMode = $fetchMode;
                    
357
                    
                
installv2.sh https://bitbucket.org/jorgenio/boca.git | Shell | 320 lines
                    
36if [ $? != 0 ]; then
                    
37  echo "Make the install script executable (using chmod) and run it directly, like ./installv2.sh"
                    
38else  
                    
111apt-get -y install zenity apache2 eclipse-pde eclipse-rcp eclipse-platform eclipse-jdt eclipse emacs \
                    
112  evince g++ gcc gedit scite libstdc++6 makepasswd manpages-dev mii-diag php5-cli php5-mcrypt openjdk-6-dbg \
                    
113  php5 php5-pgsql postgresql postgresql-client postgresql-contrib quota sharutils default-jdk openjdk-6-doc \
                    
114  vim-gnome geany geany-plugin-addons geany-plugin-gdb geany-plugins default-jre sysstat \
                    
115  $sysvutils vim xfce4 $libCppdev $libCppdoc $libCppdbg php5-gd stl-manual gcc-doc debootstrap schroot c++-annotations
                    
116if [ $? != 0 ]; then
                    
169  echo -e "password root `makepasswd`" >> /etc/grub.d/40_custom
                    
170  chmod go-rw /etc/grub.d/40_custom
                    
171  grub-mkconfig > /boot/grub/grub.cfg
                    
171  grub-mkconfig > /boot/grub/grub.cfg
                    
172  chmod go-rw /boot/grub/grub.cfg
                    
173fi
                    
                
Statement.php https://github.com/cosmocommerce/magento-mirror.git | PHP | 488 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Statement.php 24790 2012-05-10 12:28:51Z mcleod@spaceweb.nl $
                    
21 */
                    
25 */
                    
26#require_once 'Zend/Db.php';
                    
27
                    
30 */
                    
31#require_once 'Zend/Db/Statement/Interface.php';
                    
32
                    
59     */
                    
60    protected $_fetchMode = Zend_Db::FETCH_ASSOC;
                    
61
                    
150                     */
                    
151                    #require_once 'Zend/Db/Statement/Exception.php';
                    
152                    throw new Zend_Db_Statement_Exception("Invalid bind-variable position '$val'");
                    
                
exc.py https://gitlab.com/pooja043/Globus_Docker_3 | Python | 367 lines
                    
5# This module is part of SQLAlchemy and is released under
                    
6# the MIT License: http://www.opensource.org/licenses/mit-license.php
                    
7
                    
30
                    
31class NoSuchModuleError(ArgumentError):
                    
32    """Raised when a dynamically-loaded module (usually a database dialect)
                    
                
interface.php https://bitbucket.org/mrmustarde/manhattan-beach.git | PHP | 293 lines
                    
61			$php_group = reset( explode( ' ', exec( 'groups' ) ) );
                    
62			echo '<div id="hmbkp-warning" class="updated fade"><p><strong>' . __( 'BackUpWordPress is almost ready.', 'hmbkp' ) . '</strong> ' . sprintf( __( 'Your backups directory isn\'t writable, run %1$s or %2$s or set the permissions yourself.', 'hmbkp' ), '<code>chown -R ' . esc_html( $php_user ) . ':' . esc_html( $php_group ) . ' ' . esc_html( hmbkp_path() ) . '</code>', '<code>chmod -R 777 ' . esc_html( hmbkp_path() ) . '</code>' ) . '</p></div>';
                    
63		}
                    
119	if ( isset( $plugins[HMBKP_PLUGIN_SLUG . '/plugin.php'] ) )
                    
120		$plugins[HMBKP_PLUGIN_SLUG . '/plugin.php']['Description'] = str_replace( 'Once activated you\'ll find me under <strong>Tools &rarr; Backups</strong>', 'Find me under <strong><a href="' . admin_url( 'tools.php?page=' . HMBKP_PLUGIN_SLUG ) . '">Tools &rarr; Backups</a></strong>', $plugins[HMBKP_PLUGIN_SLUG . '/plugin.php']['Description'] );
                    
121
                    
244	
                    
245	<span class="hmbkp-status"><?php echo $schedule->get_status() ? $schedule->get_status() : __( 'Starting Backup', 'hmbkp' ); ?> <a href="<?php echo add_query_arg( array( 'action' => 'hmbkp_cancel', 'hmbkp_schedule_id' => $schedule->get_id() ), HMBKP_ADMIN_URL ); ?>"><?php _e( 'cancel', 'hmbkp' ); ?></a></span>
                    
246
                    
251	<?php if ( $schedule->get_type() !== 'database' ) { ?>
                    
252		<a class="fancybox" href="<?php echo add_query_arg( array( 'action' => 'hmbkp_edit_schedule_excludes_load', 'hmbkp_schedule_id' => $schedule->get_id() ), admin_url( 'admin-ajax.php' ) ); ?>"><?php _e( 'Excludes', 'hmbkp' ); ?></a>  |
                    
253	<?php } ?>
                    
254
                    
255		<a class="hmbkp-run" href="<?php echo add_query_arg( array( 'action' => 'hmbkp_run_schedule', 'hmbkp_schedule_id' => $schedule->get_id() ), admin_url( 'admin-ajax.php' ) ); ?>"><?php _e( 'Run now', 'hmbkp' ); ?></a>  |
                    
256
                    
                
README.md https://gitlab.com/xolotsoft/pumasruiz | Markdown | 306 lines
                    
1# Boris: A tiny little, but robust REPL for PHP
                    
2
                    
4
                    
5Python has one. Ruby has one. Clojure has one. Now PHP has one too. Boris is
                    
6PHP's missing REPL (read-eval-print loop), allowing developers to experiment
                    
6PHP's missing REPL (read-eval-print loop), allowing developers to experiment
                    
7with PHP code in the terminal in an interactive manner.  If you make a mistake,
                    
8it doesn't matter, Boris will report the error and stand to attention for
                    
16
                    
17I'm in the process of transitioning away from PHP to Ruby.  I have come to find
                    
18PHP's lack of a real REPL to be frustrating and was not able to find an existing
                    
32    curl -O https://github.com/d11wtq/boris/releases/download/v1.0.8/boris.phar
                    
33    chmod +x boris.phar
                    
34    ./boris.phar
                    
59
                    
60    chmod +x boris.phar
                    
61    mv boris.phar /usr/local/bin/boris
                    
                
fileman_server_access.php https://gitlab.com/alexprowars/bitrix | PHP | 346 lines
                    
1<?
                    
2require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_admin_before.php");
                    
3require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fileman/prolog.php");
                    
8require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fileman/include.php");
                    
9include_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/fileman/classes/general/fileman_utils.php");
                    
10IncludeModuleLangFile(__FILE__);
                    
106	$result_value = (int) "0".$result_value;
                    
107	$oChmod = new CFilemanChmod;
                    
108
                    
147
                    
148		$oChmod->Chmod($arFile['ABS_PATH']);
                    
149	}
                    
161	window.spBstoped = <?= $bStoped ? 'true' : 'false'?>;
                    
162	window.spResult = <?= CUtil::PhpToJSObject($oChmod->Result)?>;
                    
163	</script>
                    
                
FileTransfer.php https://gitlab.com/geeta7/drupal | PHP | 422 lines
                    
1<?php
                    
2
                    
135   * @param int $mode
                    
136   *   The new file permission mode to be passed to chmod().
                    
137   * @param bool $recursive
                    
137   * @param bool $recursive
                    
138   *   Pass TRUE to recursively chmod the entire directory specified in $path.
                    
139   *
                    
141   *
                    
142   * @see http://php.net/chmod
                    
143   */
                    
143   */
                    
144  public final function chmod($path, $mode, $recursive = FALSE) {
                    
145    if (!($this instanceof ChmodInterface)) {
                    
150    $this->checkPath($path);
                    
151    $this->chmodJailed($path, $mode, $recursive);
                    
152  }
                    
                
class-wp-filesystem-ssh2.php https://gitlab.com/phamngsinh/baitaplon_sinhvien | PHP | 383 lines
                    
28 *
                    
29 * Copy the ssh.so file it creates to your PHP Module Directory.
                    
30 * Open up your PHP.INI file and look for where extensions are placed.
                    
60		if ( !function_exists('stream_get_contents') ) {
                    
61			$this->errors->add('ssh2_php_requirement', __('The ssh2 PHP extension is available, however, we require the PHP5 function <code>stream_get_contents()</code>'));
                    
62			return false;
                    
190
                    
191	function chmod($file, $mode = false, $recursive = false) {
                    
192		if ( ! $this->exists($file) )
                    
196			if ( $this->is_file($file) )
                    
197				$mode = FS_CHMOD_FILE;
                    
198			elseif ( $this->is_dir($file) )
                    
314		if ( ! $chmod )
                    
315			$chmod = FS_CHMOD_DIR;
                    
316		if ( ! ssh2_sftp_mkdir($this->sftp_link, $path, $chmod, true) )
                    
                
perf-mysql.inc.php https://bitbucket.org/selfeky/xclusivescardwebsite.git | PHP | 315 lines
                    
1<?php
                    
2/* 
                    
134		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
                    
135		if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false);
                    
136		
                    
138		
                    
139		if (isset($savem)) $this->conn->SetFetchMode($savem);
                    
140		$ADODB_FETCH_MODE = $save;
                    
163		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
                    
164		if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false);
                    
165		
                    
199		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
                    
200		if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false);
                    
201		
                    
251		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
                    
252		if ($this->conn->fetchMode !== false) $savem = $this->conn->SetFetchMode(false);
                    
253		
                    
                
reader.php https://bitbucket.org/crevillo/enetcall.git | PHP | 279 lines
                    
1<?php
                    
2/**
                    
11/**
                    
12 * Handler for files containing PHP arrays that represent DB schema.
                    
13 *
                    
89        $resultArray = $this->db->query( "DESCRIBE `$tableName`" );
                    
90        $resultArray->setFetchMode( PDO::FETCH_ASSOC );
                    
91
                    
                
Blame.php https://github.com/bermi/akelos.git | PHP | 310 lines
                    
97 * // subclasses.
                    
98 * $options = array('fetchmode' => VERSIONCONTROL_SVN_FETCHMODE_RAW);
                    
99 *
                    
179     * --xml switch if $fetchmode is set to VERSIONCONTROL_SVN_FETCHMODE_XML,
                    
180     * VERSIONCONTROL_SVN_FETCHMODE_ASSOC or VERSIONCONTROL_SVN_FETCHMODE_OBJECT
                    
181     *
                    
195        $args               = $this->args;
                    
196        $fetchmode          = $this->fetchmode;
                    
197        $invalid_switches   = array();
                    
271    {
                    
272        $fetchmode = $this->fetchmode;
                    
273        switch($fetchmode) {
                    
291            default:
                    
292                // What you get with VERSIONCONTROL_SVN_FETCHMODE_DEFAULT
                    
293                return join("\n", $out);
                    
                
Sqlsrv.php https://github.com/tanduy/zf.git | PHP | 411 lines
                    
1<?php
                    
2/**
                    
25 */
                    
26require_once 'Zend/Db/Statement.php';
                    
27
                    
28/**
                    
29 * Extends for Microsoft SQL Server Driver for PHP
                    
30 *
                    
68        if (!$this->_stmt) {
                    
69            require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
                    
70            throw new Zend_Db_Statement_Sqlsrv_Exception(sqlsrv_errors());
                    
79     * @param mixed $parameter Name the parameter, either integer or string.
                    
80     * @param mixed $variable  Reference to PHP variable containing the value.
                    
81     * @param mixed $type      OPTIONAL Datatype of SQL parameter.
                    
204        if (!$this->_stmt) {
                    
205            require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
                    
206            throw new Zend_Db_Statement_Sqlsrv_Exception(sqlsrv_errors());
                    
                
files.php https://gitlab.com/webbroteam/satisfaction-mvc | PHP | 306 lines
                    
1<?php
                    
2/**
                    
9 *
                    
10 * @author Khoa Bui (khoaofgod)  <khoaofgod@gmail.com> http://www.phpfastcache.com
                    
11 * @author Georges.L (Geolim4)  <contact@geolim4.com>
                    
17use phpFastCache\Core\DriverAbstract;
                    
18use phpFastCache\Exceptions\phpFastCacheDriverException;
                    
19
                    
21 * Class files
                    
22 * @package phpFastCache\Drivers
                    
23 */
                    
37        if (!$this->checkdriver() && !isset($config[ 'skipError' ])) {
                    
38            throw new phpFastCacheDriverException("Can't use this driver for your website!");
                    
39        }
                    
73                if (!mkdir($path, $this->__setChmodAuto())) {
                    
74                    throw new phpFastCacheDriverException('PLEASE CHMOD ' . $this->getPath() . ' - 0777 OR ANY WRITABLE PERMISSION!', 92);
                    
75                }
                    
                
Statement.php https://gitlab.com/remyvianne/krowkaramel | PHP | 342 lines
                    
123 }
                    
124 public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null)
                    
125 {
                    
127 if ($arg2 === null) {
                    
128 return $this->stmt->setFetchMode($fetchMode);
                    
129 }
                    
130 if ($arg3 === null) {
                    
131 return $this->stmt->setFetchMode($fetchMode, $arg2);
                    
132 }
                    
132 }
                    
133 return $this->stmt->setFetchMode($fetchMode, $arg2, $arg3);
                    
134 }
                    
154 }
                    
155 return $this->stmt->fetchAll($fetchMode);
                    
156 }
                    
                
FileWriter.php https://gitlab.com/campus-academy/krowkaramel | PHP | 341 lines
                    
1<?php
                    
2/**
                    
128     */
                    
129    public function chmod( $mode, $recursive = false ){
                    
130        $this->authorize();
                    
130        $this->authorize();
                    
131        if( ! $this->fs->chmod( $this->getPath(), $mode, $recursive ) ){
                    
132            throw new Loco_error_WriteException( sprintf( __('Failed to chmod %s','loco-translate'), $this->file->basename() ) );
                    
226        else {
                    
227            $mode = defined('FS_CHMOD_FILE') ? FS_CHMOD_FILE : 0644;
                    
228            // new file may also require directory path building
                    
274        // may have bypassed definition of FS_CHMOD_DIR
                    
275        $mode = defined('FS_CHMOD_DIR') ? FS_CHMOD_DIR : 0755;
                    
276        // find first ancestor that exists while building tree
                    
317        // Deny list of executable file extensions, noting that specific actions may limit this further.
                    
318        // Note that this ignores the base file name, so "php.pot" would be permitted, but "foo.php.pot" would not.
                    
319        $exts = array_slice( explode('.', $this->file->basename() ), 1 );
                    
                
permissions.inc.php git://github.com/modxcms/revolution.git | PHP | 192 lines
                    
1<?php
                    
2/**
                    
39$_lang['perm.delete_user_desc'] = 'Untuk menghapus atau menghapus setiap pengguna.';
                    
40$_lang['perm.directory_chmod_desc'] = 'Chmod direktori fisik.';
                    
41$_lang['perm.directory_create_desc'] = 'Untuk membuat sebuah direktori fisik.';
                    
                
Admin.php https://gitlab.com/sdlion/project_the_beginner_b35 | PHP | 234 lines
                    
101
                    
102        $fetchMode = strtoupper($fetchMode);
                    
103        if(substr_count($fetchMode,'OBJ') > 0)
                    
103        if(substr_count($fetchMode,'OBJ') > 0)
                    
104            $STH->setFetchMode(PDO::FETCH_OBJ);
                    
105        else
                    
105        else
                    
106            $STH->setFetchMode(PDO::FETCH_ASSOC);
                    
107
                    
118
                    
119        $fetchMode = strtoupper($fetchMode);
                    
120        if(substr_count($fetchMode,'OBJ') > 0)
                    
120        if(substr_count($fetchMode,'OBJ') > 0)
                    
121            $STH->setFetchMode(PDO::FETCH_OBJ);
                    
122        else
                    
                
page.admin.serverSettings.tmpl https://github.com/deadeyes/torrentflux.git | Go Template | 261 lines
                    
15				<div align="center">
                    
16					<form name="theForm" action="admin.php?op=updateServerSettings" method="post" onsubmit="return validateSettings('server')">
                    
17						<table cellpadding="5" cellspacing="0" border="0" width="100%">
                    
30										<tmpl_else>
                    
31											<img src="themes/default/images/red.gif" align="absmiddle" title="Path is not Writable"><br><font color="#ff0000">Path is not writable - make sure you chmod +w this path</font>
                    
32										</tmpl_if>
                    
117								<td align="left" width="350" valign="top">
                    
118									<label for="bin_php"><strong>php</strong></label><br/>
                    
119									Specify the path to the commandline (cli) php binary (/usr/bin/php).<br/>
                    
122								<td valign="top">
                    
123									<input name="bin_php" id="bin_php" type="Text" maxlength="254" value="<tmpl_var name="bin_php">" size="55">
                    
124									<tmpl_var name="validate_php">
                    
216							</tr>
                    
217							<tr><td colspan="2" align="center" bgcolor="<tmpl_var name="table_header_bg">"><strong>OS Specific Binary Paths</strong> <em>(<tmpl_var name="php_uname1"> <tmpl_var name="php_uname2">)</em></td></tr>
                    
218							<tmpl_if name="_OS" value="1">
                    
                
EntityOperations.php https://gitlab.com/Drulenium-bot/workbench_moderation | PHP | 267 lines
                    
1<?php
                    
2
                    
10use Drupal\Core\TypedData\TranslatableInterface;
                    
11use Drupal\workbench_moderation\Event\WorkbenchModerationEvents;
                    
12use Drupal\workbench_moderation\Event\WorkbenchModerationTransitionEvent;
                    
163      // Entity API doesn't allow hook_entity_presave to short-circuit a save.
                    
164      $event = new WorkbenchModerationTransitionEvent($entity, $state_before, $state_after);
                    
165
                    
165
                    
166      $this->eventDispatcher->dispatch(WorkbenchModerationEvents::STATE_TRANSITION, $event);
                    
167    }
                    
                
UploadBehavior.php https://github.com/kiang/olc_baker.git | PHP | 243 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * This file is a part of UploadPack - a set of classes that makes file uploads in CakePHP as easy as possible.
                    
4 *
                    
94                    @mkdir($destDir, 0777, true);
                    
95                    @chmod($destDir, 0777);
                    
96                }
                    
                
haml.php https://bitbucket.org/mintao/yii-phamlp.git | PHP | 287 lines
                    
1<?php
                    
2/**
                    
13 *   See below and HamlParser for a description of options
                    
14 * * Add the following line in your app_controller.php
                    
15 *   <pre>var $view = 'Haml';</pre>
                    
48	/**
                    
49	 * @var integer the chmod permission for temporary directories and files
                    
50	 * generated during parsing. Defaults to 0755 (owner rwx, group rx and others rx).
                    
160
                    
161		App::import('Vendor', 'HamlParser', array('file'=>'phamlp'.DS.'haml'.DS.'HamlParser.php'));
                    
162		$this->haml = new HamlParser($options);
                    
165	/**
                    
166	 * Renders a piece of PHP with provided parameters and returns HTML, XML, or
                    
167	 * any other string.
                    
262				file_put_contents($cachedViewFile, $data = $this->haml->parse($___viewFn));
                    
263				@chmod($cachedViewFile, $this->filePermission);
                    
264			}
                    
                
Filesystem.php https://gitlab.com/Ltaimao/wecenter | PHP | 364 lines
                    
1<?php
                    
2/**
                    
24/** Zend_Search_Lucene_Storage_Directory */
                    
25//require_once 'Zend/Search/Lucene/Storage/Directory.php';
                    
26
                    
120            if (file_exists($path)) {
                    
121                //require_once 'Zend/Search/Lucene/Exception.php';
                    
122                throw new Zend_Search_Lucene_Exception('Path exists, but it\'s not a directory');
                    
124                if (!self::mkdirs($path)) {
                    
125                    //require_once 'Zend/Search/Lucene/Exception.php';
                    
126                    throw new Zend_Search_Lucene_Exception("Can't create directory '$path'.");
                    
184        unset($this->_fileHandlers[$filename]);
                    
185        //require_once 'Zend/Search/Lucene/Storage/File/Filesystem.php';
                    
186        $this->_fileHandlers[$filename] = new Zend_Search_Lucene_Storage_File_Filesystem($this->_dirPath . '/' . $filename, 'w+b');
                    
189        // created by anther user which has to care about right permissions
                    
190        @chmod($this->_dirPath . '/' . $filename, self::$_defaultFilePermissions);
                    
191
                    
                
Installer.php https://gitlab.com/asun89/socianovation-web | PHP | 370 lines
                    
1<?php
                    
2namespace Grav\Common\GPM;
                    
214                        foreach (glob($path . DS . '*') as $file) {
                    
215                            @chmod($file, 0755);
                    
216                        }
                    
289        if (
                    
290            !file_exists($target . DS . 'index.php') ||
                    
291            !file_exists($target . DS . 'bin') ||
                    
                
file2.kvdriver.php git://github.com/jelix/jelix.git | PHP | 292 lines
                    
1<?php
                    
2/**
                    
207
                    
208                    chmod($fn, jApp::config()->chmodFile);
                    
209
                    
                
DbStatement.php https://gitlab.com/rsilveira1987/Expresso | PHP | 381 lines
                    
1<?php
                    
2/**
                    
16 * @package    Test
                    
17 * @subpackage PHPUnit
                    
18 * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: DbStatement.php 10020 2009-08-18 14:34:09Z j.fischer@metaways.de $
                    
21 */
                    
22
                    
23require_once "Zend/Db/Statement/Interface.php";
                    
24
                    
29 * @package    Zend_Test
                    
30 * @subpackage PHPUnit
                    
31 * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
                    
131    /**
                    
132     * Bind a column of the statement result set to a PHP variable.
                    
133     *
                    
                
Db2.php https://gitlab.com/rsilveira1987/Expresso | PHP | 364 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Db2.php 10020 2009-08-18 14:34:09Z j.fischer@metaways.de $
                    
21 */
                    
25 */
                    
26require_once 'Zend/Db/Statement.php';
                    
27
                    
71             */
                    
72            require_once 'Zend/Db/Statement/Db2/Exception.php';
                    
73            throw new Zend_Db_Statement_Db2_Exception(
                    
83     * @param mixed $parameter Name the parameter, either integer or string.
                    
84     * @param mixed $variable  Reference to PHP variable containing the value.
                    
85     * @param mixed $type      OPTIONAL Datatype of SQL parameter.
                    
106             */
                    
107            require_once 'Zend/Db/Statement/Db2/Exception.php';
                    
108            throw new Zend_Db_Statement_Db2_Exception(
                    
                
setup_smokeping.sh http://hm2k.googlecode.com/svn/trunk/ | Shell | 111 lines
                    
3# @see http://lzheng.blogspot.com/2007/02/install-smokeping-via-yum.html
                    
4# @see http://slog.carlheaton.co.uk/index.php/2009/06/centos-5-3-smokeping-2-4-2-install-quick/
                    
5
                    
58
                    
59chmod 600 /usr/local/smokeping/etc/smokeping_secrets
                    
60chmod 600 /usr/local/smokeping/etc/smokeping_secrets
                    
61chown -R apache:apache /usr/local/smokeping/htdocs/
                    
62chmod 755 /usr/local/smokeping/htdocs/
                    
63chmod 755 /usr/local/smokeping/htdocs/*.cgi
                    
                
UncaughtExceptionTest.php https://gitlab.com/reasonat/test8 | PHP | 280 lines
                    
35    $settings_filename = $this->siteDirectory . '/settings.php';
                    
36    chmod($settings_filename, 0777);
                    
37    $settings_php = file_get_contents($settings_filename);
                    
37    $settings_php = file_get_contents($settings_filename);
                    
38    $settings_php .= "\ninclude_once 'core/modules/system/src/Tests/Bootstrap/ErrorContainer.php';\n";
                    
39    $settings_php .= "\ninclude_once 'core/modules/system/src/Tests/Bootstrap/ExceptionContainer.php';\n";
                    
39    $settings_php .= "\ninclude_once 'core/modules/system/src/Tests/Bootstrap/ExceptionContainer.php';\n";
                    
40    file_put_contents($settings_filename, $settings_php);
                    
41
                    
92  public function testUncaughtExceptionCustomExceptionHandler() {
                    
93    $settings_filename = $this->siteDirectory . '/settings.php';
                    
94    chmod($settings_filename, 0777);
                    
128  public function testMissingDependencyCustomErrorHandler() {
                    
129    $settings_filename = $this->siteDirectory . '/settings.php';
                    
130    chmod($settings_filename, 0777);
                    
                
Db.php https://gitlab.com/devtoannh/cafe | PHP | 286 lines
                    
1<?php
                    
2
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Db.php 24417 2011-08-28 10:15:47Z padraic $
                    
21 */
                    
47     */
                    
48    const FETCH_MODE = 'fetchMode';
                    
49
                    
226             */
                    
227            require_once 'Zend/Db/Exception.php';
                    
228            throw new Zend_Db_Exception('Adapter parameters must be in an array or a Zend_Config object');
                    
237             */
                    
238            require_once 'Zend/Db/Exception.php';
                    
239            throw new Zend_Db_Exception('Adapter name must be specified in a string');
                    
261        if (!class_exists($adapterName)) {
                    
262            require_once 'Zend/Loader.php';
                    
263            Zend_Loader::loadClass($adapterName);
                    
                
Ftp.php https://gitlab.com/buitenzorg812/garapic.cms | PHP | 667 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP
                    
6 *
                    
285		{
                    
286			$this->chmod($path, (int) $permissions);
                    
287		}
                    
340		{
                    
341			$this->chmod($rempath, (int) $permissions);
                    
342		}
                    
519	 */
                    
520	public function chmod($path, $perm)
                    
521	{
                    
632	{
                    
633		return in_array($ext, array('txt', 'text', 'php', 'phps', 'php4', 'js', 'css', 'htm', 'html', 'phtml', 'shtml', 'log', 'xml'), TRUE)
                    
634			? 'ascii'
                    
                
Filesystem.php https://bitbucket.org/mkrasuski/magento-ce.git | PHP | 364 lines
                    
1<?php
                    
2/**
                    
24/** Zend_Search_Lucene_Storage_Directory */
                    
25#require_once 'Zend/Search/Lucene/Storage/Directory.php';
                    
26
                    
120            if (file_exists($path)) {
                    
121                #require_once 'Zend/Search/Lucene/Exception.php';
                    
122                throw new Zend_Search_Lucene_Exception('Path exists, but it\'s not a directory');
                    
124                if (!self::mkdirs($path)) {
                    
125                    #require_once 'Zend/Search/Lucene/Exception.php';
                    
126                    throw new Zend_Search_Lucene_Exception("Can't create directory '$path'.");
                    
184        unset($this->_fileHandlers[$filename]);
                    
185        #require_once 'Zend/Search/Lucene/Storage/File/Filesystem.php';
                    
186        $this->_fileHandlers[$filename] = new Zend_Search_Lucene_Storage_File_Filesystem($this->_dirPath . '/' . $filename, 'w+b');
                    
189        // created by anther user which has to care about right permissions
                    
190        @chmod($this->_dirPath . '/' . $filename, self::$_defaultFilePermissions);
                    
191
                    
                
Filesystem.php https://bitbucket.org/efdac/e-forest_platform.git | PHP | 362 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Filesystem.php 20096 2010-01-06 02:05:09Z bkarwin $
                    
21 */
                    
24/** Zend_Search_Lucene_Storage_Directory */
                    
25require_once 'Zend/Search/Lucene/Storage/Directory.php';
                    
26
                    
118            if (file_exists($path)) {
                    
119                require_once 'Zend/Search/Lucene/Exception.php';
                    
120                throw new Zend_Search_Lucene_Exception('Path exists, but it\'s not a directory');
                    
122                if (!self::mkdirs($path)) {
                    
123                    require_once 'Zend/Search/Lucene/Exception.php';
                    
124                    throw new Zend_Search_Lucene_Exception("Can't create directory '$path'.");
                    
182        unset($this->_fileHandlers[$filename]);
                    
183        require_once 'Zend/Search/Lucene/Storage/File/Filesystem.php';
                    
184        $this->_fileHandlers[$filename] = new Zend_Search_Lucene_Storage_File_Filesystem($this->_dirPath . '/' . $filename, 'w+b');
                    
                
Revert.php https://github.com/bermi/akelos.git | PHP | 300 lines
                    
94 * // subclasses.
                    
95 * $options = array('fetchmode' => VERSIONCONTROL_SVN_FETCHMODE_RAW);
                    
96 *
                    
170     * --xml switch (if available) if $fetchmode is set to VERSIONCONTROL_SVN_FETCHMODE_XML,
                    
171     * VERSIONCONTROL_SVN_FETCHMODE_ASSOC or VERSIONCONTROL_SVN_FETCHMODE_OBJECT
                    
172     *
                    
186        $args               = $this->args;
                    
187        $fetchmode          = $this->fetchmode;
                    
188        $invalid_switches   = array();
                    
254     * @param   array   $out    Array of output captured by exec command in {@link run}.
                    
255     * @return  mixed   Returns output requested by fetchmode (if available), or raw output
                    
256     *                  if desired fetchmode is not available.
                    
260    {
                    
261        $fetchmode = $this->fetchmode;
                    
262        switch($fetchmode) {
                    
                
unpack.php https://gitlab.com/milo-ft/osTicket | PHP | 270 lines
                    
1<?php
                    
2
                    
54        # Read the main.inc.php script
                    
55        $bootstrap_php = $this->destination . '/bootstrap.php';
                    
56        $lines = explode("\n", file_get_contents($bootstrap_php));
                    
75        }
                    
76        if (!file_put_contents($bootstrap_php, implode("\n", $lines)))
                    
77            die("Unable to configure location of INCLUDE_DIR in bootstrap.php\n");
                    
137        $this->updateManifest($src, $hash);
                    
138        return copy($src, $dest) && chmod($dest, $mode);
                    
139    }
                    
151     * exclude - (string | array<string>) patterns that will be matched
                    
152     *      using the PHP `fnmatch` function. If any file or folder matches,
                    
153     *      it will be excluded from the copy procedure. Omit or use false
                    
206        $pipes = array();
                    
207        $php = proc_open('php', array(
                    
208            0 => array('pipe', 'r'),
                    
                
fs.js https://gitlab.com/TurnInternational/simon | JavaScript | 364 lines
                    
6 * Dual licensed under the MIT and GPL licenses:
                    
7 *   * http://www.opensource.org/licenses/mit-license.php
                    
8 *   * http://www.gnu.org/licenses/gpl.html
                    
206     */
                    
207    chmod : promisify(fs.chmod),
                    
208
                    
                
function_vpn_ssl.php http://windowsfw.googlecode.com/svn/trunk/ | PHP | 343 lines
                    
1<?php
                    
2include_once "function_base_xml_class.php";
                    
303
                    
304		$command .= "/bin/chmod +x /usr/local/etc/openvpn/easy-rsa/vars; /bin/sync;";
                    
305
                    
                
admin.ninjaxplorer.php https://gitlab.com/phamngsinh/baitaplon_sinhvien | PHP | 270 lines
                    
80/*if (!$acl->acl_check( 'administration', 'config', 'users', $user->usertype )) {
                    
81	$mainframe->redirect( 'index2.php', _NOT_AUTH );
                    
82}   */
                    
117//------------------------------------------------------------------------------
                    
118require _QUIXPLORER_PATH . "/include/init.php";	// Init
                    
119//------------------------------------------------------------------------------
                    
181  case "upload":
                    
182	  require _QUIXPLORER_PATH . "/include/fun_up.php";
                    
183	  upload_items($dir);
                    
191//------------------------------------------------------------------------------
                    
192  // CHMOD FILE/DIR
                    
193  case "chmod":
                    
193  case "chmod":
                    
194	  require _QUIXPLORER_PATH ."/include/fun_chmod.php";
                    
195	  chmod_item($dir, $GLOBALS["item"]);
                    
                
edit_banner.php https://gitlab.com/phamngsinh/baitaplon_sinhvien | PHP | 246 lines
                    
1<?php
                    
2
                    
15{
                    
16    Header( "Location: " . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name );
                    
17    die();
                    
49    $contents['upload_blocked'] = $lang_module['upload_blocked'];
                    
50    include ( NV_ROOTDIR . "/includes/header.php" );
                    
51    echo nv_admin_theme( nv_edit_banner_theme( $contents ) );
                    
51    echo nv_admin_theme( nv_edit_banner_theme( $contents ) );
                    
52    include ( NV_ROOTDIR . "/includes/footer.php" );
                    
53    exit();
                    
75{
                    
76    Header( "Location: " . NV_BASE_ADMINURL . "index.php?" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=add_plan" );
                    
77    die();
                    
112        {
                    
113            @require_once ( NV_ROOTDIR . "/includes/class/upload.class.php" );
                    
114            $upload = new upload( $contents['file_allowed_ext'], $global_config['forbid_extensions'], $global_config['forbid_mimes'], NV_UPLOAD_MAX_FILESIZE, NV_MAX_WIDTH, NV_MAX_HEIGHT );
                    
                
Sqlsrv.php https://gitlab.com/luisrepo/ClienteWS | PHP | 440 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Sqlsrv.php 23775 2011-03-01 17:25:24Z ralph $
                    
21 */
                    
25 */
                    
26require_once 'Zend/Db/Statement.php';
                    
27
                    
28/**
                    
29 * Extends for Microsoft SQL Server Driver for PHP
                    
30 *
                    
68        if (!$this->_stmt) {
                    
69            require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
                    
70            throw new Zend_Db_Statement_Sqlsrv_Exception(sqlsrv_errors());
                    
79     * @param mixed $parameter Name the parameter, either integer or string.
                    
80     * @param mixed $variable  Reference to PHP variable containing the value.
                    
81     * @param mixed $type      OPTIONAL Datatype of SQL parameter.
                    
                
Config.php https://bitbucket.org/webpolis/liiv.git | PHP | 514 lines
                    
34 */
                    
35require_once CKFINDER_CONNECTOR_LIB_DIR . "/Core/ImagesConfig.php";
                    
36
                    
157     */
                    
158    private $_chmodFolders = 0755;
                    
159    /**
                    
337    {
                    
338        return $this->_chmodFiles;
                    
339    }
                    
479        if (isset($GLOBALS['config']['ChmodFiles'])) {
                    
480            $this->_chmodFiles = $GLOBALS['config']['ChmodFiles'];
                    
481        }
                    
482        if (isset($GLOBALS['config']['ChmodFolders'])) {
                    
483            $this->_chmodFolders = $GLOBALS['config']['ChmodFolders'];
                    
484        }
                    
                
DB2Statement.php https://gitlab.com/mario.uriarte/doctrine2.5-tutorial | PHP | 344 lines
                    
1<?php
                    
2/*
                    
48     */
                    
49    private $_defaultFetchMode = \PDO::FETCH_BOTH;
                    
50
                    
175     */
                    
176    public function setFetchMode($fetchMode, $arg2 = null, $arg3 = null)
                    
177    {
                    
177    {
                    
178        $this->_defaultFetchMode         = $fetchMode;
                    
179        $this->defaultFetchClass         = $arg2 ? $arg2 : $this->defaultFetchClass;
                    
197     */
                    
198    public function fetch($fetchMode = null)
                    
199    {
                    
199    {
                    
200        $fetchMode = $fetchMode ?: $this->_defaultFetchMode;
                    
201        switch ($fetchMode) {
                    
                
SummaryofOrganization.php https://gitlab.com/sdlion/nandini_151534_b35_atomic_project | PHP | 265 lines
                    
57
                    
58        $fetchMode = strtoupper($fetchMode);
                    
59        if(substr_count($fetchMode,'OBJ') > 0)
                    
74
                    
75        $fetchMode = strtoupper($fetchMode);
                    
76        if(substr_count($fetchMode,'OBJ') > 0)
                    
102        $STH->execute();
                    
103        Utility::redirect('index.php');
                    
104
                    
119
                    
120    public function trashed($fetchMode='ASSOC'){
                    
121        $sql = "SELECT * from summary where is_deleted <> '0' ";
                    
123
                    
124        $fetchMode = strtoupper($fetchMode);
                    
125        if(substr_count($fetchMode,'OBJ') > 0)
                    
                
config.php https://gitlab.com/vince.omega/mcb-nov-build | PHP | 150 lines
                    
1<?php
                    
2/*
                    
21 *
                    
22 * Configuration file for the File Manager Connector for PHP.
                    
23 */
                    
63// Note: not needed on Windows-based servers.
                    
64$Config['ChmodOnUpload'] = 0777 ;
                    
65
                    
67// Used when creating folders that does not exist.
                    
68$Config['ChmodOnFolderCreate'] = 0777 ;
                    
69
                    
                
Session_files_driver.php https://gitlab.com/gundambison/secure | PHP | 363 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP
                    
6 *
                    
124		{
                    
125			throw new Exception("Session: Configured save path '".$this->_config['save_path']."' is not writable by the PHP process.");
                    
126		}
                    
147	{
                    
148		// This might seem weird, but PHP 5.6 introduces session_reset(),
                    
149		// which re-reads session data
                    
152			// Just using fopen() with 'c+b' mode would be perfect, but it is only
                    
153			// available since PHP 5.2.6 and we have to set permissions for new files,
                    
154			// so we'd have to hack around this ...
                    
181			{
                    
182				chmod($this->_file_path.$session_id, 0600);
                    
183				$this->_fingerprint = md5('');
                    
                
tools_webftp.php git://github.com/FSB/Fire-Soft-Board-2.git | PHP | 555 lines
                    
64	 */
                    
65	public $edit_file = array('php', 'php3', 'php4', 'php5', 'htm', 'html', 'tpl', 'txt', 'css', 'js', 'xml', 'rss', 'htaccess');
                    
66	
                    
107			'submit_upload' =>		':upload_file',
                    
108			'submit_chmod' =>		':chmod_file',
                    
109			'submit_edit' =>		':submit_edit_file',
                    
113			'mode' => array(
                    
114				'highlight_php' =>	'page_php_highlight',
                    
115				'codepress' =>		'page_codepress',
                    
192			{
                    
193				$u_dir = sid('index.' . PHPEXT . '?p=tools_webftp&amp;mode=highlight_php&amp;dir=' . $this->dir . '&amp;phpfile=' . $value['name']);
                    
194			}
                    
497	{
                    
498		$phpfile = Http::request('phpfile');
                    
499		if (file_exists(ROOT . $this->dir . $phpfile))
                    
                
customize-your-store.js https://gitlab.com/yousafsyed/easternglamor | JavaScript | 194 lines
                    
32        if (!$localStorage.store) {
                    
33            $http.get('index.php/customize-your-store/default-time-zone',{'responseType' : 'json'})
                    
34                .success(function (data) {
                    
49            $scope.loading = true;
                    
50            $http.post('index.php/modules/all-modules-valid', $scope.store)
                    
51                .success(function (data) {
                    
63        if (!$scope.store.loadedAllModules) {
                    
64            $http.get('index.php/modules').success(function (data) {
                    
65                $state.loadedModules = data;
                    
76                var allModules = $scope.$state.loadedModules.modules;
                    
77                for (var eachModule in allModules) {
                    
78                    $scope.store.allModules.push(allModules[eachModule].name);
                    
78                    $scope.store.allModules.push(allModules[eachModule].name);
                    
79                    if(allModules[eachModule].selected) {
                    
80                        $scope.store.selectedModules.push(allModules[eachModule].name);
                    
                
CaptureCache.php https://gitlab.com/faisaliqbal/mytripsorter | PHP | 387 lines
                    
1<?php
                    
2/**
                    
31
                    
32            // http://php.net/manual/function.ob-start.php
                    
33            // -> If output_callback  returns FALSE original input is sent to the browser.
                    
266
                    
267        if ($perm !== false && !chmod($file, $perm)) {
                    
268            $oct = decoct($perm);
                    
269            $err = ErrorHandler::stop();
                    
270            throw new Exception\RuntimeException("chmod('{$file}', 0{$oct}) failed", 0, $err);
                    
271        }
                    
314
                    
315            if ($perm !== false && !chmod($pathname, $perm)) {
                    
316                $oct = decoct($perm);
                    
317                $err = ErrorHandler::stop();
                    
318                throw new Exception\RuntimeException("chmod('{$pathname}', 0{$oct}) failed", 0, $err);
                    
319            }
                    
                
sqlite3.php https://github.com/alejo/BAPS2.git | PHP | 395 lines
                    
10 *
                    
11 * LICENSE: This source file is subject to version 3.0 of the PHP license
                    
12 * that is available through the world-wide-web at the following URI:
                    
12 * that is available through the world-wide-web at the following URI:
                    
13 * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
                    
14 * the PHP License and are unable to obtain it through the web, please
                    
20 * @copyright  1997-2005 The PHP Group
                    
21 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0 3.0
                    
22 * @version    CVS: $Id: sqlite3.php,v 1.3 2007/04/04 14:13:19 bfleisch Exp $
                    
30/**
                    
31 * The methods PEAR DB uses to interact with PHP's sqlite extension
                    
32 * for interacting with SQLite databases
                    
185          
                    
186         case DB_FETCHMODE_OBJECT:
                    
187          return $this->RaiseError(DB_ERROR_NODBSELECTED);
                    
                
Db.php https://github.com/basdog22/Qool.git | PHP | 286 lines
                    
1<?php
                    
2
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Db.php 24594 2012-01-05 21:27:01Z matthew $
                    
21 */
                    
47     */
                    
48    const FETCH_MODE = 'fetchMode';
                    
49
                    
226             */
                    
227            require_once 'Zend/Db/Exception.php';
                    
228            throw new Zend_Db_Exception('Adapter parameters must be in an array or a Zend_Config object');
                    
237             */
                    
238            require_once 'Zend/Db/Exception.php';
                    
239            throw new Zend_Db_Exception('Adapter name must be specified in a string');
                    
261        if (!class_exists($adapterName)) {
                    
262            require_once 'Zend/Loader.php';
                    
263            Zend_Loader::loadClass($adapterName);
                    
                
file.php https://github.com/boluak/lifefm-github.git | PHP | 379 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * @version		$Id: file.php 10707 2008-08-21 09:52:47Z eddieajau $
                    
4 * @package		Joomla.Framework
                    
6 * @copyright	Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
                    
7 * @license		GNU/GPL, see LICENSE.php
                    
8 * Joomla! is free software. This version may have been modified pursuant
                    
11 * other free or open source software licenses.
                    
12 * See COPYRIGHT.php for copyright notices and details.
                    
13 */
                    
152			// on Windows, even if the parent folder is writeable
                    
153			@chmod($file, 0777);
                    
154
                    
304	 *
                    
305	 * @param string $src The name of the php (temporary) uploaded file
                    
306	 * @param string $dest The path (including filename) to move the uploaded file to
                    
                
index.php https://github.com/eosc/EosC-3.0.git | PHP | 221 lines
                    
35          <td><b>PHP Version</b></td>
                    
36          <td align="right"><?php echo PHP_VERSION; ?></td>
                    
37          <td align="right" width="25"><img src="images/<?php echo ((PHP_VERSION >= 4) ? 'tick.gif' : 'cross.gif'); ?>" border="0" width="16" height="16"></td>
                    
117
                    
118  if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php') && !is_writeable(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php')) {
                    
119    @chmod(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php', 0777);
                    
125
                    
126  if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php') && !is_writeable(osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php')) {
                    
127    $configfile_array[] = osc_realpath(dirname(__FILE__) . '/../../../includes') . '/configure.php';
                    
129
                    
130  if (file_exists(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php') && !is_writeable(osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php')) {
                    
131    $configfile_array[] = osc_realpath(dirname(__FILE__) . '/../../../admin/includes') . '/configure.php';
                    
137    if ($compat_register_globals == false) {
                    
138      $warning_array['register_globals'] = 'Compatibility with register_globals is supported from PHP 4.3+. This setting <u>must be enabled</u> due to an older PHP version being used.';
                    
139    }
                    
                
MDB2Store.php https://gitlab.com/r.collas/site_central | PHP | 413 lines
                    
1<?php
                    
2
                    
5 *
                    
6 * PHP versions 4 and 5
                    
7 *
                    
15
                    
16require_once 'MDB2.php';
                    
17
                    
20 */
                    
21require_once 'Auth/OpenID/Interface.php';
                    
22
                    
25 */
                    
26require_once 'Auth/OpenID.php';
                    
27
                    
85        // column name instead of column index.
                    
86        $this->connection->setFetchMode(MDB2_FETCHMODE_ASSOC);
                    
87        
                    
                
File.php https://bitbucket.org/moodle/moodle.git | PHP | 261 lines
                    
1<?php
                    
2
                    
19 *
                    
20 * PHP Version 5
                    
21 *
                    
21 *
                    
22 * @file     CAS/PGTStorage/AbstractStorage.php
                    
23 * @category Authentication
                    
23 * @category Authentication
                    
24 * @package  PhpCAS
                    
25 * @author   Pascal Aubry <pascal.aubry@univ-rennes1.fr>
                    
26 * @license  http://www.apache.org/licenses/LICENSE-2.0  Apache License 2.0
                    
27 * @link     https://wiki.jasig.org/display/CASC/phpCAS
                    
28 */
                    
35 * @category Authentication
                    
36 * @package  PhpCAS
                    
37 * @author   Pascal Aubry <pascal.aubry@univ-rennes1.fr>
                    
                
Db.php https://bitbucket.org/kdms/sh-magento.git | PHP | 273 lines
                    
1<?php
                    
2
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Db.php 23405 2010-11-19 19:46:10Z bittarman $
                    
21 */
                    
47     */
                    
48    const FETCH_MODE = 'fetchMode';
                    
49
                    
213             */
                    
214            #require_once 'Zend/Db/Exception.php';
                    
215            throw new Zend_Db_Exception('Adapter parameters must be in an array or a Zend_Config object');
                    
224             */
                    
225            #require_once 'Zend/Db/Exception.php';
                    
226            throw new Zend_Db_Exception('Adapter name must be specified in a string');
                    
248        if (!class_exists($adapterName)) {
                    
249            #require_once 'Zend/Loader.php';
                    
250            Zend_Loader::loadClass($adapterName);
                    
                
TestToolkit.php https://gitlab.com/reasonat/test8 | PHP | 265 lines
                    
1<?php
                    
2
                    
31  /**
                    
32   * Image type represented by a PHP IMAGETYPE_* constant (e.g. IMAGETYPE_JPEG).
                    
33   *
                    
150    $this->logCall('save', func_get_args());
                    
151    // Return false so that image_save() doesn't try to chmod the destination
                    
152    // file that we didn't bother to create.
                    
197   * @return int
                    
198   *   The image type represented by a PHP IMAGETYPE_* constant (e.g.
                    
199   *   IMAGETYPE_JPEG).
                    
205  /**
                    
206   * Sets the PHP type of the image.
                    
207   *
                    
208   * @param int $type
                    
209   *   The image type represented by a PHP IMAGETYPE_* constant (e.g.
                    
210   *   IMAGETYPE_JPEG).
                    
                
Account_Import.php https://gitlab.com/clearos/app-account-import | PHP | 320 lines
                    
1<?php
                    
2
                    
42$bootstrap = getenv('CLEAROS_BOOTSTRAP') ? getenv('CLEAROS_BOOTSTRAP') : '/usr/clearos/framework/shared';
                    
43require_once $bootstrap . '/bootstrap.php';
                    
44
                    
213            $file->chown('root', 'root'); 
                    
214            $file->chmod(600);
                    
215        } catch (File_Not_Found_Exception $e) {
                    
                
gen-exam-sql.sh https://gitlab.com/baptiste_/unix-training | Shell | 275 lines
                    
76	"--php-only")
                    
77	    php_only=yes
                    
78	    ;;
                    
116exam_install_php
                    
117exam_config_php sql > "$outdir"/php/inc/config.php
                    
118
                    
123    echo
                    
124    echo "Skipping SQL generation (--php-only in use)"
                    
125    exit 0
                    
164    echo "login = $login; session = $session; machine = $machine; first_name = $first_name; family_name = $family_name"
                    
165    studentdir="$outdir/php/subjects/$session/$machine"
                    
166    mkdir -p "$studentdir"
                    
274echo "  (there are symlinks at the toplevel to help you find these)"
                    
275echo "- php/ : PHP files to put on the server. php/inc/config.php is the configuration file."
                    
276
                    
                
Cronjob.php git://github.com/daylightstudio/FUEL-CMS.git | PHP | 265 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
23 * based on this:
                    
24 * http://www.underwaterdesign.com/2006/06/php_create_a_cron_job_with_php.php
                    
25 *
                    
152		$cron = '';
                    
153		if (!empty($this->mailto)) $cron .= "MAILTO=".$this->mailto.PHP_EOL;
                    
154		$joiner = (empty($this->mailto)) ? ">> /dev/null 2>&1" : '';
                    
154		$joiner = (empty($this->mailto)) ? ">> /dev/null 2>&1" : '';
                    
155		$cron .= implode($joiner.PHP_EOL, $this->_jobs);
                    
156		$cron .= PHP_EOL; // !!!important... for cronjobs to run, you must have this ending newline
                    
177			touch($this->cronfile); // create the file, Directory "cron" must be writeable
                    
178			chmod($this->cronfile, 0777); // make new file writeable
                    
179			$open = fopen($this->cronfile, "w"); 
                    
262
                    
263/* End of file Cronjob.php */
                    
264/* Location: ./modules/cronjob/libraries/Cronjob.php */
                    
                
Filesystem.php https://github.com/midnightwalker/site.git | PHP | 362 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Filesystem.php 18954 2009-11-12 20:01:33Z alexander $
                    
21 */
                    
24/** Zend_Search_Lucene_Storage_Directory */
                    
25require_once 'Zend/Search/Lucene/Storage/Directory.php';
                    
26
                    
118            if (file_exists($path)) {
                    
119                require_once 'Zend/Search/Lucene/Exception.php';
                    
120                throw new Zend_Search_Lucene_Exception('Path exists, but it\'s not a directory');
                    
122                if (!self::mkdirs($path)) {
                    
123                    require_once 'Zend/Search/Lucene/Exception.php';
                    
124                    throw new Zend_Search_Lucene_Exception("Can't create directory '$path'.");
                    
182        unset($this->_fileHandlers[$filename]);
                    
183        require_once 'Zend/Search/Lucene/Storage/File/Filesystem.php';
                    
184        $this->_fileHandlers[$filename] = new Zend_Search_Lucene_Storage_File_Filesystem($this->_dirPath . '/' . $filename, 'w+b');
                    
                
functions_styles.php https://gitlab.com/bulwye/reliquerunt | PHP | 324 lines
                    
1<?php
                    
2/***************************************************************************
                    
2/***************************************************************************
                    
3 * Module           : PNphpBB2 (The forum for Postnuke)
                    
4 * Filename         : functions_styles.php
                    
6 * Original file by : Carl Slaughter
                    
7 * Copyright        : (C) 2003 The PNphpBB Group
                    
8 * Contact          : support@pnphpbb.com
                    
8 * Contact          : support@pnphpbb.com
                    
9 *                  : http://www.pnphpbb.com
                    
10 *
                    
10 *
                    
11 * $Id: functions_styles.php,v 1.6 2004/10/18 19:47:28 carls Exp $
                    
12 *
                    
23
                    
24if ( !defined('IN_PHPBB') )
                    
25{
                    
                
Ftp.php https://gitlab.com/ablu/invertika-backup-web | PHP | 617 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 4.3.2 or newer
                    
6 *
                    
220		{
                    
221			$this->chmod($path, (int)$permissions);
                    
222		}
                    
274		{
                    
275			$this->chmod($rempath, (int)$permissions);
                    
276		}
                    
418	 */
                    
419	function chmod($path, $perm)
                    
420	{
                    
425
                    
426		// Permissions can only be set when running PHP 5
                    
427		if ( ! function_exists('ftp_chmod'))
                    
                
install.php https://gitlab.com/e0/X2CRM | PHP | 95 lines
                    
2  'required but missing' => '필요하지만 누락',
                    
3  'Your server\'s PHP version' => '서버의 \\ &#39;의 PHP 버전',
                    
4  'version 5.3 or later is required' => '버전 5.3 이상이 필요합니다',
                    
25  'This directory is not writable by PHP processes run by the webserver.' => '이 디렉토리는 웹 서버에 의해 실행 PHP 프로세스에 의해 쓸 수 없습니다.',
                    
26  'PHP scripts are not permitted to run the function "chmod".' => 'PHP 스크립트는 함수 &quot;chmod를&quot;를 실행 할 수 없습니다.',
                    
27  'Time zone widget will not work' => '시간대 위젯이 작동하지 않습니다',
                    
29  'Built-in error reporter will not work' => '내장 된 오류 기자가 작동하지 않습니다',
                    
30  'The PHP configuration option "allow_url_fopen" is disabled. CURL will be used for making all HTTP requests during updates.' => 'PHP 구성 옵션 &quot;allow_url_fopen을&quot;이 비활성화되어 있습니다. CURL을 업데이트하는 동안 모든 HTTP 요청을 만드는 데 사용됩니다.',
                    
31  'This will result in the inability to import and export custom modules.' => '이 사용자 정의 모듈을 가져오고 내보낼 수 없게됩니다.',
                    
33  'All other essential requirements were met.' => '다른 모든 필수 요구 사항을 충족 하였다.',
                    
34  'The version of the PCRE library included in this build of PHP is {thisVer}, but {reqVer} or later is required.' => 'PHP의이 빌드에 포함 된 PCRE 라이브러리의 버전은 {thisVer} 하지만, {reqVer} 이상 이상이 필요합니다.',
                    
35  'The "openssl" and "mcrypt" libraries are not available. If any application credentials (i.e. email account passwords) are entered into X2Engine, they  will be stored in the database in plain text (without any encryption whatsoever). Thus, if the database is ever compromised, those passwords will be readable by unauthorized parties.' => '&quot;OpenSSL을&quot;과 &quot;Mcrypt 라이브러리&quot;라이브러리는 사용할 수 없습니다. 모든 응용 프로그램 자격 증명 (예 : 전자 메일 계정 암호가) X2Engine에 입력하면, 그들은 일반 텍스트 데이터베이스 (어떠한 암호화없이)에 저장됩니다. 데이터베이스도 손상된 경우 따라서, 이러한 암호는 무단으로 읽을 수 있습니다.',
                    
36  'This webserver can run X2Engine!' => '이 웹 서버는 X2Engine 실행할 수 있습니다!',
                    
37  'Permissions and/or ownership of uploaded files do not permit PHP processes run by the webserver to write files.' => '권한 및 / 또는 업로드 한 파일의 소유권 파일을 작성하는 웹 서버에 의해 실행 PHP 프로세스를 허용하지 않습니다.',
                    
38  'Security captchas will not work, and the media module will not be able to detect or display the dimensions of uploaded images.' => '보안 보안 문자가 작동하지 않습니다, 미디어 모듈은 업로드 된 이미지의 크기를 감지하거나 표시 할 수 없습니다.',
                    
                
StatementPrefetch.php https://gitlab.com/reasonat/test8 | PHP | 537 lines
                    
1<?php
                    
2
                    
144        // the constructor is run. See https://www.drupal.org/node/315092.
                    
145        $this->setFetchMode(\PDO::FETCH_CLASS, $options['fetch']);
                    
146      }
                    
147      else {
                    
148        $this->setFetchMode($options['fetch']);
                    
149      }
                    
235   */
                    
236  public function setFetchMode($mode, $a1 = NULL, $a2 = array()) {
                    
237    $this->defaultFetchStyle = $mode;
                    
262   * array position in $this->data and format it according to $this->fetchStyle
                    
263   * and $this->fetchMode.
                    
264   *
                    
379
                    
380      // Reset the fetch parameters to the value stored using setFetchMode().
                    
381      $this->fetchStyle = $this->defaultFetchStyle;
                    
                
View.php https://gitlab.com/NecroMan/yii2-minify | PHP | 473 lines
                    
1<?php
                    
2
                    
50
                    
51    /** @var int|bool chmod of minified file. If false chmod not set */
                    
52    public $fileMode = 0664;
                    
227            if (false !== $this->fileMode) {
                    
228                @chmod($resultFile, $this->fileMode);
                    
229            }
                    
292                $file = \Yii::getAlias($this->basePath) . str_replace(\Yii::getAlias($this->webPath), '', $file);
                    
293                $js .= file_get_contents($file) . ';' . PHP_EOL;
                    
294            }
                    
303            if (false !== $this->fileMode) {
                    
304                @chmod($resultFile, $this->fileMode);
                    
305            }
                    
445
                    
446            $result .= $string . PHP_EOL;
                    
447        }
                    
                
MaildirFolderTest.php https://github.com/bhaumik25/zend-framework.git | PHP | 438 lines
                    
12 */
                    
13require_once 'Zend/Mail/Storage/Folder/Maildir.php';
                    
14
                    
20/**
                    
21 * PHPUnit test case
                    
22 */
                    
22 */
                    
23require_once 'PHPUnit/Framework/TestCase.php';
                    
24
                    
251
                    
252            // explicit call of __toString() needed for PHP < 5.2
                    
253            $found_folders[$folder->__toString()] = $localName;
                    
271
                    
272            // explicit call of __toString() needed for PHP < 5.2
                    
273            $found_folders[$folder->__toString()] = $localName;
                    
                
upload.php https://gitlab.com/cdix/mirum-app | PHP | 277 lines
                    
1<?php
                    
2if (!isset($config)){
                    
2if (!isset($config)){
                    
3  $config = include 'config/config.php';
                    
4  //TODO switch to array
                    
6}
                    
7include 'include/utils.php';
                    
8
                    
14
                    
15include 'include/mime_type_lib.php';
                    
16
                    
60	if ($path == $current_path) $cycle = FALSE;
                    
61	if (file_exists($path."config.php"))
                    
62	{
                    
157			if(isset($image_watermark) && $image_watermark){
                    
158				require_once('include/php_image_magician.php');
                    
159
                    
                
RecordFinder.php https://gitlab.com/gideonmarked/PLCPortal | PHP | 297 lines
                    
1<?php namespace Backend\FormWidgets;
                    
2
                    
76     */
                    
77    public $searchMode;
                    
78
                    
120            'conditions',
                    
121            'searchMode',
                    
122            'searchScope',
                    
263        $widget->setSearchOptions([
                    
264            'mode' => $this->searchMode,
                    
265            'scope' => $this->searchScope,
                    
                
class-wp-filesystem-ftpext.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 387 lines
                    
148	}
                    
149	function chmod($file, $mode = false, $recursive = false) {
                    
150		if ( ! $mode ) {
                    
151			if ( $this->is_file($file) )
                    
152				$mode = FS_CHMOD_FILE;
                    
153			elseif ( $this->is_dir($file) )
                    
158
                    
159		// chmod any sub-objects if recursive.
                    
160		if ( $recursive && $this->is_dir($file) ) {
                    
165
                    
166		// chmod the file or directory
                    
167		if ( ! function_exists('ftp_chmod') )
                    
251			return false;
                    
252		$this->chmod($path, $chmod);
                    
253		if ( $chown )
                    
                
install.lang.php https://bitbucket.org/speedealing/speedealing.git | PHP | 116 lines
                    
37		'MoreInformation' => 'More information',
                    
38		'PHPVersion' => 'PHP versie',
                    
39		'PHPGD' => 'PHP GD',
                    
41		'PHPCurl' => 'PHP Curl',
                    
42		'PHPSupportCurl' => 'This PHP support CURL functions.',
                    
43		'PHPMemcached' => 'PHP Mecached',
                    
44		'PHPSupportMemcached' => 'This PHP support Memcached functions.',
                    
45		'PHPMemoryLimit' => 'PHP memory',
                    
46		'PHPMemoryOK' => 'Uw PHP max. session geheugen is ingesteld op <b>%s</b>. Dit moet genoeg zijn.',
                    
46		'PHPMemoryOK' => 'Uw PHP max. session geheugen is ingesteld op <b>%s</b>. Dit moet genoeg zijn.',
                    
47		'PHPMemoryTooLow' => 'Uw PHP max. session geheugen is ingesteld op <b>%s</b> bytes. Dit zal te laag zijn. Verander uw <b>php.ini</b> om <b>memory_limit</b> parameter in te stellen naar ten minste <b>%s</b> bytes.',
                    
48		'CouchDB' => 'CouchDB',
                    
50		'CouchDBProxyPassDescription' => '',
                    
51		'ErrorPHPDoesNotSupportGD' => 'Uw PHP installatie biedt geen ondersteuning voor grafische functie GD. Geen grafiek zal beschikbaar zijn.',
                    
52		'ErrorPHPDoesNotSupportCurl' => 'Your PHP installation does not support CURL functions. This is necessary to interact with the database.',
                    
                
install.php https://gitlab.com/e0/X2CRM | PHP | 95 lines
                    
2  'required but missing' => 'nécessaire, mais manquant',
                    
3  'Your server\'s PHP version' => 'Votre serveur PHP version',
                    
4  'version 5.3 or later is required' => 'version 5.3 ou ultérieure est requis',
                    
25  'This directory is not writable by PHP processes run by the webserver.' => 'Ce répertoire n&#39;est pas accessible en écriture par processus PHP gérés par le serveur web.',
                    
26  'PHP scripts are not permitted to run the function "chmod".' => 'Scripts PHP ne sont pas autorisées à exécuter la fonction &quot;chmod&quot;.',
                    
27  'Time zone widget will not work' => 'widget fuseau horaire ne fonctionnera pas',
                    
29  'Built-in error reporter will not work' => 'Construit en erreur journaliste ne fonctionnera pas',
                    
30  'The PHP configuration option "allow_url_fopen" is disabled. CURL will be used for making all HTTP requests during updates.' => 'L&#39;option de configuration &quot;allow_url_fopen&quot; PHP est désactivée. CURL sera utilisé pour la fabrication de toutes les requêtes HTTP au cours de mises à jour.',
                    
31  'This will result in the inability to import and export custom modules.' => 'Cela se traduira par l&#39;impossibilité d&#39;importer et d&#39;exporter des modules personnalisés.',
                    
33  'All other essential requirements were met.' => 'Toutes les autres exigences essentielles sont remplies.',
                    
34  'The version of the PCRE library included in this build of PHP is {thisVer}, but {reqVer} or later is required.' => 'La version de la bibliothèque PCRE inclus dans cette version de PHP est {thisVer} , mais {reqVer} ou ultérieure est nécessaire.',
                    
35  'The "openssl" and "mcrypt" libraries are not available. If any application credentials (i.e. email account passwords) are entered into X2Engine, they  will be stored in the database in plain text (without any encryption whatsoever). Thus, if the database is ever compromised, those passwords will be readable by unauthorized parties.' => 'Le &quot;openssl&quot; et &quot;bibliothèques mcrypt&quot; ne sont pas disponibles. Si les informations d&#39;identification de l&#39;application (par exemple, les mots de passe de compte de messagerie) sont entrés dans X2Engine, ils seront stockés dans la base de données en texte clair (sans cryptage que ce soit). Ainsi, si la base de données est compromise, ces mots de passe pourront être lus par des tiers non autorisés.',
                    
36  'This webserver can run X2Engine!' => 'Ce serveur peut fonctionner X2Engine!',
                    
37  'Permissions and/or ownership of uploaded files do not permit PHP processes run by the webserver to write files.' => 'Autorisations et / ou de la propriété des fichiers téléchargés ne permettent pas des processus PHP gérés par le serveur web d&#39;écrire des fichiers.',
                    
38  'Security captchas will not work, and the media module will not be able to detect or display the dimensions of uploaded images.' => 'Captchas de sécurité ne fonctionnent pas, et le module médias ne seront pas en mesure de détecter ou d&#39;afficher les dimensions de vos images téléchargées.',
                    
                
class.hooks.php https://github.com/Dykam/Garden.git | PHP | 202 lines
                    
1<?php if (!defined('APPLICATION')) exit();
                    
2/*
                    
91	public function SearchController_Search_Handler($Sender) {
                    
92		include_once(dirname(__FILE__).DS.'..'.DS.'models'.DS.'class.vanillasearchmodel.php');
                    
93		$SearchModel = new VanillaSearchModel();
                    
93		$SearchModel = new VanillaSearchModel();
                    
94		$SearchModel->Search($Sender->SearchModel);
                    
95	}
                    
189      $Explicit = TRUE;
                    
190      $Validation = new Gdn_Validation(); // This is going to be needed by structure.php to validate permission names
                    
191      include(PATH_APPLICATIONS . DS . 'vanilla' . DS . 'settings' . DS . 'structure.php');
                    
193      $ApplicationInfo = array();
                    
194      include(CombinePaths(array(PATH_APPLICATIONS . DS . 'vanilla' . DS . 'settings' . DS . 'about.php')));
                    
195      $Version = ArrayValue('Version', ArrayValue('Vanilla', $ApplicationInfo, array()), 'Undefined');
                    
                
page.admin.dirSettings.tmpl https://github.com/deadeyes/torrentflux.git | Go Template | 416 lines
                    
7<div id="content">
                    
8	<form name="theForm" action="admin.php?op=updateDirSettings" method="post" onsubmit="return validateSettings('dir')">
                    
9		<div id="upload">
                    
60					<td class="settingsTitle">
                    
61						<label for="dir_enable_chmod">Chmod</label>
                    
62					</td>
                    
63					<td class="settingsSetting" rowspan="2">
                    
64						<select name="dir_enable_chmod" id="dir_enable_chmod">
                    
65							<option value="1">True</option>
                    
66							<option value="0"
                    
67							<tmpl_if name="dir_enable_chmod" value="0">
                    
68								 selected
                    
75					<td class="settingsText">
                    
76						Enable/disable the use of the chmod functionality for regular torrentflux-b4rt users - when enabled, users will be able to change the permissions on files and folders in torrentflux-b4rt to read/write/execute for everyone (777).
                    
77					</td>
                    
                
BinaryInstaller.php https://gitlab.com/imamul68e/137619_PHP31 | PHP | 212 lines
                    
1<?php
                    
2
                    
75                    // is a fresh install of the vendor.
                    
76                    Silencer::call('chmod', $link, 0777 & ~umask());
                    
77                }
                    
92            }
                    
93            Silencer::call('chmod', $link, 0777 & ~umask());
                    
94        }
                    
130            $this->installUnixyProxyBinaries($binPath, $link);
                    
131            @chmod($link, 0777 & ~umask());
                    
132            $link .= '.bat';
                    
171            } else {
                    
172                $caller = 'php';
                    
173            }
                    
195if command -v 'cygpath' >/dev/null 2>&1; then
                    
196	# Cygwin paths start with /cygdrive/ which will break windows PHP,
                    
197	# so we need to translate the dir path to windows format. However
                    
                
dbx.php https://github.com/edmondscommerce/XAMPP-Magento-Demo-Site.git | PHP | 302 lines
                    
1<?php
                    
2// +----------------------------------------------------------------------+
                    
4// +----------------------------------------------------------------------+
                    
5// | Copyright (c) 1997-2003 The PHP Group                                |
                    
6// +----------------------------------------------------------------------+
                    
6// +----------------------------------------------------------------------+
                    
7// | This source file is subject to version 2.0 of the PHP license,       |
                    
8// | that is bundled with this package in the file LICENSE, and is        |
                    
9// | available at through the world-wide-web at                           |
                    
10// | http://www.php.net/license/2_02.txt.                                 |
                    
11// | If you did not receive a copy of the PHP license and are unable to   |
                    
12// | obtain it through the world-wide-web, please send a note to          |
                    
13// | license@php.net so we can mail you a copy immediately.               |
                    
14// +----------------------------------------------------------------------+
                    
135            //not implemented yet in dbx
                    
136            //$this->db->setFetchMode(DB_FETCHMODE_ASSOC);
                    
137        }
                    
                
Sqlsrv.php https://github.com/ramonornela/trilhas.git | PHP | 440 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Sqlsrv.php 23486 2010-12-10 04:05:30Z mjh_ca $
                    
21 */
                    
25 */
                    
26require_once 'Zend/Db/Statement.php';
                    
27
                    
28/**
                    
29 * Extends for Microsoft SQL Server Driver for PHP
                    
30 *
                    
68        if (!$this->_stmt) {
                    
69            require_once 'Zend/Db/Statement/Sqlsrv/Exception.php';
                    
70            throw new Zend_Db_Statement_Sqlsrv_Exception(sqlsrv_errors());
                    
79     * @param mixed $parameter Name the parameter, either integer or string.
                    
80     * @param mixed $variable  Reference to PHP variable containing the value.
                    
81     * @param mixed $type      OPTIONAL Datatype of SQL parameter.
                    
                
Pdo.php https://github.com/sitengine/sitengine.git | PHP | 433 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Mysqli.php 4874 2007-05-19 01:26:32Z bkarwin $
                    
21 */
                    
25 */
                    
26require_once 'Zend/Db/Statement.php';
                    
27
                    
52     */
                    
53    protected $_fetchMode = PDO::FETCH_ASSOC;
                    
54
                    
66        } catch (PDOException $e) {
                    
67            require_once 'Zend/Db/Statement/Exception.php';
                    
68            throw new Zend_Db_Statement_Exception($e->getMessage());
                    
72    /**
                    
73     * Bind a column of the statement result set to a PHP variable.
                    
74     *
                    
                
grid.custom.js https://github.com/minikermit/finapp.git | JavaScript | 437 lines
                    
6 * Dual licensed under the MIT and GPL licenses:
                    
7 * http://www.opensource.org/licenses/mit-license.php
                    
8 * http://www.gnu.org/licenses/gpl.html
                    
68					$("#delmod"+gid).remove();
                    
69					$("#srchmod"+gid).remove();
                    
70				} catch (_) {}
                    
94				$("#delmod"+gid).remove();
                    
95				$("#srchmod"+gid).remove();
                    
96			} catch (_) {}
                    
                
build_thirdparty.sh https://gitlab.com/s9perween/Impala | Shell | 236 lines
                    
129    ./configure --with-pic --prefix=${THRIFT_HOME} \
                    
130    --with-php=no --with-java=no --with-perl=no --with-erlang=no \
                    
131    --with-ruby=no --with-haskell=no --with-erlang=no --with-d=no \
                    
135  cd ${THRIFT_SRC_DIR}/contrib/fb303
                    
136  chmod 755 ./bootstrap.sh
                    
137  ./bootstrap.sh
                    
137  ./bootstrap.sh
                    
138  chmod 755 configure
                    
139  CPPFLAGS="-I${THRIFT_HOME}/include" PY_PREFIX=${THRIFT_HOME}/python ./configure \
                    
                
Config.php https://gitlab.com/LisovyiEvhenii/ismextensions | PHP | 191 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright  Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
                    
24 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
107        file_put_contents($this->_localConfigFile, $template);
                    
108        chmod($this->_localConfigFile, 0777);
                    
109    }
                    
150        try {
                    
151            $client = new Varien_Http_Client($url . 'index.php/' . $prefix);
                    
152            $response = $client->request('GET');
                    
                
file.php https://gitlab.com/endomorphosis/greenrenaissancejoomla | PHP | 380 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * @version		$Id: file.php 9764 2007-12-30 07:48:11Z ircmaxell $
                    
4 * @package		Joomla.Framework
                    
6 * @copyright	Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
                    
7 * @license		GNU/GPL, see LICENSE.php
                    
8 * Joomla! is free software. This version may have been modified pursuant
                    
11 * other free or open source software licenses.
                    
12 * See COPYRIGHT.php for copyright notices and details.
                    
13 */
                    
153			// on Windows, even if the parent folder is writeable
                    
154			@chmod($file, 0777);
                    
155
                    
305	 *
                    
306	 * @param string $src The name of the php (temporary) uploaded file
                    
307	 * @param string $dest The path (including filename) to move the uploaded file to
                    
                
DataTest.php https://gitlab.com/yousafsyed/easternglamor | PHP | 222 lines
                    
1<?php
                    
2/**
                    
14
                    
15class DataTest extends \PHPUnit_Framework_TestCase
                    
16{
                    
35            'Magento\Framework\DB\Statement\Pdo\Mysql',
                    
36            ['setFetchMode', 'getIterator'],
                    
37            [],
                    
132     * @return array
                    
133     * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
                    
134     */
                    
                
config.php https://gitlab.com/phamngsinh/baitaplon_sinhvien | PHP | 148 lines
                    
1<?php
                    
2/*
                    
21 *
                    
22 * Configuration file for the File Manager Connector for PHP.
                    
23 */
                    
27
                    
28require_once(dirname(__FILE__). '/../../../../../../wp-config.php');
                    
29require_once(dirname(__FILE__). '/../../../ckeditor_class.php');
                    
58// Note: not needed on Windows-based servers.
                    
59$Config['ChmodOnUpload'] = 0644 ;
                    
60
                    
62// Used when creating folders that does not exist.
                    
63$Config['ChmodOnFolderCreate'] = 0755 ;
                    
64
                    
                
ProjectTask.php https://gitlab.com/manuperazafa/elsartenbackend | PHP | 448 lines
                    
4 *
                    
5 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
                    
6 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
12 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
                    
13 * @link          http://cakephp.org CakePHP(tm) Project
                    
14 * @since         CakePHP(tm) v 1.2
                    
129				$this->err(__d('cake_console', 'Could not set permissions on %s', $path . DS . 'tmp'));
                    
130				$this->out('chmod -R 0777 ' . $path . DS . 'tmp');
                    
131				$success = false;
                    
142/**
                    
143 * Checks PHP's include_path for CakePHP.
                    
144 *
                    
412					'Configure::write(\'Routing.prefixes\', array(\'admin\'))',
                    
413					'/app/Config/core.php'));
                    
414				return $this->_stop();
                    
                
Serializer.php https://bitbucket.org/ngmares/moodle.git | PHP | 191 lines
                    
110            }
                    
111            $chmod = $chmod & 0666;
                    
112            chmod($file, $chmod);
                    
167                // we can chmod it ourselves
                    
168                $chmod = $chmod | 0700;
                    
169                if (chmod($dir, $chmod)) return true;
                    
170            } elseif (filegroup($dir) === posix_getgid()) {
                    
171                $chmod = $chmod | 0070;
                    
172            } else {
                    
174                // need to give global permissions
                    
175                $chmod = $chmod | 0777;
                    
176            }
                    
177            trigger_error('Directory '.$dir.' not writable, '.
                    
178                'please chmod to ' . decoct($chmod),
                    
179                E_USER_WARNING);
                    
                
Adapter.php https://gitlab.com/habracoder/advertising | PHP | 461 lines
                    
1<?php 
                    
2
                    
70		 * @param string $sqlQuery
                    
71		 * @param int $fetchMode
                    
72		 * @param array $bindParams
                    
75		 */
                    
76		public function fetchOne($sqlQuery, $fetchMode=null, $bindParams=null, $bindTypes=null){ }
                    
77
                    
96		 * @param string $sqlQuery
                    
97		 * @param int $fetchMode
                    
98		 * @param array $bindParams
                    
101		 */
                    
102		public function fetchAll($sqlQuery, $fetchMode=null, $bindParams=null, $bindTypes=null){ }
                    
103
                    
                
admintemplate.php http://kandidat-cms.googlecode.com/svn/trunk/ | PHP | 140 lines
                    
12	<script type="text/javascript" src="<?php echo $prefflp;?>/js/jquery.ui.datepicker-ru.js"></script>
                    
13	<link rel="stylesheet" href="<?php echo $prefflp;?>/js/ui-themes/smoothness/jquery-ui.custom.css" type="text/css" media="screen" charset="utf-8">
                    
14	<!-- elRTE -->
                    
53										<li><a href="templateeditor.php">???????? ????????</a></li>
                    
54										<li><a href="elfinder.php">???????? ????????</a></li>
                    
55										<li><a href="counterarea.php">???? counter</a></li>
                    
67										<ul>
                    
68										<li><a href="news.php">????? ????????</a></li>
                    
69										<li><a href="addnews.php">???????? ???????</a></li>
                    
92										<ul>
                    
93										<li><a href="chmod.php">????????? ????</a></li>
                    
94										<li><a href="convert.php">??????????? ? utf8</a></li>
                    
100										<ul>
                    
101										<li><a href="info.php">???? ? ?????????? PHP</a></li>
                    
102										<li><a href="help.php">?????? ??????</a></li>
                    
                
class-wp-image-editor-imagick.php https://gitlab.com/Gashler/dp | PHP | 477 lines
                    
1<?php
                    
2/**
                    
9/**
                    
10 * WordPress Image Editor Class for Image Manipulation through Imagick PHP Module
                    
11 *
                    
45
                    
46		if ( version_compare( phpversion( 'imagick' ), '2.2.0', '<' ) )
                    
47			return false;
                    
121
                    
122		// Even though Imagick uses less PHP memory than GD, set higher limit for users that have low PHP.ini limits
                    
123		@ini_set( 'memory_limit', apply_filters( 'image_memory_limit', WP_MAX_MEMORY_LIMIT ) );
                    
436		$perms = $stat['mode'] & 0000666; //same permissions as parent folder, strip off the executable bits
                    
437		@ chmod( $filename, $perms );
                    
438
                    
                
Mysqli.php https://gitlab.com/luisrepo/ClienteWS | PHP | 362 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Mysqli.php 23775 2011-03-01 17:25:24Z ralph $
                    
21 */
                    
26 */
                    
27require_once 'Zend/Db/Statement.php';
                    
28
                    
75             */
                    
76            require_once 'Zend/Db/Statement/Mysqli/Exception.php';
                    
77            throw new Zend_Db_Statement_Mysqli_Exception("Mysqli prepare error: " . $mysqli->error, $mysqli->errno);
                    
84     * @param mixed $parameter Name the parameter, either integer or string.
                    
85     * @param mixed $variable  Reference to PHP variable containing the value.
                    
86     * @param mixed $type      OPTIONAL Datatype of SQL parameter.
                    
212             */
                    
213            require_once 'Zend/Db/Statement/Mysqli/Exception.php';
                    
214            throw new Zend_Db_Statement_Mysqli_Exception("Mysqli statement execute error : " . $this->_stmt->error, $this->_stmt->errno);
                    
                
ImageTest.php https://gitlab.com/mohamed_hussein/prodt | PHP | 482 lines
                    
1<?php
                    
2
                    
59   *
                    
60   * @return \PHPUnit\Framework\MockObject\MockObject
                    
61   */
                    
78   *
                    
79   * @return \PHPUnit\Framework\MockObject\MockObject
                    
80   */
                    
218    $file_system = $this->prophesize(FileSystemInterface::class);
                    
219    $file_system->chmod($this->image->getSource())
                    
220      ->willReturn(TRUE);
                    
249   */
                    
250  public function testChmodFails() {
                    
251    $this->getTestImage();
                    
263    $file_system = $this->prophesize(FileSystemInterface::class);
                    
264    $file_system->chmod($this->image->getSource())
                    
265      ->willReturn(FALSE);
                    
                
Log.php https://gitlab.com/betanurlaila/UI_onlineshop | PHP | 247 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP
                    
6 *
                    
119		$this->_file_ext = (isset($config['log_file_extension']) && $config['log_file_extension'] !== '')
                    
120			? ltrim($config['log_file_extension'], '.') : 'php';
                    
121
                    
181			$newfile = TRUE;
                    
182			// Only add protection to php files
                    
183			if ($this->_file_ext === 'php')
                    
184			{
                    
185				$message .= "<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>\n\n";
                    
186			}
                    
223		{
                    
224			chmod($filepath, $this->_file_permissions);
                    
225		}
                    
                
file_functions.php https://gitlab.com/protoneutron/xbtbb3cker | PHP | 416 lines
                    
25//From /includes/functions.php
                    
26function phpbb_chmod($filename, $perms = CHMOD_READ)
                    
27{
                    
48			// Determine owner/group of common.php file and the filename we want to change here
                    
49			$common_php_owner = @fileowner($phpbb_root_path . 'common.' . $phpEx);
                    
50			$common_php_group = @filegroup($phpbb_root_path . 'common.' . $phpEx);
                    
56			// If we are unable to get owner/group, then do not try to set them by guessing
                    
57			if (!$php_uid || empty($php_gids) || !$common_php_owner || !$common_php_group)
                    
58			{
                    
153
                    
154			if ((!($perms & CHMOD_READ) || is_readable($filename)) && (!($perms & CHMOD_WRITE) || phpbb_is_writable($filename)))
                    
155			{
                    
163
                    
164			if ((!($perms & CHMOD_READ) || is_readable($filename)) && (!($perms & CHMOD_WRITE) || phpbb_is_writable($filename)))
                    
165			{
                    
                
storage.php https://gitlab.com/BeS/io.schiessle.org | PHP | 506 lines
                    
1<?php
                    
2
                    
12 * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
                    
13 * the PHP License and are unable to obtain it through the web, please
                    
14 * send a note to license@php.net so we can mail you a copy immediately.
                    
17 * @package    DB
                    
18 * @author     Stig Bakken <stig@php.net>
                    
19 * @copyright  1997-2007 The PHP Group
                    
19 * @copyright  1997-2007 The PHP Group
                    
20 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
                    
21 * @version    CVS: $Id$
                    
21 * @version    CVS: $Id$
                    
22 * @link       http://pear.php.net/package/DB
                    
23 */
                    
39 * @copyright  1997-2007 The PHP Group
                    
40 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
                    
41 * @version    Release: 1.8.2
                    
                
zip.php https://gitlab.com/Gashler/sg | PHP | 150 lines
                    
1<?php
                    
2defined('WYSIJA') or die('Restricted access');
                    
55
                    
56        // PHP4-compat - php4 classes can't contain constants
                    
57        $zopen = $z->open($file, 4); // -- ZIPARCHIVE::CHECKCONS = 4
                    
82
                    
83            if(file_exists(ABSPATH . 'wp-admin/includes/class-pclzip.php')) require_once(ABSPATH . 'wp-admin/includes/class-pclzip.php');
                    
84
                    
108                    $to=str_replace("/",DS,$to);
                    
109                    if(file_exists($to))  chmod($to,0777);
                    
110
                    
112                    if(is_dir($to) ){
                    
113                        //$this->error($to.' is dir with chmod '.substr(sprintf('%o', fileperms($to)), -4));
                    
114                        if(!mkdir($filedest,0777)){
                    
124                    
                    
125                    if(file_exists($filedest))  chmod($filedest,0777);
                    
126                    continue;
                    
                
Generator.php https://gitlab.com/I-NOZex/quiz | PHP | 164 lines
                    
1<?php
                    
2namespace schmunk42\giiant\generators\test;
                    
40     */
                    
41    public $searchModelClass = "";
                    
42
                    
63    {
                    
64        return ['unit.php'];
                    
65    }
                    
136        //TODO: Add unit tests for search model
                    
137        //if($this->searchModelClass !=="")
                    
138        //{
                    
157            $files[] = new CodeFile(
                    
158                Yii::getAlias('@app/..'. $this->codeceptionPath . str_replace('\\', '/', $this->ns)) . '/' . $className . $this->baseClassSuffix . 'UnitTest.php',
                    
159                $this->render('unit.php', $params)
                    
                
storage.php https://gitlab.com/virtualrealms/d7civicrm | PHP | 506 lines
                    
1<?php
                    
2
                    
9 *
                    
10 * LICENSE: This source file is subject to version 3.0 of the PHP license
                    
11 * that is available through the world-wide-web at the following URI:
                    
12 * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
                    
13 * the PHP License and are unable to obtain it through the web, please
                    
14 * send a note to license@php.net so we can mail you a copy immediately.
                    
17 * @package    DB
                    
18 * @author     Stig Bakken <stig@php.net>
                    
19 * @copyright  1997-2007 The PHP Group
                    
19 * @copyright  1997-2007 The PHP Group
                    
20 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
                    
21 * @version    CVS: $Id: storage.php,v 1.24 2007/08/12 05:27:25 aharvey Exp $
                    
39 * @copyright  1997-2007 The PHP Group
                    
40 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
                    
41 * @version    Release: 1.7.13
                    
                
Iterator.php https://github.com/edmondscommerce/XAMPP-Magento-Demo-Site.git | PHP | 259 lines
                    
1<?php
                    
2// +----------------------------------------------------------------------+
                    
2// +----------------------------------------------------------------------+
                    
3// | PHP version 5                                                        |
                    
4// +----------------------------------------------------------------------+
                    
9// | MDB2 is a merge of PEAR DB and Metabases that provides a unified DB  |
                    
10// | API as well as database abstraction for PHP applications.            |
                    
11// | This LICENSE is in the BSD license style.                            |
                    
44//
                    
45// $Id: Iterator.php,v 1.22 2006/05/06 14:03:41 lsmith Exp $
                    
46
                    
64     */
                    
65    public function __construct($result, $fetchmode = MDB2_FETCHMODE_DEFAULT)
                    
66    {
                    
67        $this->result = $result;
                    
68        $this->fetchmode = $fetchmode;
                    
69    }
                    
                
Filesystem.php https://bitbucket.org/babanesma/mysimpleadmin.git | PHP | 363 lines
                    
1<?php
                    
2/**
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
20 * @version    $Id: Filesystem.php 23964 2011-05-03 14:20:58Z adamlundrigan $
                    
21 */
                    
24/** Zend_Search_Lucene_Storage_Directory */
                    
25require_once 'Zend/Search/Lucene/Storage/Directory.php';
                    
26
                    
118            if (file_exists($path)) {
                    
119                require_once 'Zend/Search/Lucene/Exception.php';
                    
120                throw new Zend_Search_Lucene_Exception('Path exists, but it\'s not a directory');
                    
122                if (!self::mkdirs($path)) {
                    
123                    require_once 'Zend/Search/Lucene/Exception.php';
                    
124                    throw new Zend_Search_Lucene_Exception("Can't create directory '$path'.");
                    
182        unset($this->_fileHandlers[$filename]);
                    
183        require_once 'Zend/Search/Lucene/Storage/File/Filesystem.php';
                    
184        $this->_fileHandlers[$filename] = new Zend_Search_Lucene_Storage_File_Filesystem($this->_dirPath . '/' . $filename, 'w+b');
                    
                
README.md https://gitlab.com/4gdevs/online-class-record-system | Markdown | 168 lines
                    
12
                    
13PsySH is a runtime developer console, interactive debugger and [REPL](http://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) for PHP. Learn more at [psysh.org](http://psysh.org/). Check out the [Interactive Debugging in PHP talk from OSCON](https://presentate.com/bobthecow/talks/php-for-pirates) on Presentate.
                    
14
                    
45
                    
46While PsySH strives to detect the right settings automatically, you might want to configure it yourself. Just add a file to `~/.config/psysh/config.php` (or `C:\Users\{USER}\AppData\Roaming\PsySH\config.php` on Windows):
                    
47
                    
101        // Given a string of PHP code, it pretty-prints the
                    
102        // [PHP Parser](https://github.com/nikic/PHP-Parser) parse tree. It
                    
103        // prolly won't be super useful for most of you, but it's there if you
                    
137
                    
138The PsySH `doc` command is great for documenting source code, but you'll need a little something extra for PHP core documentation. Download one of the following PHP Manual files and drop it in `~/.local/share/psysh/` (or `C:\Users\{USER}\AppData\Roaming\PsySH\` on Windows):
                    
139
                    
166 * Symfony2: [`psymf`](https://github.com/navitronic/psymf), [sf2-psysh-bootstrap](https://github.com/varas/sf2-psysh-bootstrap), [symfony-repl](https://github.com/luxifer/symfony-repl), [PsyshBundle](https://github.com/theofidry/PsyshBundle)
                    
167 * WordPress: [`wp-cli shell`](https://github.com/wp-cli/wp-cli/blob/master/php/commands/shell.php)
                    
168 * Zend Framework 2: [PsyshModule](https://zfmodules.com/gianarb/zf2-psysh-module)
                    
                
index.php https://gitlab.com/I-NOZex/quiz | PHP | 255 lines
                    
39* @var yii\data\ActiveDataProvider $dataProvider
                    
40<?php if ($generator->searchModelClass !== ''): ?>
                    
41    * @var <?= ltrim($generator->searchModelClass, '\\') ?> $searchModel
                    
49
                    
50<?php
                    
51if($generator->accessFilter):
                    
87    '<?php '.($generator->indexWidgetType === 'grid' ? '// ' : '') ?>
                    
88    <?php if ($generator->searchModelClass !== ''): ?>
                    
89        echo $this->render('_search', ['model' =>$searchModel]);
                    
117<?php
                    
118	echo "<?php\n}\n?>";
                    
119}else{
                    
193        ],
                    
194        <?php if ($generator->searchModelClass !== ''): ?>
                    
195            'filterModel' => $searchModel,
                    
                
DirectoryTest.php https://gitlab.com/reasonat/test8 | PHP | 163 lines
                    
1<?php
                    
2
                    
4
                    
5use Drupal\Component\PhpStorage\FileStorage;
                    
6
                    
68
                    
69    if (substr(PHP_OS, 0, 3) != 'WIN') {
                    
70      // PHP on Windows doesn't support any kind of useful read-only mode for
                    
70      // PHP on Windows doesn't support any kind of useful read-only mode for
                    
71      // directories. When executing a chmod() on a directory, PHP only sets the
                    
72      // read-only flag, which doesn't prevent files to actually be written
                    
75      // Make directory read only.
                    
76      @drupal_chmod($directory, 0444);
                    
77      $this->assertFalse(file_prepare_directory($directory, 0), 'Error reported for a non-writeable directory.', 'File');
                    
79      // Test directory permission modification.
                    
80      $this->settingsSet('file_chmod_directory', 0777);
                    
81      $this->assertTrue(file_prepare_directory($directory, FILE_MODIFY_PERMISSIONS), 'No error reported when making directory writeable.', 'File');
                    
                
sfMigrator.class.php https://github.com/jcoby/sfPropelMigrationsPlugin.git | PHP | 582 lines
                    
1<?php
                    
2
                    
16 * @author     Martin Kreidenweis <sf@kreidenweis.com>
                    
17 * @version    SVN: $Id: sfMigrator.class.php 26873 2010-01-19 12:09:31Z Stefan.Koopmanschap $
                    
18 */
                    
45   * @param   string $sql
                    
46   * @param   string $fetchmode
                    
47   *
                    
49   */
                    
50  static public function executeQuery($sql, $fetchmode = null)
                    
51  {
                    
62    {
                    
63      return $con->executeQuery($sql, $fetchmode);
                    
64    }
                    
162    $newClass = <<<EOF
                    
163<?php
                    
164
                    
                
MysqlDatabase.php https://gitlab.com/Erdrix/overviewCompanies | PHP | 426 lines
                    
1<?php
                    
2
                    
34    /**
                    
35     * Définis le fetchMode suivant une classe
                    
36     * @var string | boolean
                    
213            if ($this->fetchClass !== false) {
                    
214                $requete->setFetchMode(PDO::FETCH_CLASS, $this->fetchClass);
                    
215                $this->fetchClass = false;
                    
                
FileLockRegion.php https://gitlab.com/martinstti/silex-microframework-rest | PHP | 265 lines
                    
1<?php
                    
2
                    
244        }
                    
245        chmod($filename, 0664);
                    
246
                    
                
Uploader.php https://github.com/guiohm/magento-french.git | PHP | 513 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright  Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
                    
24 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
187        if( $result ) {
                    
188            chmod($destFile, 0777);
                    
189            if ( $this->_enableFilesDispersion ) {
                    
                
Process.php https://bitbucket.org/ttphong2612/billigastamplar-new.se.git | PHP | 451 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright  Copyright (c) 2006-2018 Magento, Inc. (http://www.magento.com)
                    
24 * @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
127            if (strpos(str_replace($this->_includeDir, '', $target), '-')
                    
128                || !in_array(substr($source, strlen($source)-4, 4), array('.php'))) {
                    
129                return $this;
                    
199        } else {
                    
200            if (!in_array(substr($source, strlen($source)-4, 4), array('.php'))) {
                    
201                return $this;
                    
217            mkdir($dir);
                    
218            @chmod($dir, 0777);
                    
219        }
                    
                
adodb-sqlite3.inc.php https://gitlab.com/mrktinh/bookonline | PHP | 438 lines
                    
1<?php
                    
2/*
                    
91		$ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
                    
92		if ($this->fetchMode !== false) {
                    
93			$savem = $this->SetFetchMode(false);
                    
96		if (isset($savem)) {
                    
97			$this->SetFetchMode($savem);
                    
98		}
                    
296		$ADODB_FETCH_MODE = ADODB_FETCH_NUM;
                    
297		if ($this->fetchMode !== FALSE) {
                    
298			$savem = $this->SetFetchMode(FALSE);
                    
303			if (isset($savem)) {
                    
304				$this->SetFetchMode($savem);
                    
305			}
                    
332		if (isset($savem)) {
                    
333			$this->SetFetchMode($savem);
                    
334			$ADODB_FETCH_MODE = $save;
                    
                
award_criteria_activity.php https://gitlab.com/unofficial-mirrors/moodle | PHP | 271 lines
                    
1<?php
                    
2// This file is part of Moodle - http://moodle.org/
                    
27defined('MOODLE_INTERNAL') || die();
                    
28require_once($CFG->libdir . '/completionlib.php');
                    
29
                    
91            if (!$mod) {
                    
92                $str = $OUTPUT->error_text(get_string('error:nosuchmod', 'badges'));
                    
93            } else {
                    
132                $this->config_options($mform, array('id' => $m, 'checked' => true,
                    
133                        'name' => get_string('error:nosuchmod', 'badges'), 'error' => true));
                    
134                $none = false;
                    
                
 

Source

Language