Http error 500 blank screen



i have installed own cloud on to ubuntu 16.04 64 bit

i have apache2 running with ssl
and these are the php modules i have installed
php libapache2-mod-php php-mcrypt php-mysql php-bz2 php-curl php-gd php-imagick php-intl php-mbstring php-xml and php-zip

my owncloud.log is empty
the last error in my apacha log is

[Sat Nov 05 13:59:05.924444 2016] [:error] [pid 18582] [client] PHP Fatal error: Uncaught Error: Call to undefined function OC\Log\json_encode() in /var/www/owncloud/lib/private/Log/Owncloud.php:112\nStack trace:\n#0 [internal function]: OC\Log\Owncloud::write('PHP', 'Uncaught Error:...', 3)\n#1 /var/www/owncloud/lib/private/Log.php(298): call_user_func(Array, 'PHP', 'Uncaught Error:...', 3)\n#2 /var/www/owncloud/lib/private/Log.php(156): OC\Log->log(3, 'Uncaught Error:...', Array)\n#3 /var/www/owncloud/lib/private/Log/ErrorHandler.php(67): OC\Log->critical('Uncaught Error:...', Array)\n#4 [internal function]: OC\Log\ErrorHandler::onShutdown()\n#5 {main}\n thrown in /var/www/owncloud/lib/private/Log/Owncloud.php on line 112

my apache2 accesslog shows - - [05/Nov/2016:13:59:05 +0000] "GET /owncloud/ HTTP/1.1" 500 599 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36"

and my owncloud/occ file shows

An unhandled exception has been thrown:
Error: Call to undefined function OC\Files\json_encode() in /var/www/owncloud/li b/private/Files/Filesystem.php:784
Stack trace:

0 /var/www/owncloud/lib/private/Files/Filesystem.php(551): OC\Files\Filesystem: :normalizePath('')

1 /var/www/owncloud/lib/private/Files/View.php(105): OC\Files\Filesystem::isVal idPath('')

2 /var/www/owncloud/lib/private/Server.php(115): OC\Files\View->__construct()

3 /var/www/owncloud/3rdparty/pimple/pimple/src/Pimple/Container.php(113): OC\Se rver->OC{closure}(Object(OC\Server))

4 /var/www/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(102): Pimple\Container->offsetGet('EncryptionManag...')

5 /var/www/owncloud/lib/private/ServerContainer.php(87): OC\AppFramework\Utilit y\SimpleContainer->query('EncryptionManag...')

6 /var/www/owncloud/lib/private/Server.php(695): OC\ServerContainer->query('Enc ryptionManag...')

7 /var/www/owncloud/lib/base.php(734): OC\Server->getEncryptionManager()

8 /var/www/owncloud/lib/base.php(653): OC::registerEncryptionWrapper()

9 /var/www/owncloud/lib/base.php(973): OC::init()

10 /var/www/owncloud/console.php(50): require_once('/var/www/ownclo...')

11 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')

12 {main}kenny@Brix:~$

can anybody help me



this is your issue and means that you need to install the php-json package.


Thanks I installed Json but still the same error


Once the php-json module is correctly installed and enabled/loaded you won't see this error anymore.


I installed it then reloaded and restarted apache do I need to do something else as well I haven't ran any enable code



such questions are perfectly fitting into forums of your distro like:

They have more knowledge about the distro in use and can give specific help for it.


thanks for you help i found out the json php was installed but not listed in etc/php/7.0/mods-available so i used sudo apt-get purge php-json then sudo apt-get install php-json is fixed my fault but now when i open up owncloud i get Internal Server Error my log looks like this

{"reqId":"jGyAYvqFvO+jX+OoRcal","remoteAddr":"","app":"index","message":"Exception: {\"Exception\":\"Error\",\"Message\":\"Class 'PDO' not found\",\"Code\":0,\"Trace\":\"#0 \\/var\\/www\\/owncloud\\/lib\\/private\\/Setup.php(170): OC\\Setup->getAvailableDbDriversForPdo()\n#1 \\/var\\/www\\/owncloud\\/lib\\/private\\/legacy\\/util.php(642): OC\\Setup->getSupportedDatabases()\n#2 \\/var\\/www\\/owncloud\\/lib\\/base.php(587): OC_Util::checkServer(Object(OC\\AllConfig))\n#3 \\/var\\/www\\/owncloud\\/lib\\/base.php(973): OC::init()\n#4 \\/var\\/www\\/owncloud\\/index.php(37): require_once('\\/var\\/www\\/ownclo...')\n#5 {main}\",\"File\":\"\\/var\\/www\\/owncloud\\/lib\\/private\\/Setup.php\",\"Line\":114}","level":3,"time":"2016-11-06T11:03:56+00:00","method":"GET","url":"\/owncloud\/","user":"--"}
{"reqId":"jGyAYvqFvO+jX+OoRcal","remoteAddr":"","app":"PHP","message":"PHP Startup: Unable to load dynamic library '\/usr\/lib\/php\/20151012\/' - \/usr\/lib\/php\/20151012\/ undefined symbol: php_pdo_unregister_driver at Unknown#0","level":3,"time":"2016-11-06T11:03:56+00:00","method":"GET","url":"\/owncloud\/","user":"--"}

i wouldn't be surprised if its another php problem as tried installing and uninstalling a good few times now so might have broken other php files

Error trying to create admin user: failed to connect to the database



is causing the following issue:

As your initial issue is solved i'm closing here. The new issue is something you should really get help from a mentioned Ubuntu forums.