Issue

The Z-Ray database was not created successfully.  Some common symptoms are a file-size of 0 for /usr/local/zend/var/db/devbar.db. SQL related error messages when visiting the Z-Ray page in the UI (Configurations > Z-Ray).  Z-Ray not loading on pages as expected.

Environment

Zend Server 7

Linux

Resolution

The Z-Ray database can be regenerated with the following steps, run as root.  For some distributions this will require using sudo.


# cd /usr/local/zend/var/db
# mv devbar.db devbar.db.bak
# sqlite3 devbar.db
sqlite> .read /usr/local/zend/share/devbar_sqlite_create_database.sql
sqlite> .read /usr/local/zend/share/devbar_fixtures.sql
sqlite> .quit
# chmod 664 devbar.db
# chown zend:apache devbar.db
# /usr/local/zend/bin/zendctl.sh restart


Details

Under certain conditions, the sqlite database used by Z-Ray is not generated correctly.  The database must be generated manually.