Sorry if this is covered somewhere but I couldn’t find after querying past posts. Here are the details. Want to continue with AWS/HostJane managed server, just if someone can point me in right direction pls ![]()
The Basics
- Nextcloud Server version:
31.0.7
- Operating system and version:
Ubuntu 22.04
- Web server and version:
Apache 2.4.52
- PHP version:
8.1 and i confirmed all these modules are installed: gd, mysql, curl, mbstring, intl, gmp, bcmath, xml, imagick, zip.
- Is this the first time you’ve seen this error? (Yes / No):
Yes
- When did this problem seem to first start?
- I was using my old host (hetzner server) where I was running Nextcloud-28.0.0 on an Ubuntu 22.04 version I ran with LAMP (installed according to these steps - How To Install LAMP Stack (Apache, MySQL, PHP) on Ubuntu | DigitalOcean) and moved because I wanted to switch to AWS EC2 which is what HostJane provides with a comparative version of Ubuntu 22.04.
- Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
Nextcloud Archive
- Are you using CloudfIare, mod_security, or similar? (Yes / No)
mod_security is disabled
Summary of the issue you are facing:
After following standard installation steps for Nextcloud on Ubuntu 22.04 (e.g., installing Apache, MariaDB, PHP, and required PHP modules, then downloading and configuring Nextcloud) on a new HostJane Ubuntu server (its basically an Amazon EC2 compute managed by them - https://www.hostjane.com) I encountered an Internal Server Error (500) when accessing the Nextcloud web interface. Apache error log (/var/log/apache2/error.log) shows PHP Fatal error: Uncaught Error: Call to undefined function mb_convert_encoding() in /var/www/html/nextcloud/lib/base.php … Fatal error: require_once(): Failed opening required '/var/www/html/nextcloud/lib/composer/autoload.php' .. but php-mbstring is installed.
Steps to replicate it:
-
Steps were I installed Nextcloud
sudo tar -xjfv nextcloud-31.0.7.tar.bz2 /var/www/nextcloud/
on this pre-installed LAMP PHP server from https://cloud.hostjane.com/cloud/ which I confirmed uses Ubuntu 22.04 -
I can’t get access to Nextcloud log entries, because can’t access the Nextcloud web interface on this server. The error message is vague and all the PHP modules that I believe Nextcloud requires are installed and NOT missing: php-gd, php-mbstring, php-xml. Nextcloud directory (/var/www/html/nextcloud) is be owned by the Apache user (www-data).
-
I took this to the HostJane support and she tried to help then said the apache is configured correctly with no disabled modules (mod_rewrite, mod_env) and virtual hosts looks ok, server works fine without Nextcloud but I’m still getting the error as soon as I install Nextcloud from the archive. There are no enabled SELinux or AppArmor issues. My virtual hosts looks like this:
<VirtualHost *:80>
ServerName #######.com
DocumentRoot /var/www/html/nextcloud
<Directory /var/www/html/nextcloud/>
Options +FollowSymlinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/nextcloud.error
CustomLog ${APACHE_LOG_DIR}/nextcloud.access combined
</VirtualHost>