From 3306daecf4450555961490c11e70e7cf7fe7b86e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 11 Apr 2013 19:12:00 +0400 Subject: implement upload-related support for open_basedir --- install/index.php | 4 ---- 1 file changed, 4 deletions(-) (limited to 'install/index.php') diff --git a/install/index.php b/install/index.php index 026e00d01..3b6a1f544 100644 --- a/install/index.php +++ b/install/index.php @@ -17,10 +17,6 @@ array_push($errors, "PHP version 5.3.0 or newer required."); } - if (ini_get("open_basedir")) { - array_push($errors, "PHP configuration option open_basedir is not supported. Please disable this in PHP settings file (php.ini)."); - } - if (!function_exists("curl_init") && !ini_get("allow_url_fopen")) { array_push($errors, "PHP configuration option allow_url_fopen is disabled, and CURL functions are not present. Either enable allow_url_fopen or install PHP extension for CURL."); } -- cgit v1.2.3 From 044cff2d74ece46256201695346d1a0d1d66c746 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 13 Apr 2013 18:24:27 +0400 Subject: implement basic feed authentication parameter encryption in the database (FEED_CRYPT_KEY) --- install/index.php | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'install/index.php') diff --git a/install/index.php b/install/index.php index 3b6a1f544..1aae5da83 100644 --- a/install/index.php +++ b/install/index.php @@ -10,6 +10,25 @@ Date: Wed, 17 Apr 2013 18:56:13 +0400 Subject: support mysqli when available --- install/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'install/index.php') diff --git a/install/index.php b/install/index.php index 1aae5da83..99339aca2 100644 --- a/install/index.php +++ b/install/index.php @@ -44,7 +44,7 @@ array_push($errors, "PHP support for JSON is required, but was not found."); } - if ($db_type == "mysql" && !function_exists("mysql_connect")) { + if ($db_type == "mysql" && !function_exists("mysql_connect") && !function_exists("mysqli_connect")) { array_push($errors, "PHP support for MySQL is required for configured $db_type in config.php."); } -- cgit v1.2.3 From bbffc43e4f4c04e5efeb0edcc9851742c2223b1d Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 18 Apr 2013 16:06:03 +0400 Subject: actually check for DB_PORT in installer, add better hints and use mysqli if available --- install/index.php | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) (limited to 'install/index.php') diff --git a/install/index.php b/install/index.php index 99339aca2..9cbab20f1 100644 --- a/install/index.php +++ b/install/index.php @@ -88,7 +88,7 @@ $msg"; } - function db_connect($host, $user, $pass, $db, $type) { + function db_connect($host, $user, $pass, $db, $type, $port) { if ($type == "pgsql") { $string = "dbname=$db user=$user"; @@ -101,8 +101,8 @@ $string .= " host=$host"; } - if (defined('DB_PORT')) { - $string = "$string port=" . DB_PORT; + if ($port) { + $string = "$string port=" . $port; } $link = pg_connect($string); @@ -110,10 +110,15 @@ return $link; } else if ($type == "mysql") { - $link = mysql_connect($host, $user, $pass); - if ($link) { - $result = mysql_select_db($db, $link); - if ($result) return $link; + if (function_exists("mysqli_connect")) { + return mysqli_connect($host, $user, $pass, $db, $port); + + } else { + $link = mysql_connect($host, $user, $pass); + if ($link) { + $result = mysql_select_db($db, $link); + if ($result) return $link; + } } } } @@ -173,7 +178,12 @@ } return $result; } else if ($type == "mysql") { - $result = mysql_query($query, $link); + + if (function_exists("mysqli_connect")) { + $result = mysqli_query($link, $query); + } else { + $result = mysql_query($query, $link); + } if (!$result) { $query = htmlspecialchars($query); if ($die_on_error) { @@ -254,17 +264,19 @@
- +
- + + If needed
- + + Usually 3306 for MySQL or 5432 for PostgreSQL

Other settings

@@ -327,7 +339,7 @@

Checking database

Date: Thu, 18 Apr 2013 22:27:05 +0400 Subject: more notice css tweaks --- install/index.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'install/index.php') diff --git a/install/index.php b/install/index.php index 9cbab20f1..416765e8f 100644 --- a/install/index.php +++ b/install/index.php @@ -80,12 +80,13 @@ } function print_error($msg) { - print "
$msg
"; + print "
+ $msg
"; } function print_notice($msg) { print "
- $msg
"; + $msg"; } function db_connect($host, $user, $pass, $db, $type, $port) { -- cgit v1.2.3 From 92c9a20cf51c55e9d866427786bc28b2d6ab48fd Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 19 Apr 2013 10:02:27 +0400 Subject: update installer mysqli_connect to only use port if defined --- install/index.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'install/index.php') diff --git a/install/index.php b/install/index.php index 416765e8f..cd017f995 100644 --- a/install/index.php +++ b/install/index.php @@ -112,7 +112,10 @@ } else if ($type == "mysql") { if (function_exists("mysqli_connect")) { - return mysqli_connect($host, $user, $pass, $db, $port); + if ($port) + return mysqli_connect($host, $user, $pass, $db, $port); + else + return mysqli_connect($host, $user, $pass, $db); } else { $link = mysql_connect($host, $user, $pass); -- cgit v1.2.3 From 6f7798b6434f5ef6073447998c436901b507e3df Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Tue, 7 May 2013 00:35:10 -0700 Subject: Fixing bugs found by static analysis --- install/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'install/index.php') diff --git a/install/index.php b/install/index.php index cd017f995..6cb2ace4f 100644 --- a/install/index.php +++ b/install/index.php @@ -89,7 +89,7 @@ $msg"; } - function db_connect($host, $user, $pass, $db, $type, $port) { + function db_connect($host, $user, $pass, $db, $type, $port = false) { if ($type == "pgsql") { $string = "dbname=$db user=$user"; -- cgit v1.2.3