aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-05-16 04:27:28 -0700
committerfriendica <info@friendica.com>2013-05-16 04:27:28 -0700
commit383a9bab96051c9c1195ef8534f4e87270d8623a (patch)
tree311e4d4706a7adb9b98df9331b6f4aa50fbb12b4 /mod
parent3f86f44df52d9aaeb59aca1fb7576f11f3053278 (diff)
downloadvolse-hubzilla-383a9bab96051c9c1195ef8534f4e87270d8623a.tar.gz
volse-hubzilla-383a9bab96051c9c1195ef8534f4e87270d8623a.tar.bz2
volse-hubzilla-383a9bab96051c9c1195ef8534f4e87270d8623a.zip
if somebody changes the site url during setup - check if we can connect to the new url e.g. it has a valid cert.
Diffstat (limited to 'mod')
-rwxr-xr-xmod/setup.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/mod/setup.php b/mod/setup.php
index b76fa7be1..3c0a133b7 100755
--- a/mod/setup.php
+++ b/mod/setup.php
@@ -80,6 +80,13 @@ function setup_post(&$a) {
$siteurl = notags(trim($_POST['siteurl']));
+ if($siteurl != z_root()) {
+ $test = z_fetch_url($siteurl."/setup/testrewrite");
+ if((! $test['success']) || ($test['body'] != 'ok')) {
+ $a->data['url_fail'] = true;
+ return;
+ }
+ }
// connect to db
$db = dba_factory($dbhost, $dbport, $dbuser, $dbpass, $dbdata, true);
@@ -140,6 +147,11 @@ function setup_content(&$a) {
$install_wizard_pass = 2;
$wizard_status = t('Could not connect to database.');
}
+ if(x($a->data,'url_fail')) {
+ $install_wizard_pass = 3;
+ $wizard_status = t('Could not connect to specified site URL. Possible SSL certificate or DNS issue.');
+ }
+
if(x($a->data,'db_create_failed')) {
$install_wizard_pass = 2;
$wizard_status = t('Could not create table.');