Skip to main content

Detect CLI in PHP Script

To detect if your PHP script is being called via a web client or via CLI, you can use the php_sapi_name function. If you use this simple code:

echo php_sapi_name();

Then from a web browser you will see either fpm-fcgi or cgi-fcgi (depending on PHP handler your site uses) and from CLI you will see cli.

MediaWiki vs DokuWiki

Interested in finding the wiki that’s right for you?

Yes, so are we. 🙂

In the open source wiki marketplace, there are several options, including MediaWiki, DokuWiki, TWiki, Tiki Wiki and TiddlyWiki, as well as smaller players such as MoinMoin, PmWiki, PhpWiki and WikkaWiki.

To see what’s happening in this market, let’s take a brief look at this Google Trends graph of interest in the top five packages recently (click to see the image larger):

Google Trends

Seems clear that MediaWiki and DokuWiki are the top contenders. MediaWiki is more well-known, but DokuWiki is trying to close the gap. The Internet Techies site indeed lists it as number 2 and many people feel it’s easier to use and more effective for many sites. But to really decide, we need more details about DokuWiki vs DokuWiki. What’s the difference?

Today we’re going to talk about exactly what differences do and don’t exist. Yes, we are entering now the War of the Wikis! 🙂

We will examine two areas:

  1. History and License – when and how did these two projects get started and what license each has
  2. Product – what differences exist in the actual product

A Brief History and License

MediaWiki was originally written for Wikipedia, and Wikipedia itself was launched in January 2001. The name “MediaWiki” came about in July 2003, the same year that Jimmy Wales created the Wikimedia Foundation. The software was designed to run Wikipedia, meaning they built it “to scratch their own itch.” You can read more about the history on their MediaWiki history page or the MediaWiki page on WikiPedia.

MediaWiki has a “major release” every six months and a “long term support release (LTS)” every two years. It is licensed under version 2 of the GNU General Public License.

DokuWiki was written from scratch by Andreas Gohr in June 2004. One month later the first official release was published. In 2005, a major development was the re-design of a large section of the internals. You can read more about the history on their History of DokuWiki page, or on the DokuWiki page on WikiPedia.

New releases come out about twice a year, but there is no official schedule. The software license is GNU General Public License.

The Product

We will examine the below sections, one by one.

  1. Overview
  2. Screenshots
  3. Technology
  4. Security
  5. Features
  6. Community and Support

Let’s start with an Overview:


The basic difference between these tools is their goal. MediaWiki is meant for large and complicated wikis and DokuWiki is meant for smaller, simpler wikis. Of course, you can use MediaWiki for a small wiki and people have used DokuWiki for larger installs also. There are reports on the Scability page of installs of up to 300,000+ pages and on this forum post in German, a report of an install with close to 2 million pages.

One reader wrote in to express his opinion that MediaWiki is designed for cataloging discrete pages and it is open to community to contribute, with powerful and approval watch tools and is ideal for creating a collection of knowledge that can come from anywhere and be edited by anyone

whereas DokuWiki, on the other hand, is meant for documentation, project notes, software manual, corporate knowledge base or a private notebook — it was designed for single person use or a team with controlled access.

But the fact remains that MediaWiki is more powerful, more scalable and more flexible. With that, however, comes far more complexity as well. It’s not easy for a layman to install and configure MediaWiki, in particular any of the advanced features like extension installation.

DokuWiki, however, is very simple to install, and installing plugins and templates is a breeze.

Key Differences

MediaWiki is meant for discrete pages that are unrelated from each other, and also needs to handle complicated scenarios such as vandalism, spam, and other attacks and hence has functionalities that can help you deal with such issues and maintain a quality site.

DokuWiki is meant to handle knowlege base of related articles very well, there are reports on the scability and installations with up to 300,000+ pages and on this forum post in German, a report of an install with close to 2 million pages. However the core USP of DokuWiki is you can organise pages with namespaces. A namespace can have further namespace within itself giving it a nested tree like structure. Each namespace by default gets a start page that behaves like a landing page for that set of article and using in-built ACL tools it is easy to customise access controls for the registered team or anonymous user for entire site or for specific namespaces.

MediaWiki is translated to over 150 languages whereas DokuWiki is translated to over 50 languages.



To see a step by step explanation with screenshots of the install procedure for MediaWiki, see our blog post How to Install MediaWiki.

Here are screenshots about how to use MediaWiki:

Here the home page of a fresh, empty MediaWiki install:

MediaWiki Install 8


MediaWiki Screenshot 1

Once you’re in, there is an Edit link just above the text, right in the middle of the top section of the page:

MediaWiki Screenshot 2

If I click on that, then there is a box whereby I can edit my text. This is the default, text-based editor:

MediaWiki Screenshot 3

And if I save my changes, here is my new home page:

MediaWiki Screenshot 4

If I have the VisualEditor extension installed, then I see a “rich tex editor” like this:

MediaWiki Screenshot 5

To see a step by step explanation with screenshots of the install procedure for DokuWiki, see our blog post How to Install DokuWiki.


DokuWiki Install 6

Home page:

DokuWiki Install 7

If you put your mouse on the pencil icon on the right side of the page, you will see that a menu pops up and the first item is “Edit this page”:

DokuWiki Screenshot 1

Click on that and you get the edit page. This is the default, text-based editor:

DokuWiki Screenshot 2

And if I save my changes, here is my new home page:

DokuWiki Screenshot 3

Now if I install the CKGEdit Plugin (which is just a matter of a few clicks on the admin screens of my wiki), then I when I edit, I see a “rich tex editor” like this:

DokuWiki Screenshot 4


Both use PHP. MediaWiki requires a database of some sort (see below for options) but DokuWiki does not — it stores all data in files and requires almost no setup.


DokuWiki has a Security page where they claim:

DokuWiki is developed with security in mind. We try to find a balance between user-friendliness and security but favor security when no satisfying compromise can be found.

and there are links there to their bug reporting protocol and their bug tracking system.

MediaWiki also has a Security page meant for end users, and then a Security Guide page for developers with links to other resources like their Security page meant for developers.

A Google search for “DokuWiki security vulnerabilities” (searching with the quotes) brings up around 11 results and a search for “MediaWiki security vulnerabilities” (with quotes again) brings up around 8 results, which indicates that neither one have had a history of any serious security flaws.


Feature MediaWiki DokuWiki
WYWISYG Yes via an extension, but it requires a “node.js” server which is not available on normal shared hosting Yes
Database MySQL, PostgreSQL, Oracle and SQLite File Storage
Page-level Permissions Yes Yes
ACL Availablevia various extensions, see here for more info Built in
Page Preview Yes Yes
Minor Changes Yes Yes
Changes Summary Yes Yes
Page History Yes Yes
Page Revisions Yes Yes
Revision Diffs View Yes Yes
Pages Index Yes Yes
Plugin System Yes Yes
Template System Yes Yes
Caching Yes Yes
Full text search Yes Yes
API YesSee the API:Main Page for details YesSee the Remote API for details

Community and Support

DokuWiki features the active DokuWiki User Forum, powered by the Unclassified NewsBoard forum package.

MediaWiki features the Support desk forum, powered by MediaWiki itself, plus a Meta-Wiki area with more options for support such as Mailing lists and IRC. There are then tags on StackExchange’s Web Applications section as well as their ProWebmasters area.

More Information

For more information about MediaWiki, see our MediaWiki Knowledge Base.

For more information about DokuWiki, see our DokuWiki Knowledge Base.


MediaWiki is larger and more powerful, yet more complicated to setup and manage. DokuWiki is small and simple, and easier to use. Both have their place.

Both are wikis et they are quite different different. Both have their own space and usage scenario, and they both are best at what they were meant to offer at their core.

To decide you need to ask following questions:

  • What is the purpose of your Wiki.
  • Uploading of article will be open to a community or will it be handled by your organisation alone.
  • Are these articles discrete or related. eg: A user manual will have software versions (or product models) and each will have its own set of specific articles.
  • What level of access control do you need.
  • Are you a software company that wants to use repository to easily manage the documentation along with the source code.
  • Is the tool available in your language.

Post Conclusion

If you’re looking for hosting for MediaWiki or for DokuWiki, whether in the USA or Europe, we recommend CiviHosting. Let us install and secure your wiki for you:

About the Author
David Feldman is a Senior Technical Advisor for CiviHosting, You can contact him via our Contact Us page.

Nextcloud vs ownCloud – The Whole Story

Battle of the Clouds

Interested in finding the private cloud package that will work for you?

So are we! 🙂

In the open source private cloud space, there exist several options, such as ownCloud, Nextcloud, Seafile, Syncthing and Pydio as well as smaller players such as SparkleShare.

To see what’s happening in this market, let’s take a brief look at this Google Trends graph of interest in the top four packages over the past 5 years:

Google Trends

Shows pretty clearly that ownCloud and Nextcloud dwarf the competition, and it also seems pretty clear that since its inception, interest in Nextcloud has been growing fast and today has actually more Google searches than ownCloud.

Which project is actually bigger however is not clear. On a 2018 press release Nextcloud notes that they had “over 100K downloads of the Collabora Nextcloud app” in 2017 and in another 2018 press release claim that they have over 35 employees and “over 100 customers and partners.” ownCloud, on the other hand, in a 2018 blog post claim that they have almost 500 customers and that they hired 17 new employees in 2017. Both appear to be growing fast.

Not a surprise then that people are asking every day for details about Nextcloud vs ownCloud. What’s the difference?

This is indeed an excellent question and below we’re going to detail exactly what differences exist. Yes, we are entering now the Battle of the Clouds! 🙂

We will examine four areas:

  1. History – when and how did these two projects get started
  2. Who – what people are funding and supporting the software
  3. License – what is the license for each
  4. Product – what differences exist in the actual product

The last section Product is certainly the largest section and may be of most interest to many, so if you want, just click on the word Product to jump straight there.

A Brief History

ownCloud was launched in January 2010 by Frank Karlitschek and the first beta release came out in March 2010. In 2012 ownCloud Inc. was formed to serve the needs of the community of users of ownCloud. After the Nextcloud fork, ownCloud Inc. was shut down and today ownCloud is still managed by ownCloud GmbH.

Nextcloud was launched in April 2016 when Karlitschek forked ownCloud to create Nextcloud. Most of the core contributors of ownCloud left with Karlitschek to join forces in the new Nextcloud project, managed by the new company formed at the same time, Nextcloud GmbH. Within 6 months Nextcloud GmbH was profitable and remains today profitable and still manages the Nextcloud project.

Regarding why Karlitschek left ownCloud, he himself expresses most clearly in his blog post big changes: I am leaving ownCloud, Inc. today. How this affected the community and for other responses to the fork you can read up in various other places like ownCloud’s blog, The New Stack, TechRepublic, CIO, ITWire and others.


The ownCloud project is split into two components, the open source Standard Edition and the Enterprise Edition, which is not open source, but the code can be downloaded without obfuscation. The Standard Edition is represented by and managed by ownCloud GmbH and the list of contributors is online.

The Enterprise Edition is represented by, has more features, and is also managed by ownCloud GmBH. They also have an exclusive partnership for North American clients with a company called XTIVIA and there is an XTIVIA page on the ownCloud site describing this relationship. ownCloud also has an official Meet the Team page.

Nextcloud has one open source edition and is represented online by and managed by Nextcloud GmbH and the list of contributors is online and boasts that over 1000 people have contributed to Nextcloud.


ownCloud Standard Edition is licensed under the GNU AGPLv3 and the core code is covered by the ownCloud Contributor License Agreement (CLA)

ownCloud Enterprise Edition is not open source and is licensed under the ownCloud Commercial License.

Nextcloud is licensed under the GNU AGPLv3.

The Product

The latest release of ownCloud Standard Edition released May 2017 is version 10 or ownCloud X, as they call it. The rest of our review is only regarding the Standard Edition, which is open source. The ownCloud Enterprise Edition does have more features not listed below.

Nextcloud’s latest release, from February 2018, is version 13.

Below we have these sub-sections in this section:

  1. Screenshots
  2. Pricing
  3. Technology
  4. Security
  5. Features
  6. Community and Support

Here’s the first one:


Preview the two login screens head to head — they’re quite similar:

Here we show you the top left corner of the initial screen, known as the “Files” page. This is essentially the Home page of a private cloud:

Nextcloud Files Screen
ownCloud Files Screen

Click on the share icon for a file and you see on the right side the share menu for that file:

Nextcloud Sharing Menu
ownCloud Sharing Menu

On our installation with several apps installed, Nextcloud shows each as a small icon, accessible directly from the main menu top bar. If you install a lot of apps in Nextcloud, however, you also must use a dropdown menu feature to see the rest:

Nextcloud Apps Menu

In ownCloud you must first click on the dropdown menu, but then the app icons are larger and have text also:

ownCloud Apps Menu

Here is the initial apps page of Nextcloud:

Nextcloud Apps Page

If you select a category on the left, however, you do get a nicer view of available apps:

Nextcloud Apps Category

Here is the initial Marketplace page of ownCloud:

ownCloud Marketplace


Pricing for Nextcloud and ownCloud are free. That means they cost precisely zero dollars and zero cents to use them for as unlimited time, with unlimited data and unlimited users. There is no fee whatsover to download and use either package — they are both Open Source and completely free.

The marketing experts at FileCloud will try to convince you that each of these packages costs thousands of dollars per year, more in fact than their own commercial package. They make a convincing case that their product is less expensive. What they fail to mention, however, is that the fees they mention for Nextcloud and ownCloud are not software fees, they are optional support subscriptions.

There is a Nextcloud Pricing page as well as an ownCloud Pricing page, but again, these are only for a support subscription — you are not required to purchase that.

The base price for both is just ZERO. You of course need hosting and you can see our own Nextcloud hosting page for information about our hosting services, or you can host it yourself at home.


Both packages are built in PHP and support SQLite or MySQL/MariaDB. The installation procedure is virtually the same for both. For details, see our own How to Install Nextcloud page.

Regarding the code base, both are public of course and so you can see exactly what progress is being made. If we compare the GitHub Nextcloud “commit activity” graph and the ownCloud “commit activity” graph, you can see that Nextcloud has around twice as many commits as ownCloud does. A representative from ownCloud commented to us offline that their approach is to make fewer, but larger commits, but if we examine the Nextcloud “code frequency” graph vs the ownCloud “code frequency” graph it’s quite clear that since the split in 2016, the Nextcloud team has made far more development with the codebase than ownCloud.

They also have several more releases over the past year than ownCloud. Given that both packages started with the exact same code base when Nextcloud forked, this gives one an idea of where the action is.


The Nextcloud team has invested a lot in improving security for their product, such as better password handling, brute force protection, rate limiting, integration with various enterprise authentication methods, CSP and more.

Nextcloud features a public Security Scan Tool which scans both Nextcloud and ownCloud instances and ownCloud also has a public Security Scan Tool as well.

Nextcloud, however, features an up to $5,000 Bug Bounty Program at HackerOne, a vulnerability coordination and bug bounty platform. You can see more on the Nextcloud page there.

The Nextcloud page there boasts an initial response time of under an hour and a response percentage of 100% whereas ownCloud’s page doesn’t mention the initial response time and shows a response percentage of only 82%.

ownCloud also has a page there, but as of Dec 19, 2018, it is not active and says “ownCloud is taking a break and is not accepting new submissions”. You can see for yourself the ownCloud page there.


Feature Nextcloud ownCloud
File Storage YesUpload, synch, comments, tags, multiple versions, move files via web interface YesUpload, synch, comments, tags, multiple versions, move files via web interface
File Sharing YesShare via user, email, link, social media sites, password protection and expiration date. Can allow user without an account (just email) to edit a document. YesShare via user, or link, social media sites, password protection and expiration date
Full Text Search YesThe Nextant app integrates Apache Solr YesIntegration with ElasticSearch available via a fee-based add-on
Folder Sharing YesShare via user, email, link, social media sites, password protection and expiration date. Can allow user to view and upload. YesShare via user, or ink, social media sites, password protection and expiration date. Can allow user to view and upload.
LibreOffice Online Integration Yes Yes
PDF Viewer YesBuilt in YesPDF Viewer app available
Photo Galleries Yes Yes
Document Editing for Email Users with no Login Yes No
Activity Tracking for Files YesBuilt in YesActivity app available
Large File Support Yes Yes
Storage Limitation per User Yes Yes
File Access Control Yes Enterprise Edition only
File Locking YesVia the W2G2 app No
Federation YesSharing files across Nextcloud servers is supported YesSharing files across ownCloud servers is supported
Web Client Yes Yes
Desktop Clients Windows, Mac, Linux Windows, Mac, Linux
Mobile Clients YesGoogle Play Android client (rated 4 and is free), Apple App store client (rated 4.7 and is free), F-Droid repository Android client and the MS Windows Store has an app still in testing YesWindows Mobile client, Google Play Android client (rated 4 and costs $4.00), Apple App store client (rated 2.9 and costs $0.99), and Blackberry World has a client
App Store / Marketplace Yes120 apps listed in the Nextcloud app store Yes62 apps listed in the ownCloud marketplace
Audio/Video Chat YesIncludes push notifications NoWe couldn’t find any app for chats for ownCloud 10
Audio/Video Player YesCouldn’t find any way to close the player however, aside from refreshing my web page Yes
Bookmarks App Yes Yes
Calendar App Yes Yes
Contacts App Yes Yes
Email YesSimple Nextcloud Mail app plus a RainLoop integration app YesRainLoop integration app
Notes Yes Yes
Weather Yes No
Two Factor Authentication YesMultiple methods available, plus enforcement YesTOTL available
Brute Force Protection YesFor both core and apps YesAvailable via the ownCloud Security app
Rate Limiting Yes No
Other Features
User Groups YesCircles app allows your users to create their own groups of users/colleagues/friends YesCustom groups app let users create and manage custom groups for sharing
API Yes Yes
External Storage Integration Yes Yes
Scability / Enterprise Support YesEnterprise level service is supported and the new Global Scale architecture is under development to expand this support further YesownCloud Enterprise Edition has Enterprise support, but is not open source nor free
Resource Monitoring Yes No
Third Party Authentication Yes Yes
Theme Customization Yes Yes
Role Based Administration Yes Yes
Delta Sync No MediumExperimental
Virtual Files No MediumExperimental
Workflow Yes Yes
Accessibility YesWCAG 2.0 AA and AAA standard compliance
Keyboard/screen reader support
Dyslexia-friendly font
Translations 33 languages available 103 languages available

Community and Support

ownCloud has a Support page with links to documentation, forums, IRC channel and other venues such as a Google Plus community, plus a mailing list. They then also have premium support for their Enterprise clients.

Nextcloud’s Support page has the same links for their documentation, forums, IRC channel and other venues such as a Google Plus community. They also provide premium support for clients who use their Enterprise support services.

Comparing the public forums shows that the most popular post on Nextcloud has over 96,000 views (entitled Migrating from ownCloud to Nextcloud) and the most popular on ownCloud’s has 38K views (entitled File is locked – how to unlock).

If you prefer video, for Nextcloud there is a Nextcloud GmbH YouTube channel with over 60 videos, the most popular of which has 25,000 views.

For ownCloud there is the ownClouders channel, which, based on the logo used, appears to be focused on the Standard Edition and has over 250 videos and the most popular there has 170,000 views, and then there is the ownCloud channel apparently representing the Enterprise Version (here you see the Enterprise logo) with over 80 videos and the most popular video there has almost 3,000 views.

A quick Google search for “Nextcloud” brings up over 841,000 results and a search for “ownCloud” brings up almost 2 million results.


Both packages have a solid base and a growing set of addon apps, both have support available. Nextcloud, however, has a lot more action, “buzz” and growth. ownCloud does not appear to be dead at all, but the future of open source clouds clearly looks to be with Nextcloud.

Post Conclusion

If you’re looking for hosting for Nextcloud or for ownCloud, whether in the USA or Europe, we recommend CiviHosting. Let us install and secure your cloud for you:

About the Author
David Feldman is a Senior Technical Advisor for CiviHosting, your Nextcloud hosting and ownCloud hosting experts. You can contact him via our Contact Us page.