diff options
author | friendica <info@friendica.com> | 2013-05-16 04:27:28 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-05-16 04:27:28 -0700 |
commit | 383a9bab96051c9c1195ef8534f4e87270d8623a (patch) | |
tree | 311e4d4706a7adb9b98df9331b6f4aa50fbb12b4 /mod/setup.php | |
parent | 3f86f44df52d9aaeb59aca1fb7576f11f3053278 (diff) | |
download | volse-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/setup.php')
-rwxr-xr-x | mod/setup.php | 12 |
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.'); |