Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
0751ee08
Commit
0751ee08
authored
10 years ago
by
Thomas Müller
Browse files
Options
Downloads
Plain Diff
Merge pull request #14414 from owncloud/add-ini-helper
Add helper to check for `ini` values in `OC_Util::checkServer`
parents
61b00ac8
9b46e3b3
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.htaccess
+1
-0
1 addition, 0 deletions
.htaccess
.user.ini
+1
-0
1 addition, 0 deletions
.user.ini
lib/private/util.php
+27
-1
27 additions, 1 deletion
lib/private/util.php
with
29 additions
and
1 deletion
.htaccess
+
1
−
0
View file @
0751ee08
...
...
@@ -14,6 +14,7 @@ php_value memory_limit 512M
php_value mbstring.func_overload 0
php_value always_populate_raw_post_data -1
php_value default_charset 'UTF-8'
php_value output_buffering false
<
IfModule
mod_env.c
>
SetEnv
htaccessWorking true
</
IfModule
>
...
...
This diff is collapsed.
Click to expand it.
.user.ini
+
1
−
0
View file @
0751ee08
...
...
@@ -4,3 +4,4 @@ memory_limit=512M
mbstring.func_overload
=
0
always_populate_raw_post_data
=
-1
default_charset
=
'UTF-8'
output_buffering
=
false
\ No newline at end of file
This diff is collapsed.
Click to expand it.
lib/private/util.php
+
27
−
1
View file @
0751ee08
...
...
@@ -570,6 +570,7 @@ class OC_Util {
// classes = class_exists
// functions = function_exists
// defined = defined
// ini = ini_get
// If the dependency is not found the missing module name is shown to the EndUser
$dependencies
=
array
(
'classes'
=>
array
(
...
...
@@ -590,9 +591,14 @@ class OC_Util {
),
'defined'
=>
array
(
'PDO::ATTR_DRIVER_NAME'
=>
'PDO'
)
),
'ini'
=>
[
'mbstring.func_overload'
=>
0
,
'output_buffering'
=>
false
,
],
);
$missingDependencies
=
array
();
$invalidIniSettings
=
[];
$moduleHint
=
$l
->
t
(
'Please ask your server administrator to install the module.'
);
foreach
(
$dependencies
[
'classes'
]
as
$class
=>
$module
)
{
...
...
@@ -610,6 +616,19 @@ class OC_Util {
$missingDependencies
[]
=
$module
;
}
}
foreach
(
$dependencies
[
'ini'
]
as
$setting
=>
$expected
)
{
$iniWrapper
=
\OC
::
$server
->
getIniWrapper
();
if
(
is_bool
(
$expected
))
{
if
(
$iniWrapper
->
getBool
(
$setting
)
!==
$expected
)
{
$invalidIniSettings
[]
=
[
$setting
,
$expected
];
}
}
if
(
is_int
(
$expected
))
{
if
(
$iniWrapper
->
getNumeric
(
$setting
)
!==
$expected
)
{
$invalidIniSettings
[]
=
[
$setting
,
$expected
];
}
}
}
foreach
(
$missingDependencies
as
$missingDependency
)
{
$errors
[]
=
array
(
...
...
@@ -618,6 +637,13 @@ class OC_Util {
);
$webServerRestart
=
true
;
}
foreach
(
$invalidIniSettings
as
$setting
)
{
$errors
[]
=
[
'error'
=>
$l
->
t
(
'PHP setting "%s" is not set to "%s".'
,
[
$setting
[
0
],
$setting
[
1
]]),
'hint'
=>
$l
->
t
(
'Adjusting this setting in php.ini will make ownCloud run again'
)
];
$webServerRestart
=
true
;
}
if
(
version_compare
(
phpversion
(),
'5.4.0'
,
'<'
))
{
$errors
[]
=
array
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment