Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ISPConfig 3
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MK
ISPConfig 3
Commits
42f0c93c
Commit
42f0c93c
authored
May 07, 2015
by
Till Brehm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed: FS#3888 - APS installer: String could not be parsed as XML
parent
d94b1e27
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
interface/lib/classes/aps_crawler.inc.php
interface/lib/classes/aps_crawler.inc.php
+9
-0
server/lib/classes/aps_installer.inc.php
server/lib/classes/aps_installer.inc.php
+2
-0
No files found.
interface/lib/classes/aps_crawler.inc.php
View file @
42f0c93c
...
...
@@ -189,6 +189,8 @@ class ApsCrawler extends ApsBase
curl_setopt
(
$conn
[
$i
],
CURLOPT_TIMEOUT
,
0
);
curl_setopt
(
$conn
[
$i
],
CURLOPT_FAILONERROR
,
1
);
curl_setopt
(
$conn
[
$i
],
CURLOPT_FOLLOWLOCATION
,
1
);
curl_setopt
(
$conn
[
$i
],
CURLOPT_SSL_VERIFYHOST
,
1
);
curl_setopt
(
$conn
[
$i
],
CURLOPT_SSL_VERIFYPEER
,
false
);
curl_multi_add_handle
(
$mh
,
$conn
[
$i
]);
}
...
...
@@ -283,6 +285,7 @@ class ApsCrawler extends ApsBase
$apps_count
=
substr_count
(
$apps
[
$j
],
'<opensearch:totalResults>0</opensearch:totalResults>'
);
if
(
$apps_count
==
0
)
// obviously this vendor provides one or more apps
{
try
{
// Rename namespaces and register them
$xml
=
str_replace
(
"xmlns="
,
"ns="
,
$apps
[
$j
]);
$sxe
=
new
SimpleXMLElement
(
$xml
);
...
...
@@ -456,9 +459,15 @@ class ApsCrawler extends ApsBase
unset
(
$sxe
);
$apps_in_repo
++
;
}
catch
(
Exception
$e
)
{
// We dont want the crawler to fail on xml parse errors
$app
->
log
(
$this
->
log_prefix
.
$e
->
getMessage
(),
LOGLEVEL_WARN
);
//echo 'Caught exception: ', $e->getMessage(), "\n";
}
}
}
//var_dump($apps);
//echo print_r($apps_to_dl).'<br>-------------------<br>';
// For memory reasons, unset the current vendor and his apps
unset
(
$apps
);
...
...
server/lib/classes/aps_installer.inc.php
View file @
42f0c93c
...
...
@@ -554,6 +554,7 @@ class ApsInstaller extends ApsBase
curl_setopt
(
$conn
[
$i
],
CURLOPT_TIMEOUT
,
0
);
curl_setopt
(
$conn
[
$i
],
CURLOPT_FAILONERROR
,
1
);
curl_setopt
(
$conn
[
$i
],
CURLOPT_FOLLOWLOCATION
,
1
);
curl_setopt
(
$conn
[
$i
],
CURLOPT_SSL_VERIFYPEER
,
0
);
curl_multi_add_handle
(
$mh
,
$conn
[
$i
]);
}
...
...
@@ -696,6 +697,7 @@ class ApsInstaller extends ApsBase
curl_setopt
(
$ch
,
CURLOPT_TIMEOUT
,
0
);
curl_setopt
(
$ch
,
CURLOPT_FAILONERROR
,
1
);
curl_setopt
(
$ch
,
CURLOPT_FOLLOWLOCATION
,
1
);
curl_setopt
(
$ch
,
CURLOPT_SSL_VERIFYPEER
,
0
);
if
(
curl_exec
(
$ch
)
===
false
)
$app
->
log
(
curl_error
(
$ch
),
1
);
fclose
(
$fh
);
curl_close
(
$ch
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment