# Undefined function sqlStatementNoLog() during setup

**URL:** <https://community.open-emr.org/t/undefined-function-sqlstatementnolog-during-setup/11762>\
**Category:** Support\
**Created:** [March 20, 2019, 12:57am UTC](https://community.open-emr.org/t/undefined-function-sqlstatementnolog-during-setup/11762 "2019-03-20T00:57:29Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![aaronchantrill](https://community.open-emr.org/letter_avatar_proxy/v4/letter/a/45deac/32.png) [@aaronchantrill](https://community.open-emr.org/u/aaronchantrill)\
**Post date:** [March 20, 2019, 12:57am UTC](https://community.open-emr.org/t/undefined-function-sqlstatementnolog-during-setup/11762/1 "2019-03-20T00:57:30Z")

</div>

**Situation**  
I am trying to install the latest master branch on a raspberry pi running Raspbian. This is not for production, but just to give myself a place to experiment and learn.

I cloned the git repo then ran the composer and npm commands.

```auto
~$ git clone https://github.com/openemr/openemr.git
~$ cd openemr
~/openemr$ git branch
* master
~/openemr$ composer -V
Composer version 1.2.2 2016-11-03 17:43:15
~/openemr$ npm -v
6.9.0
~/openemr$ composer install
~/openemr$ npm install
~/openemr$ npm run build
~/openemr$ composer dump-autoload -o

```

I did not keep a log of the output from the above, but they all appeared to be successful.

Raspbian has two php.ini files, one for apache and one for cli, so I made the requested changes to the apache php.ini file (/etc/php/7.0/apache2/php.ini) and symlinked the cli file to it.

I set up apache2 to serve the openemr directory and was able to access a php-info.php file from there, so apache and php seem to be set up.

When I tried to launch index.php, it redirected me to setup.php, but then I got a white screen.

The log says this:

```auto
[Tue Mar 19 20:47:54.922702 2019] [:error] [pid 19047] PHP Fatal error: Uncaught Error: Call to undefined function sqlStatementNoLog() in /home/aaron/openemr/library/translation.inc.php:42\nStack trace:\n#0 /home/aaron/openemr/common/compatibility/Checker.php(24): xl('PHP version nee...')\n#1 /home/aaron/openemr/common/compatibility/Checker.php(41): OpenEMR\\Common\\Checker::xlDelegate('PHP version nee...')\n#2 /home/aaron/openemr/setup.php(91): OpenEMR\\Common\\Checker::checkPhpVersion()\n#3 {main}\n thrown in /home/aaron/openemr/library/translation.inc.php on line 42

```

So I tried running setup.php from the command line:

```auto
~/openemr $ php setup.php
PHP Fatal error: Uncaught Error: Call to undefined function sqlStatementNoLog() in /home/aaron/openemr/library/translation.inc.php:42
Stack trace:
#0 /home/aaron/openemr/common/compatibility/Checker.php(24): xl('PHP version nee...')
#1 /home/aaron/openemr/common/compatibility/Checker.php(41): OpenEMR\Common\Checker::xlDelegate('PHP version nee...')
#2 /home/aaron/openemr/setup.php(91): OpenEMR\Common\Checker::checkPhpVersion()
#3 {main}
  thrown in /home/aaron/openemr/library/translation.inc.php on line 42

```

I found the sqlStatementNoLog function in library/sql.inc, so it seems like sql.inc is not getting referenced somewhere.

**OpenEMR Version**  
I’m using the master OpenEMR branch

**Browser** :  
N/A

**Operating System**  
Raspbian

**Logs**

```auto
[Tue Mar 19 20:47:54.922702 2019] [:error] [pid 19047] PHP Fatal error: Uncaught Error: Call to undefined function sqlStatementNoLog() in /home/aaron/openemr/library/translation.inc.php:42\nStack trace:\n#0 /home/aaron/openemr/common/compatibility/Checker.php(24): xl('PHP version nee...')\n#1 /home/aaron/openemr/common/compatibility/Checker.php(41): OpenEMR\\Common\\Checker::xlDelegate('PHP version nee...')\n#2 /home/aaron/openemr/setup.php(91): OpenEMR\\Common\\Checker::checkPhpVersion()\n#3 {main}\n thrown in /home/aaron/openemr/library/translation.inc.php on line 42

```

Thanks,  
Aaron

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [March 20, 2019, 10:39am UTC](https://community.open-emr.org/t/undefined-function-sqlstatementnolog-during-setup/11762/2 "2019-03-20T10:39:56Z")

</div>

Hi @aaronchantrill ,  
Guessing you are either:

1. Missing some php dependencies.
2. Have permission issues.

What OS is Raspbian based on? What php version?  
-brady

---

<div class="post-metadata">

**Author:** ![aaronchantrill](https://community.open-emr.org/letter_avatar_proxy/v4/letter/a/45deac/32.png) [@aaronchantrill](https://community.open-emr.org/u/aaronchantrill)\
**Post date:** [March 20, 2019, 1:23pm UTC](https://community.open-emr.org/t/undefined-function-sqlstatementnolog-during-setup/11762/3 "2019-03-20T13:23:14Z")

</div>

Hey Brady Miller, you are amazing. Thanks for getting back so quickly. Raspbian is basically Debian but optimized for arm processors. I really haven’t seen much difference between Raspbian and Debian. I’m using Raspbian Stretch, and it is currently up to date.

The php version is PHP 7.0.33-0+deb9u3. Where can I get a list of the dependencies for the current version? I used a list from [https://www.open-emr.org/wiki/index.php/OpenEMR\_System\_Architecture#OpenEMR\_Dependencies](https://www.open-emr.org/wiki/index.php/OpenEMR_System_Architecture#OpenEMR_Dependencies) for “Ubuntu 16.04 and Mint 18 and Debian 9 and greater versions (PHP7) (With MySQL or MariaDB)”.

I’m using mariadb: Server version: 10.1.37-MariaDB-0+deb9u1 Raspbian 9.0

Thank you,  
Aaron

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [March 20, 2019, 7:23pm UTC](https://community.open-emr.org/t/undefined-function-sqlstatementnolog-during-setup/11762/4 "2019-03-20T19:23:55Z")

</div>

hi @aaronchantrill ,  
OpenEMR’s most recent dev version (the master branch) requires PHP 7.1 . It should of shown a whitescreen with a message “PHP version needs to be at least 7.1.2” rather than the white screen of death, so something else is likely happening. Would get the PHP version issue fixed first and then go from there.  
-brady

---

<div class="post-metadata">

**Author:** ![aaronchantrill](https://community.open-emr.org/letter_avatar_proxy/v4/letter/a/45deac/32.png) [@aaronchantrill](https://community.open-emr.org/u/aaronchantrill)\
**Post date:** [March 20, 2019, 7:23pm UTC](https://community.open-emr.org/t/undefined-function-sqlstatementnolog-during-setup/11762/5 "2019-03-20T19:23:58Z")

</div>

I just ran the exact same setup procedure on an Ubuntu 16.04 x86\_64 system with exactly the same results.

```auto
~/openemr$ php setup.php
PHP Notice: Undefined index: temp_skip_translations in /home/drask/openemr/library/translation.inc.php on line 15
PHP Fatal error: Uncaught Error: Call to undefined function sqlStatementNoLog() in /home/drask/openemr/library/translation.inc.php:42
Stack trace:
#0 /home/drask/openemr/common/compatibility/Checker.php(24): xl('PHP version nee...')
#1 /home/drask/openemr/common/compatibility/Checker.php(41): OpenEMR\Common\Checker::xlDelegate('PHP version nee...')
#2 /home/drask/openemr/setup.php(91): OpenEMR\Common\Checker::checkPhpVersion()
#3 {main}
  thrown in /home/drask/openemr/library/translation.inc.php on line 42

```

I thought maybe there was a binary somewhere in there which was causing a failure on arm systems. So, thankfully I can eliminate that. I’m probably still missing a step in my setup process.

In both setups I have owner set to the owner of the home folder I am running out of, and group set to www-data, with 644 permissions.

Here are the modules I have loaded:

~/openemr $ php -m  
[PHP Modules]  
calendar  
Core  
ctype  
curl  
date  
dom  
exif  
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  
SPL  
standard  
sysvmsg  
sysvsem  
sysvshm  
tokenizer  
wddx  
xml  
xmlreader  
xmlwriter  
xsl  
Zend OPcache  
zip  
zlib

[Zend Modules]  
Zend OPcache

Thank you,  
Aaron

---

<div class="post-metadata">

**Author:** ![aaronchantrill](https://community.open-emr.org/letter_avatar_proxy/v4/letter/a/45deac/32.png) [@aaronchantrill](https://community.open-emr.org/u/aaronchantrill)\
**Post date:** [March 20, 2019, 7:24pm UTC](https://community.open-emr.org/t/undefined-function-sqlstatementnolog-during-setup/11762/6 "2019-03-20T19:24:57Z")

</div>

Okay, thank you. I think I just missed your response when sending mine. Sorry.

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [March 20, 2019, 7:27pm UTC](https://community.open-emr.org/t/undefined-function-sqlstatementnolog-during-setup/11762/7 "2019-03-20T19:27:29Z")

</div>

May be easier to try to a docker setup (then don’t need to worry about any dependencies on Raspbian except for docker support).

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [March 20, 2019, 7:29pm UTC](https://community.open-emr.org/t/undefined-function-sqlstatementnolog-during-setup/11762/8 "2019-03-20T19:29:32Z")

</div>

I think I see the bug here (why it is not showing the nice php error rather than whitescreen of death).

---

<div class="post-metadata">

**Author:** ![brady.miller](https://community.open-emr.org/user_avatar/community.open-emr.org/brady.miller/32/10178_2.png) [@brady.miller](https://community.open-emr.org/u/brady.miller)\
**Post date:** [March 20, 2019, 7:37pm UTC](https://community.open-emr.org/t/undefined-function-sqlstatementnolog-during-setup/11762/9 "2019-03-20T19:37:49Z")

</div>

fix for the message here, which will bring in when it passes travis:

> <https://github.com/openemr/openemr/pull/2302>

Note this will only fix the whitescreen to show the message; still need to increase your php version or use docker setup (I recommend docker setup).

---

<div class="post-metadata">

**Author:** ![aaronchantrill](https://community.open-emr.org/letter_avatar_proxy/v4/letter/a/45deac/32.png) [@aaronchantrill](https://community.open-emr.org/u/aaronchantrill)\
**Post date:** [March 20, 2019, 10:23pm UTC](https://community.open-emr.org/t/undefined-function-sqlstatementnolog-during-setup/11762/10 "2019-03-20T22:23:27Z")

</div>

Awesome, thank you so much. You rock! I just tested your patch and am now getting the “PHP version needs to be at least 7.1.2.” message. I’m attempting to install php7.1+ on one of my machines.

---

<div class="post-metadata">

**Author:** ![aaronchantrill](https://community.open-emr.org/letter_avatar_proxy/v4/letter/a/45deac/32.png) [@aaronchantrill](https://community.open-emr.org/u/aaronchantrill)\
**Post date:** [March 21, 2019, 12:02am UTC](https://community.open-emr.org/t/undefined-function-sqlstatementnolog-during-setup/11762/11 "2019-03-21T00:02:42Z")

</div>

Okay, installing PHP version 7.3 worked. I used the ondrej/php launchpad ppa to accomplish this. I’m trying to load PHP from source code on my other machine. I will also look into docker. I’m trying to figure out an ideal method for replicating both code and database to a cloud server in such a way that it is as secure as possible until the local server goes down, then can be shifted into production mode where it can be used as the primary server until the local server can be brought back up.

Thanks.
