From d0482133a5a29deec31a6f267769c1d1fde170ad Mon Sep 17 00:00:00 2001 From: royalterra Date: Fri, 11 Dec 2015 09:48:04 +0000 Subject: Update INSTALL.txt --- install/INSTALL.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/install/INSTALL.txt b/install/INSTALL.txt index 25852497b..1a8118a25 100644 --- a/install/INSTALL.txt +++ b/install/INSTALL.txt @@ -382,3 +382,18 @@ stuff on your server that might access MySQL, and Hubzilla's poller which needs MySQL access, too. A good setting for a medium-sized hub might be to keep MySQL's max_connections at 100 and set mpm_prefork's MaxRequestWorkers to 70. +------------------------------------------------------------------------ +For Calculate Automatic according to your server resources and configure +mod_prefork you can Install and Execute ApacheTune + +Home Page: https://github.com/royalterra/apache2tune + +git clone https://github.com/royalterra/apache2tune.git + +cd apache2tune + +chmod +x Apache2tune.sh + +Please Read the Documentation of Apache2tune +./Apache2tune.sh + -- cgit v1.2.3 From 46332732793c24771fea51b0d54975e0954ff669 Mon Sep 17 00:00:00 2001 From: royalterra Date: Fri, 11 Dec 2015 09:49:14 +0000 Subject: Update INSTALL.txt Add Link to ApacheTune for configure mod Prefork --- install/INSTALL.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/install/INSTALL.txt b/install/INSTALL.txt index 1a8118a25..361153e59 100644 --- a/install/INSTALL.txt +++ b/install/INSTALL.txt @@ -397,3 +397,4 @@ chmod +x Apache2tune.sh Please Read the Documentation of Apache2tune ./Apache2tune.sh + -- cgit v1.2.3 From 1f4c596841be66c96bc5acf28ba74e4f7154c6c8 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Fri, 11 Dec 2015 17:00:45 -0800 Subject: add deprecated update_with_media endpoint --- include/api.php | 1 + 1 file changed, 1 insertion(+) diff --git a/include/api.php b/include/api.php index 4ad915c03..1fb48d553 100644 --- a/include/api.php +++ b/include/api.php @@ -870,6 +870,7 @@ require_once('include/api_auth.php'); // this should output the last post (the one we just posted). return api_status_show($a,$type); } + api_register_func('api/statuses/update_with_media','api_statuses_update', true); api_register_func('api/statuses/update','api_statuses_update', true); -- cgit v1.2.3 From 395268da22bf5ec773de7fdc42a338a9cbe87d40 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Fri, 11 Dec 2015 21:10:20 -0800 Subject: a couple of api improvements --- include/api.php | 11 ++++++++++- include/api_auth.php | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/include/api.php b/include/api.php index 1fb48d553..fd6883f44 100644 --- a/include/api.php +++ b/include/api.php @@ -112,8 +112,11 @@ require_once('include/api_auth.php'); break; case "json": header ("Content-Type: application/json"); - foreach($r as $rr) + foreach($r as $rr) { + if(! $rr) + $rr = array(); $json = json_encode($rr); + } if ($_GET['callback']) $json = $_GET['callback']."(".$json.")"; return $json; @@ -1079,6 +1082,8 @@ require_once('include/api_auth.php'); 'contributors' => '' ); $status_info['user'] = $user_info; + if(array_key_exists('status',$status_info['user'])) + unset($status_info['user']['status']); } return api_apply_template("status", $type, array('$status' => $status_info)); @@ -1320,6 +1325,8 @@ require_once('include/api_auth.php'); // params $id = intval(argv(3)); + if(! $id) + $id = $_REQUEST['id']; logger('API: api_statuses_show: '.$id); @@ -1336,10 +1343,12 @@ require_once('include/api_auth.php'); $r = q("select * from item where true $item_normal $sql_extra", intval($id) ); + xchan_query($r,true); $ret = api_format_items($r,$user_info); + if ($conversation) { $data = array('$statuses' => $ret); return api_apply_template("timeline", $type, $data); diff --git a/include/api_auth.php b/include/api_auth.php index c9978c99d..e3697adb0 100644 --- a/include/api_auth.php +++ b/include/api_auth.php @@ -28,7 +28,7 @@ function api_login(&$a){ killme(); } catch(Exception $e) { - logger(__file__.__line__.__function__."\n".$e); + logger($e->getMessage()); } // workarounds for HTTP-auth in CGI mode -- cgit v1.2.3