Do you use or administer OpenEMR? Take the General Satisfaction Survey to help improve the product

Billing Problems in v6 after upgrade from 5.0.2 (4)

Situation
Getting a white “Unknown” screen when posting payments and ERA Uploads

OpenEMR Version
I’m using OpenEMR version 6.0.0 (1)

Browser:
I’m using: FF87

Operating System
I’m using: Ubuntu 18.04

Logs
Did you check the logs? Yes
Was there anything pertinent in them? Yes
Please paste them here [Wed Mar 31 12:39:15.471271 2021] [php:error] [pid 25780] [client 192.168.1.149:58390] PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * int in /var/www/html/openemr/interface/billing/payment_pat_sel.inc.php:27\nStack trace:\n#0 /var/www/html/openemr/interface/billing/new_payment.php(353): require_once()\n#1 {main}\n thrown in /var/www/html/openemr/interface/billing/payment_pat_sel.inc.php on line 27, referer: https://192.168.1.131/openemr/interface/billing/new_payment.php [Wed Mar 31 12:39:55.989156 2021] [php:warn] [pid 25786] [client 192.168.1.149:58396] PHP Warning: Undefined variable $payment_id in /var/www/html/openemr/interface/billing/edit_payment.php on line 350, referer: https://192.168.1.131/openemr/interface/main/tabs/main.php?token_main=3IXuXgeGOzu9Qh6MLkJrQfloVBhaPpTA27peYb1R [Wed Mar 31 12:39:56.073666 2021] [php:warn] [pid 25786] [client 192.168.1.149:58396] PHP Warning: Undefined array key "ParentPage" in /var/www/html/openemr/interface/billing/edit_payment.php on line 590, referer: https://192.168.1.131/openemr/interface/main/tabs/main.php?token_main=3IXuXgeGOzu9Qh6MLkJrQfloVBhaPpTA27peYb1R [Wed Mar 31 12:39:56.110137 2021] [php:warn] [pid 25786] [client 192.168.1.149:58396] PHP Warning: Undefined variable $hidden_patient_code in /var/www/html/openemr/interface/billing/edit_payment.php on line 1059, referer: https://192.168.1.131/openemr/interface/main/tabs/main.php?token_main=3IXuXgeGOzu9Qh6MLkJrQfloVBhaPpTA27peYb1R [Wed Mar 31 12:39:56.110252 2021] [php:warn] [pid 25786] [client 192.168.1.149:58396] PHP Warning: Undefined array key "mode" in /var/www/html/openemr/interface/billing/edit_payment.php on line 1062, referer: https://192.168.1.131/openemr/interface/main/tabs/main.php?token_main=3IXuXgeGOzu9Qh6MLkJrQfloVBhaPpTA27peYb1R [Wed Mar 31 12:39:56.110299 2021] [php:warn] [pid 25786] [client 192.168.1.149:58396] PHP Warning: Undefined variable $Message in /var/www/html/openemr/interface/billing/edit_payment.php on line 1067, referer: https://192.168.1.131/openemr/interface/main/tabs/main.php?token_main=3IXuXgeGOzu9Qh6MLkJrQfloVBhaPpTA27peYb1R [Wed Mar 31 12:39:56.110345 2021] [php:warn] [pid 25786] [client 192.168.1.149:58396] PHP Warning: Undefined array key "ParentPage" in /var/www/html/openemr/interface/billing/edit_payment.php on line 1070, referer: https://192.168.1.131/openemr/interface/main/tabs/main.php?token_main=3IXuXgeGOzu9Qh6MLkJrQfloVBhaPpTA27peYb1R [Wed Mar 31 12:40:03.553806 2021] [php:warn] [pid 25786] [client 192.168.1.149:58396] PHP Warning: Undefined variable $payment_id in /var/www/html/openemr/interface/billing/edit_payment.php on line 350, referer: https://192.168.1.131/openemr/interface/billing/edit_payment.php?payment_id=44431 [Wed Mar 31 12:40:03.754762 2021] [php:warn] [pid 25786] [client 192.168.1.149:58396] PHP Warning: Undefined variable $Message in /var/www/html/openemr/interface/billing/edit_payment.php on line 1067, referer: https://192.168.1.131/openemr/interface/billing/edit_payment.php?payment_id=44431 [Wed Mar 31 12:40:06.167245 2021] [php:warn] [pid 25786] [client 192.168.1.149:58396] PHP Warning: Undefined variable $payment_id in /var/www/html/openemr/interface/billing/edit_payment.php on line 350, referer: https://192.168.1.131/openemr/interface/billing/edit_payment.php [Wed Mar 31 12:40:06.966337 2021] [php:warn] [pid 25786] [client 192.168.1.149:58396] PHP Warning: Undefined variable $Message in /var/www/html/openemr/interface/billing/edit_payment.php on line 1067, referer: https://192.168.1.131/openemr/interface/billing/edit_payment.php [Wed Mar 31 12:40:19.322102 2021] [php:error] [pid 25785] [client 192.168.1.149:58402] PHP Fatal error: Uncaught TypeError: Unsupported operand types: string * int in /var/www/html/openemr/library/payment.inc.php:64\nStack trace:\n#0 /var/www/html/openemr/interface/billing/edit_payment.php(326): DistributionInsert()\n#1 {main}\n thrown in /var/www/html/openemr/library/payment.inc.php on line 64, referer: https://192.168.1.131/openemr/interface/billing/edit_payment.php

We put the recommended changes (from 5.0.2) into the v8 php.ini

We’re running Php 8.0. Could this be the issue? Should we go back to 7.3?

hi @hitechelp, do you have php8.0-mbstring installed?

Yes php8.0-mbstring is installed.

Also, because we’re running system level hard disc encryption, under Global/Features we unchecked
Enable Encryption of Items Stored on Drive
and
Enable Encryption of Items Stored on CouchDB
Could that be causing this?

Appears we have installed and are running the following;

> php -m
[PHP Modules] bcmath calendar Core ctype curl date dom exif FFI fileinfo filter ftp gd gettext hash iconv json ldap libxml mbstring mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql Phar posix readline Reflection session shmop SimpleXML soap sockets sodium SPL standard sysvmsg sysvsem sysvshm tokenizer xml xmlreader xmlwriter xsl Zend OPcache zip zlib [Zend Modules] Zend OPcache

> apt-cache search php | grep "^php8"

php8.0-amqp - AMQP extension for PHP
php8.0-apcu - APC User Cache for PHP
php8.0-ast - AST extension for PHP 7
php8.0-bcmath - Bcmath module for PHP
php8.0-bz2 - bzip2 module for PHP
php8.0-cgi - server-side, HTML-embedded scripting language (CGI binary)
php8.0-cli - command-line interpreter for the PHP scripting language
php8.0-common - documentation, examples and common module for PHP
php8.0-curl - CURL module for PHP
php8.0-dba - DBA module for PHP
php8.0-decimal - Arbitrary precision floating-point decimal for PHP
php8.0-dev - Files for PHP8.0 module development
php8.0-ds - PHP extension providing efficient data structures for PHP 7
php8.0-enchant - Enchant module for PHP
php8.0-fpm - server-side, HTML-embedded scripting language (FPM-CGI binary)
php8.0-gd - GD module for PHP
php8.0-gearman - PHP wrapper to libgearman
php8.0-gmagick - Provides a wrapper to the GraphicsMagick library
php8.0-gmp - GMP module for PHP
php8.0-gnupg - PHP wrapper around the gpgme library
php8.0-grpc - High performance, open source, general RPC framework for PHP
php8.0-http - PECL HTTP module for PHP Extended HTTP Support
php8.0-igbinary - igbinary PHP serializer
php8.0-imagick - Provides a wrapper to the ImageMagick library
php8.0-imap - IMAP module for PHP
php8.0-inotify - Inotify bindings for PHP
php8.0-interbase - Interbase module for PHP
php8.0-intl - Internationalisation module for PHP
php8.0-ldap - LDAP module for PHP
php8.0-lz4 - LZ4 Extension for PHP
php8.0-mailparse - Email message manipulation for PHP
php8.0-maxminddb - Reader for the MaxMind DB file format for PHP
php8.0-mbstring - MBSTRING module for PHP
php8.0-mcrypt - PHP bindings for the libmcrypt library
php8.0-memcache - memcache extension module for PHP
php8.0-memcached - memcached extension module for PHP, uses libmemcached
php8.0-mongodb - MongoDB driver for PHP
php8.0-msgpack - PHP extension for interfacing with MessagePack
php8.0-mysql - MySQL module for PHP
php8.0-oauth - OAuth 1.0 consumer and provider extension
php8.0-odbc - ODBC module for PHP
php8.0-opcache - Zend OpCache module for PHP
php8.0-pcov - Code coverage driver
php8.0-pgsql - PostgreSQL module for PHP
php8.0-phpdbg - server-side, HTML-embedded scripting language (PHPDBG binary)
php8.0-protobuf - Protocol buffers bindings for PHP
php8.0-pspell - pspell module for PHP
php8.0-psr - PSR interfaces for PHP
php8.0-raphf - raphf module for PHP
php8.0-readline - readline module for PHP
php8.0-redis - PHP extension for interfacing with Redis
php8.0-rrd - PHP bindings to rrd tool system
php8.0-smbclient - PHP wrapper for libsmbclient
php8.0-snmp - SNMP module for PHP
php8.0-soap - SOAP module for PHP
php8.0-solr - PHP extension for communicating with Apache Solr server
php8.0-sqlite3 - SQLite3 module for PHP
php8.0-ssh2 - Bindings for the libssh2 library
php8.0-swoole - Swoole Coroutine Fiber Async Programming Framework for PHP
php8.0-sybase - Sybase module for PHP
php8.0-tidy - tidy module for PHP
php8.0-uuid - PHP UUID extension
php8.0-vips - PHP extension for interfacing with libvips
php8.0-xdebug - Xdebug Module for PHP
php8.0-xhprof - Hierarchical Profiler for PHP 5.x
php8.0-xml - DOM, SimpleXML, XML, and XSL module for PHP
php8.0-xmlrpc - XML-RPC servers and clients functions for PHP
php8.0-xsl - XSL module for PHP (dummy)
php8.0-yac - YAC (Yet Another Cache) for PHP
php8.0-yaml - YAML-1.1 parser and emitter for PHP
php8.0-zip - Zip module for PHP
php8.0-zmq - ZeroMQ messaging bindings for PHP
php8.0-zstd - Zstandard extension for PHP```

ok thanks, error is coming from this line so will have to test which value php8 doesn’t care for

Not a module issue. PHP doesn’t like mixing types especially in math.
try library/payment.inc.php L-64 and add a cast to string $_POST["Payment$CountRow"] ending with:

if (isset($_POST["Payment$CountRow"]) && (int)$_POST["Payment$CountRow"] * 1 > 0) {

actually get rid of the * 1 also. old trick to cast to int.

thanks @sjpadgett

so 2 fatal errors

This needs to be an issue because we have many of these math casts throughout. Especially any with super from network.
@hitechelp I’d go back to PHP7.4 or 7.3 if already installed.

in interface\super? what’s network?

super globals?

Thanks Jerry

Will reverting back to 7.3 or 7.4 give us problems with accessing data we’ve put in while running php8.0?

shouldn’t it’s just how it’s evaluated

Thanks guys, I’ll let you know.

sorry, I type in riddles these days.:slight_smile:
I meant global super vars $_POST etc.

1 Like

Doubtful. I’d go with PHP7.4

Well done gentlemen, 7.4 is the ticket!

Logs are clean too!

1 Like