Php7.3 on Ubuntu 16.04

I’m using Ubuntu 16.04 and recently upgraded the server to php7.3 from php7.0 but then was unable to open any libretime pages (Ooops something went wrong).

I note on github that php7.2/7.3 support is quoted on ubuntu 18.04, is there an issue running php7.3 on 16.04? Do I need to re-run the installer or should it ‘just work’ ? Thanks.

Can someone please help me debug this a bit further? Under php 7.3, all the airtime services are running but the webpages can’t be generated;

Airtime Liquidsoap Service
Loaded: loaded (/etc/systemd/system/airtime-liquidsoap.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2020-06-11 10:59:58 BST; 2s ago
Main PID: 19974 (airtime-liquids)
CGroup: /system.slice/airtime-liquidsoap.service
└─19974 /usr/bin/python /usr/bin/airtime-liquidsoap

Jun 11 10:59:58 fqdn airtime-liquidsoap[19974]: response = meth(req, response)
Jun 11 10:59:58 fqdn airtime-liquidsoap[19974]: File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
Jun 11 10:59:58 fqdn airtime-liquidsoap[19974]: 'http', request, response, code, msg, hdrs)
Jun 11 10:59:58 fqdn airtime-liquidsoap[19974]: File "/usr/lib/python2.7/urllib2.py", line 473, in error
Jun 11 10:59:58 fqdn airtime-liquidsoap[19974]: return self._call_chain(*args)
Jun 11 10:59:58 fqdn airtime-liquidsoap[19974]: File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
Jun 11 10:59:58 fqdn airtime-liquidsoap[19974]: result = func(*args)
Jun 11 10:59:58 fqdn airtime-liquidsoap[19974]: File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
Jun 11 10:59:58 fqdn airtime-liquidsoap[19974]: raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
Jun 11 10:59:58 fqdn airtime-liquidsoap[19974]: HTTPError: HTTP Error 500: Internal Server Error

also

airtime-playout[18719]: 2020-06-11 11:00:32,338 [api_client] [INFO ] Unable to get Airtime API version number.

apache log looks like this;

ip.addres - - [11/Jun/2020:11:21:57 +0100] "GET /api/get-stream-setting/format/json/api_key/CEEMCRK********EN2BK/ HTTP/1.1" 500 4164 "-" "Python-urllib/2.7"
ip.address - - [11/Jun/2020:11:21:57 +0100] "GET /api/version/api_key/CEEMCRK********EN2BK HTTP/1.1" 500 4164 "-" "Python-urllib/2.7"
ip.address - - [11/Jun/2020:11:22:00 +0100] "GET /api/get-stream-setting/format/json/api_key/CEEMCRK********EN2BK/ HTTP/1.1" 500 4164 "-" "Python-urllib/2.7"
ip.address - - [11/Jun/2020:11:22:00 +0100] "GET /api/get-stream-setting/format/json/api_key/CEEMCRK********EN2BK/ HTTP/1.1" 500 4164 "-" "Python-urllib/2.7"
ip.address - - [11/Jun/2020:11:22:02 +0100] "GET /api/version/api_key/CEEMCRK********EN2BK HTTP/1.1" 500 4164 "-" "Python-urllib/2.7"

no errors are generated in the apache2 error.log, at rest or at login. Downgrading from php7.3 to 7.0 and airtime works again, no services needed restarting :thinking:

Please let me know what other logs you want to see…

Re-running the installer with php7.3 enabled doesn’t seem to make a difference to the installer… it’s checking for php7.0 files…

php7.0 is already the newest version (7.0.33-29+ubuntu16.04.1+deb.sury.org+1).
php7.0-curl is already the newest version (7.0.33-29+ubuntu16.04.1+deb.sury.org+1).
php7.0-gd is already the newest version (7.0.33-29+ubuntu16.04.1+deb.sury.org+1).
php7.0-pgsql is already the newest version (7.0.33-29+ubuntu16.04.1+deb.sury.org+1).

zendphp.log;

2020-06-11T16:54:21+01:00 ERR (3): fqdn [ErrorController.php:26 - errorAction()] - Unable to open PDO connection [wrapped: could not find driver]
2020-06-11T16:54:21+01:00 ERR (3): fqdn [ErrorController.php:27 - errorAction()] - #0 /usr/share/airtime/php/vendor/propel/propel1/runtime/lib/Propel.php(587): Propel::initConnection(Array, 'airtime')
#1 /usr/share/airtime/php/vendor/propel/propel1/runtime/lib/Propel.php(613): Propel::getMasterConnection('airtime')
#2 /usr/share/airtime/php/vendor/propel/propel1/runtime/lib/Propel.php(564): Propel::getSlaveConnection('airtime')
#3 /usr/share/airtime/php/vendor/propel/propel1/runtime/lib/query/ModelCriteria.php(1244): Propel::getConnection('airtime', 'read')
#4 /usr/share/airtime/php/airtime_mvc/application/models/Preference.php(847): ModelCriteria->findOne()
#5 /usr/share/airtime/php/airtime_mvc/application/upgrade/Upgrades.php(39): Application_Model_Preference::GetSchemaVersion()
#6 /usr/share/airtime/php/airtime_mvc/application/common/TaskManager.php(188): UpgradeManager::checkIfUpgradeIsNeeded()
#7 /usr/share/airtime/php/airtime_mvc/application/common/TaskManager.php(60): UpgradeTask->shouldBeRun()
#8 /usr/share/airtime/php/airtime_mvc/application/controllers/plugins/PageLayoutInitPlugin.php(64): TaskManager->runTask('UpgradeTask')
#9 /usr/share/airtime/php/vendor/zf1s/zend-controller/library/Zend/Controller/Plugin/Broker.php(260): PageLayoutInitPlugin->routeShutdown(Object(Zend_Controller_Request_Http))
#10 /usr/share/airtime/php/vendor/zf1s/zend-controller/library/Zend/Controller/Front.php(923): Zend_Controller_Plugin_Broker->routeShutdown(Object(Zend_Controller_Request_Http))
#11 /usr/share/airtime/php/vendor/zf1s/zend-application/library/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#12 /usr/share/airtime/php/vendor/zf1s/zend-application/library/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#13 /usr/share/airtime/php/airtime_mvc/application/airtime-boot.php(84): Zend_Application->run() #14 /usr/share/airtime/php/airtime_mvc/public/index.php(68): require_once('/usr/share/airt...')
#15 {main}
2020-06-11T16:54:21+01:00 ERR (3): fqdn [ErrorController.php:54 - errorAction()] - An internal application error has occurred.: PDOException: could not find driver in /usr/share/airtime/php/vendor/propel/propel1/runtime/lib/connection/PropelPDO.php:153
Stack trace:
#0 /usr/share/airtime/php/vendor/propel/propel1/runtime/lib/connection/PropelPDO.php(153): PDO->__construct('pgsql:host=loca...', NULL, NULL, Array)
#1 /usr/share/airtime/php/vendor/propel/propel1/runtime/lib/Propel.php(685): PropelPDO->__construct('pgsql:host=loca...', NULL, NULL, Array)
#2 /usr/share/airtime/php/vendor/propel/propel1/runtime/lib/Propel.php(587): Propel::initConnection(Array, 'airtime')
#3 /usr/share/airtime/php/vendor/propel/propel1/runtime/lib/Propel.php(613): Propel::getMasterConnection('airtime')
#4 /usr/share/airtime/php/vendor/propel/propel1/runtime/lib/Propel.php(564): Propel::getSlaveConnection('airtime')
#5 /usr/share/airtime/php/vendor/propel/propel1/runtime/lib/query/ModelCriteria.php(1244): Propel::getConnection('airtime', 'read')
#6 /usr/share/airtime/php/airtime_mvc/application/models/Preference.php(847): ModelCriteria->findOne()
#7 /usr/share/airtime/php/airtime_mvc/application/upgrade/Upgrades.php(39): Application_Model_Preference::GetSchemaVersion()
#8 /usr/share/airtime/php/airtime_mvc/application/common/TaskManager.php(188): UpgradeManager::checkIfUpgradeIsNeeded()
#9 /usr/share/airtime/php/airtime_mvc/application/common/TaskManager.php(60): UpgradeTask->shouldBeRun()
#10 /usr/share/airtime/php/airtime_mvc/application/controllers/plugins/PageLayoutInitPlugin.php(64): TaskManager->runTask('UpgradeTask')
#11 /usr/share/airtime/php/vendor/zf1s/zend-controller/library/Zend/Controller/Plugin/Broker.php(260): PageLayoutInitPlugin->routeShutdown(Object(Zend_Controller_Request_Http))
#12 /usr/share/airtime/php/vendor/zf1s/zend-controller/library/Zend/Controller/Front.php(923): Zend_Controller_Plugin_Broker->routeShutdown(Object(Zend_Controller_Request_Http))
#13 /usr/share/airtime/php/vendor/zf1s/zend-application/library/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#14 /usr/share/airtime/php/vendor/zf1s/zend-application/library/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#15 /usr/share/airtime/php/airtime_mvc/application/airtime-boot.php(84): Zend_Application->run()
#16 /usr/share/airtime/php/airtime_mvc/public/index.php(68): require_once('/usr/share/airt...')
#17 {main}

Next PropelException: Unable to open PDO connection [wrapped: could not find driver] in /usr/share/airtime/php/vendor/propel/propel1/runtime/lib/Propel.php:689
Stack trace:
#0 /usr/share/airtime/php/vendor/propel/propel1/runtime/lib/Propel.php(587): Propel::initConnection(Array, 'airtime')
#1 /usr/share/airtime/php/vendor/propel/propel1/runtime/lib/Propel.php(613): Propel::getMasterConnection('airtime')
#2 /usr/share/airtime/php/vendor/propel/propel1/runtime/lib/Propel.php(564): Propel::getSlaveConnection('airtime')
#3 /usr/share/airtime/php/vendor/propel/propel1/runtime/lib/query/ModelCriteria.php(1244): Propel::getConnection('airtime', 'read')
#4 /usr/share/airtime/php/airtime_mvc/application/models/Preference.php(847): ModelCriteria->findOne()
#5 /usr/share/airtime/php/airtime_mvc/application/upgrade/Upgrades.php(39): Application_Model_Preference::GetSchemaVersion()
#6 /usr/share/airtime/php/airtime_mvc/application/common/TaskManager.php(188): UpgradeManager::checkIfUpgradeIsNeeded()
#7 /usr/share/airtime/php/airtime_mvc/application/common/TaskManager.php(60): UpgradeTask->shouldBeRun()
#8 /usr/share/airtime/php/airtime_mvc/application/controllers/plugins/PageLayoutInitPlugin.php(64): TaskManager->runTask('UpgradeTask')
#9 /usr/share/airtime/php/vendor/zf1s/zend-controller/library/Zend/Controller/Plugin/Broker.php(260): PageLayoutInitPlugin->routeShutdown(Object(Zend_Controller_Request_Http))
#10 /usr/share/airtime/php/vendor/zf1s/zend-controller/library/Zend/Controller/Front.php(923): Zend_Controller_Plugin_Broker->routeShutdown(Object(Zend_Controller_Request_Http))
#11 /usr/share/airtime/php/vendor/zf1s/zend-application/library/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#12 /usr/share/airtime/php/vendor/zf1s/zend-application/library/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#13 /usr/share/airtime/php/airtime_mvc/application/airtime-boot.php(84): Zend_Application->run()
#14 /usr/share/airtime/php/airtime_mvc/public/index.php(68): require_once('/usr/share/airt...')
#15 {main}

OK, simple environment error… zendphp.log > Unable to open PDO connection [wrapped: could not find driver]
Comparing info.php for both versions, in php7.0 I have;
PDO drivers|mysql, pgsql
in php7.3 I have;
PDO drivers|mysql
Installing the missing pgsql driver
sudo apt install php7.3-pgsql
fixed it up and everything worked immediately. I hope this helps someone else :slight_smile: