In a default Ubuntu/Apache installation, the user directories have PHP disabled. So the server sends to the browser the pmwiki.php file as if it was a HTML file, then at some place there is a html meta redirect with some unprocessed PHP variable which the browser follows. You see a flicker in a split second before the redirect.

You need to edit the apache2 conf file and restart the server.

Edit as root this file:
  /etc/apache2/mods-enabled/php7.2.conf

Find the line "php_admin_flag engine Off" and replace "Off" with "On". Save the file then restart Apache:

  sudo service apache2 restart

(or whatever other line is used, or if you don't know restart the whole server).

I'm not sure why Dokuwiki works.

Petko

Le 2018-06-24 13:37, Christopher Pinon a écrit :
I'm completely new to pmwiki and have just tried to install the latest
version (2.2.107) on two servers. Both servers are running apache and
are set up for userdir and php.

Server 1 (running NetBSD with apache and php7.1): I unpack the pmwiki
archive in /home/user/public_html/ as "pmwiki" and assign ownership
recursively to apache, which on NetBSD amounts to "chown -R www:www
pmwiki/". I then visit https://server.net/~user/pmwiki/pmwiki.php and
the "Welcome to PmWiki!" appears. :-) So all is good.

Server 2 (running Ubuntu 18.04 with apache and php7.2): I unpack the
pmwiki archive in /home/user/public_html/ as "pmwiki" and assign
ownership recursively to apache, which on Ubuntu amounts to "chown -R
www-data:www-data pmwiki/". I then visit
https://server.net/~user/pmwiki/pmwiki.php and I get a "404 Not Found"
page, more specifically, the message is "The requested URL
/~user/pmwiki/$pageurl was not found on this server." :-( So something
isn't right.

Question: Could this difference be due to php7.1 (on server 1) vs
php7.2 (on server 2)?

I originally thought that the difference was due to some difference in
configuration of apache on the two servers, but if it is, I haven't
yet been able to find the crucial difference in configuration. By the
way, both servers are happily running Nextcloud without issues.

Another by the way: if I follow the same steps on server 2 but with
the latest version of dokuwiki instead, dokuwiki works.

_______________________________________________
pmwiki-users mailing list
pmwiki-users@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to