Rootserver Sponsor

webtropia"

Donations

Please support your operating system's further development:

donate"

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
finottiOffline
Post subject: [Solved] dokuwiki  PostPosted: 22.10.2016, 21:36



Joined: 2010-09-12
Posts: 470

Status: Offline
Dear all,

I tried to install dokuwiki (the Debian way). Everything seemed to go OK. It brought many other packages with it (e.g., php7 and apache2).

Supposedly I should be able to access it from http://localhost/dokuwiki/, but I get a "Unable to Connect -- Firefox can’t establish a connection to the server at localhost" message in Firefox.

I have no idea how to try to find what is wrong? Other installations guide I've seen online seem to indicate that this should have worked.

Any suggestion or ideas would be greatly appreciated.


Last edited by finotti on 25.10.2016, 12:56; edited 1 time in total
 
 View user's profile Send private message  
Reply with quote Back to top
finottiOffline
Post subject: RE: dokuwiki  PostPosted: 23.10.2016, 12:26



Joined: 2010-09-12
Posts: 470

Status: Offline
OK, apparently apache2 was NOT installed itself. (I did see some packages with apache2 in their names be installed for sure.)

So, I've installed apache2. (I had to reboot for the service to be able to start, but it works now.) Then, I was getting a "404" error instead of the one above. (Progress...) Checking /etc/apache2/conf-enabled, there was no dokuwiki, but it was available at /etc/apache2/conf-available. So, I've linked them:

      Code:

root@debian[/etc/apache2/conf-enabled]# ll -s /etc/apache2/conf-available/
total 28
4 -rw-r--r-- 1 root root  221 Sep 29 06:03 apache2-doc.conf
4 -rw-r--r-- 1 root root  315 Sep 29 06:03 charset.conf
0 lrwxrwxrwx 1 root root   25 Oct 23 08:19 dokuwiki.conf -> /etc/dokuwiki/apache.conf
4 -rw-r--r-- 1 root root  127 Jul 29  2013 javascript-common.conf
4 -rw-r--r-- 1 root root 3224 Sep 29 06:03 localized-error-pages.conf
4 -rw-r--r-- 1 root root  189 Sep 29 06:03 other-vhosts-access-log.conf
4 -rw-r--r-- 1 root root 2174 Sep 29 06:03 security.conf
4 -rw-r--r-- 1 root root  455 Sep 29 06:03 serve-cgi-bin.conf
root@debian[/etc/apache2/conf-enabled]# ll -s /etc/apache2/conf-enabled/
total 0
0 lrwxrwxrwx 1 root root 34 Oct 23 07:34 apache2-doc.conf -> ../conf-available/apache2-doc.conf
0 lrwxrwxrwx 1 root root 30 Oct 23 07:34 charset.conf -> ../conf-available/charset.conf
0 lrwxrwxrwx 1 root root 31 Oct 23 08:15 dokuwiki.conf -> ../conf-available/dokuwiki.conf
0 lrwxrwxrwx 1 root root 44 Oct 23 07:34 localized-error-pages.conf -> ../conf-available/localized-error-pages.conf
0 lrwxrwxrwx 1 root root 46 Oct 23 07:34 other-vhosts-access-log.conf -> ../conf-available/other-vhosts-access-log.conf
0 lrwxrwxrwx 1 root root 31 Oct 23 07:34 security.conf -> ../conf-available/security.conf
0 lrwxrwxrwx 1 root root 36 Oct 23 07:34 serve-cgi-bin.conf -> ../conf-available/serve-cgi-bin.conf


Now, I get when I try "localhost/dokuwiki" (or "localhost/dokuwiki/index.php"):

      Code:

*/ if(php_sapi_name() != 'cli-server') { header("Location: doku.php"); exit; } # ROUTER starts below # avoid path traversal $_SERVER['SCRIPT_NAME'] = str_replace('/../', '/', $_SERVER['SCRIPT_NAME']); # routing aka. rewriting if(preg_match('/^\/_media\/(.*)/', $_SERVER['SCRIPT_NAME'], $m)) { # media dispatcher $_GET['media'] = $m[1]; require $_SERVER['DOCUMENT_ROOT'] . '/lib/exe/fetch.php'; } else if(preg_match('/^\/_detail\/(.*)/', $_SERVER['SCRIPT_NAME'], $m)) { # image detail view $_GET['media'] = $m[1]; require $_SERVER['DOCUMENT_ROOT'] . '/lib/exe/detail.php'; } else if(preg_match('/^\/_media\/(.*)/', $_SERVER['SCRIPT_NAME'], $m)) { # exports $_GET['do'] = 'export_' . $m[1]; $_GET['id'] = $m[2]; require $_SERVER['DOCUMENT_ROOT'] . '/doku.php'; } elseif($_SERVER['SCRIPT_NAME'] == '/index.php') { # 404s are automatically mapped to index.php if(isset($_SERVER['PATH_INFO'])) { $_GET['id'] = $_SERVER['PATH_INFO']; } require $_SERVER['DOCUMENT_ROOT'] . '/doku.php'; } else if(file_exists($_SERVER['DOCUMENT_ROOT'] . $_SERVER['SCRIPT_NAME'])) { # existing files # access limitiations if(preg_match('/\/([\._]ht|README$|VERSION$|COPYING$)/', $_SERVER['SCRIPT_NAME']) or preg_match('/^\/(data|conf|bin|inc)\//', $_SERVER['SCRIPT_NAME']) ) { die('Access denied'); } if(substr($_SERVER['SCRIPT_NAME'], -4) == '.php') { # php scripts require $_SERVER['DOCUMENT_ROOT'] . $_SERVER['SCRIPT_NAME']; } else { # static files return false; } } # 404


Any ideas?
 
 View user's profile Send private message  
Reply with quote Back to top
finottiOffline
Post subject: RE: dokuwiki  PostPosted: 24.10.2016, 10:34



Joined: 2010-09-12
Posts: 470

Status: Offline
OK, so PHP is not working. (Not only with dokuwiki, but a simple page "a.php" would give a blank page. (EDIT: the a.php content seemed to be altered by the forum software, so I've removed it, but it would just echo one line.)

(The file a.php is world readable.)

I've installed libapache2-mod-php. Still did not work. Looking at /etc/apache2/mods-available/ I see php7.0.conf and php7.0.load, but these are not linked in /etc/apache2/mods-enabled/. In the guides I've seen, it was never said that these should be linked manually, but I've tried and then the apache service would not start.

Any help would be greatly appreciated. Al LAMP guides I've seen say that installing apache2, php, and libapache2-mod-php should just work...
 
 View user's profile Send private message  
Reply with quote Back to top
finottiOffline
Post subject: RE: dokuwiki  PostPosted: 25.10.2016, 12:56



Joined: 2010-09-12
Posts: 470

Status: Offline
For some reason libapache2-mod-php did not install correctly. Purging it and reinstalling it fixed the problem.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio