diff options
author | nodiscc <nodiscc@gmail.com> | 2017-01-26 18:52:54 +0100 |
---|---|---|
committer | nodiscc <nodiscc@gmail.com> | 2017-06-18 00:19:49 +0200 |
commit | 53ed6d7d1e678d7486337ce67a2f17b30bac21ac (patch) | |
tree | f8bef0164a70bd03d2b9781951c01bdd018f1842 /doc/Troubleshooting.md | |
parent | d5d22a6d07917865c44148ad76f43c65a929a890 (diff) | |
download | Shaarli-53ed6d7d1e678d7486337ce67a2f17b30bac21ac.tar.gz Shaarli-53ed6d7d1e678d7486337ce67a2f17b30bac21ac.tar.zst Shaarli-53ed6d7d1e678d7486337ce67a2f17b30bac21ac.zip |
Generate HTML documentation using MkDocs (WIP)
MkDocs is a static site generator geared towards building project documentation.
Documentation source files are written in Markdown, and configured with a single YAML file.
* http://www.mkdocs.org/
* http://www.mkdocs.org/user-guide/configuration/
Ref. #312
* remove pandoc-generated HTML documentation
* move markdown doc to doc/md/,
* mkdocs.yml:
* generate HTML doc in doc/html
* add pages TOC/ordering
* use index.md as index page
* Makefile: remove execute permissions from generated files
* Makefile: rewrite htmlpages GFM to markdown conversion using sed:
awk expression aslo matched '][' which causes invalid output on complex links with images or code blocks
* Add mkdocs.yml to .gitattributes, exclude this file from release archives
* Makefile: rename: htmldoc -> doc_html target
* run make doc: pull latest markdown documentation from wiki
* run make htmlpages: update html documentation
Diffstat (limited to 'doc/Troubleshooting.md')
-rw-r--r-- | doc/Troubleshooting.md | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/doc/Troubleshooting.md b/doc/Troubleshooting.md deleted file mode 100644 index 8e30fce5..00000000 --- a/doc/Troubleshooting.md +++ /dev/null | |||
@@ -1,107 +0,0 @@ | |||
1 | #Troubleshooting | ||
2 | ## Browser | ||
3 | ### Redirection issues (HTTP Referer) | ||
4 | Depending on its configuration and installed plugins, the browser may remove or alter (spoof) HTTP referers, thus preventing Shaarli from properly redirecting between pages. | ||
5 | |||
6 | See: | ||
7 | - [HTTP referer](https://en.wikipedia.org/wiki/HTTP_referer) (Wikipedia)[](.html) | ||
8 | - [Improve online privacy by controlling referrer information](http://www.ghacks.net/2015/01/22/improve-online-privacy-by-controlling-referrer-information/)[](.html) | ||
9 | - [Better security, privacy and anonymity in Firefox](http://b.agilob.net/better-security-privacy-and-anonymity-in-firefox/)[](.html) | ||
10 | |||
11 | ### Firefox HTTP Referer options | ||
12 | HTTP settings are available by browsing `about:config`, here are the available settings and their values. | ||
13 | |||
14 | `network.http.sendRefererHeader` - determines when to send the Referer HTTP header | ||
15 | - 0: Never send the referring URL | ||
16 | - not recommended, may break some sites | ||
17 | - 1: Send only on clicked links | ||
18 | - 2 (default): Send for links and images | ||
19 | |||
20 | `network.http.referer.XOriginPolicy` - Cross-domain origin policy | ||
21 | - 0 (default): Always send | ||
22 | - 1: Send if base domains match | ||
23 | - 2: Send if hosts match | ||
24 | |||
25 | `network.http.referer.spoofSource` - Referer spoofing (~faking) | ||
26 | - false (default): real referer | ||
27 | - true: spoof referer (use target URI as referer) | ||
28 | - known to break some functionality in Shaarli | ||
29 | |||
30 | `network.http.referer.trimmingPolicy` - trim the URI not to send a full Referer | ||
31 | - 0 (default): send full URI | ||
32 | - 1: scheme+host+port+path | ||
33 | - 2: scheme+host+port | ||
34 | |||
35 | ### Firefox, localhost and redirections | ||
36 | `localhost` is not a proper Fully Qualified Domain Name (FQDN); if Firefox has been set up to spoof referers, or only accept requests from the same base domain/host, Shaarli redirections will not work properly. | ||
37 | |||
38 | To solve this, assign a local domain to your host, e.g. | ||
39 | ``` | ||
40 | 127.0.0.1 localhost desktop localhost.lan | ||
41 | ::1 localhost desktop localhost.lan | ||
42 | ``` | ||
43 | |||
44 | and browse Shaarli at http://localhost.lan/. | ||
45 | |||
46 | Related threads: | ||
47 | - [What is localhost.localdomain for?](https://bbs.archlinux.org/viewtopic.php?id=156064)[](.html) | ||
48 | - [Stop returning to the first page after editing a bookmark from another page](https://github.com/shaarli/Shaarli/issues/311)[](.html) | ||
49 | |||
50 | ## Login | ||
51 | ### I forgot my password! | ||
52 | Delete the file `data/config.php` and display the page again. You will be asked for a new login/password. | ||
53 | |||
54 | ### I'm locked out - Login bruteforce protection | ||
55 | Login form is protected against brute force attacks: 4 failed logins will ban the IP address from login for 30 minutes. Banned IPs can still browse links. | ||
56 | |||
57 | To remove the current IP bans, delete the file `data/ipbans.php` | ||
58 | |||
59 | ### List of all login attempts | ||
60 | The file `data/log.txt` shows all logins (successful or failed) and bans/lifted bans. | ||
61 | Search for `failed` in this file to look for unauthorized login attempts. | ||
62 | |||
63 | ## Hosting problems | ||
64 | ### Old PHP versions | ||
65 | * On **free.fr** : free.fr now support php 5.6.x([link](http://les.pages.perso.chez.free.fr/migrations/php5v6.io))and so support now the tag autocompletion but you have to do the following : At the root of your webspace create a `sessions` directory and a `.htaccess` file containing:[](.html) | ||
66 | |||
67 | ```ini | ||
68 | <IfDefine Free> | ||
69 | php56 1 | ||
70 | </IfDefine> | ||
71 | ``` | ||
72 | |||
73 | * If you have an error such as: `Parse error: syntax error, unexpected '=', expecting '(' in /links/index.php on line xxx`, it means that your host is using php4, not php5. Shaarli requires php 5.1. Try changing the file extension to `.php5` | ||
74 | * On **1and1** : If you add the link from the page (and not from the bookmarklet), Shaarli will no be able to get the title of the page. You will have to enter it manually. (Because they have disabled the ability to download a file through HTTP). | ||
75 | * If you have the error `Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /…/index.php on line xxx`, it means that your host has disabled the ability to fetch a file by HTTP in the php config (Typically in 1and1 hosting). Bad host. Change host. Or comment the following lines:[](.html) | ||
76 | |||
77 | ```php | ||
78 | //list($status,$headers,$data) = getHTTP($url,4); // Short timeout to keep the application responsive. | ||
79 | // FIXME: Decode charset according to charset specified in either 1) HTTP response headers or 2) <head> in html | ||
80 | //if (strpos($status,'200 OK')) $title=html_extract_title($data); | ||
81 | ``` | ||
82 | |||
83 | * On hosts which forbid outgoing HTTP requests (such as free.fr), some thumbnails will not work. | ||
84 | * On **lost-oasis**, RSS doesn't work correctly, because of this message at the begining of the RSS/ATOM feed : `<? // tout ce qui est charge ici (generalement des includes et require) est charge en permanence. ?>`. To fix this, remove this message from `php-include/prepend.php` | ||
85 | |||
86 | ### Dates are not properly formatted | ||
87 | Shaarli tries to sniff the language of the browser (using HTTP_ACCEPT_LANGUAGE headers) and choose a date format accordingly. But Shaarli can only use the date formats (and more generaly speaking, the locales) provided by the webserver. So even if you have a browser in French, you may end up with dates in US format (it's the case on sebsauvage.net :-( ) | ||
88 | |||
89 | ### Problems on CentOS servers | ||
90 | On **CentOS**/RedHat derivatives, you may need to install the `php-mbstring` package. | ||
91 | |||
92 | |||
93 | ### My session expires! I can't stay logged in | ||
94 | This can be caused by several things: | ||
95 | |||
96 | * Your php installation may not have a proper directory setup for session files. (eg. on Free.fr you need to create a `session` directory on the root of your website.) You may need to create the session directory of set it up. | ||
97 | * Most hosts regularly clean the temporary and session directories. Your host may be cleaning those directories too aggressively (eg.OVH hosts), forcing an expire of the session. You may want to set the session directory in your web root. (eg. Create the `sessions` subdirectory and add `ini_set('session.save_path', $_SERVER['DOCUMENT_ROOT'].'/../sessions');`. Make sure this directory is not browsable !)[](.html) | ||
98 | * If your IP address changes during surfing, Shaarli will force expire your session for security reasons (to prevent session cookie hijacking). This can happen when surfing from WiFi or 3G (you may have switched WiFi/3G access point), or in some corporate/university proxies which use load balancing (and may have proxies with several external IP addresses). | ||
99 | * Some browser addons may interfer with HTTP headers (ipfuck/ipflood/GreaseMonkey…). Try disabling those. | ||
100 | * You may be using OperaTurbo or OperaMini, which use their own proxies which may change from time to time. | ||
101 | * If you have another application on the same webserver where Shaarli is installed, these application may forcefully expire php sessions. | ||
102 | |||
103 | ## Sessions do not seem to work correctly on your server | ||
104 | Follow the instructions in the error message. Make sure you are accessing shaarli via a direct IP address or a proper hostname. If you have **no dots** in the hostname (e.g. `localhost` or `http://my-webserver/shaarli/`), some browsers will not store cookies at all (this respects the [HTTP cookie specification](http://curl.haxx.se/rfc/cookie_spec.html)).[](.html) | ||
105 | |||
106 | ### pubsubhubbub support | ||
107 | Download [publisher.php](https://pubsubhubbub.googlecode.com/git/publisher_clients/php/library/publisher.php) at the root of your Shaarli installation and set `$GLOBALS['config'['PUBSUBHUB_URL']` in your `config.php`]('PUBSUBHUB_URL']`-in-your-`config.php`.html) | ||