I have old projects all running on PHP 7.1.1, all application are on CodeIgniter 3.1.11. I have installed new XAMPP which has PHP version 7.4.3. If I run my application on 7.4.3, I got this error:
An uncaught Exception was encountered
Type: Error
Message: Call to undefined function mysqli_init()
Filename: F:\xampp\htdocs\hospital\billing.hospital\system\database\drivers\mysqli\mysqli_driver.php
Line Number: 135
Even if I change PHP version 7.4 on live server, the same error comes but it is running without error on 7.3 PHP version. What needs to change in my CodeIgniter application, so that I can run on 7.4 PHP version too.
Related
When I attempt to run a PHP file containing mysqli functions through command line it throws an error like Fatal error: Uncaught Error: Call to undefined function mysqli_connect()
The same file runs perfectly through the built-in web station app so naturally, I tried running it with the -c parameter and specifying the same file that PHP is run with through the web station app:
php -c /usr/local/etc/php73/cli/php.ini /volume1/web/test.php
But I still get the same error so I am at a loss as to what the issue could be here
Synology Diskstation has a concept of packages. PHP packages are installed with a specific version number. When you want to use the same setup that you have in Web Station you must use the appropriate PHP version.
If you are using PHP 7.3 package then try executing it with php73
php73 /volume1/web/test.php
I'm currently working on an api which has been developed using Lumen 5.4. I'm trying to run this on my local XAMPP for Linux 7.4.3. But I keep getting the following error,
lumen.ERROR:
Symfony\Component\Debug\Exception\FatalThrowableError:
Call to undefined function xxx\Prometheus\Storage\apcu_add() in
/opt/lampp/htdocs/xxx-api/vendor/xxx/php-prometheus-exporter/src/Storage/APCU.php:78
Current PHP version is 7.4.3. I have installed apcu along with apcu_bc and added the following to php.ini as well,
extension=apc.so
apc.enabled="1"
but I'm not seeing any apc related info in phpinfo.php page.
Any help is appreciated.
Here are some necessary version related details of the packages I have installed on a dream-compute (godaddy) server machine with Ubuntu 16.04 with root access
Apache Server version: Apache/2.4.18 (Ubuntu)
php version 7
mongo db version v3.2.10 and
$ pecl search mongo
.Matched packages, channel pecl.php.net:
=======================================
Package Stable/(Latest) Local
mongo 1.6.14 (stable) MongoDB database driver
mongodb 1.1.9 (stable) 1.1.9 MongoDB driver for PHP
I have set up a website that was previously running on a different server with PHP 5.6 and an old mongo-php driver.
Previously I was using MongoClient class in the connection string but after some searching I changed it to MongoDB\Driver\Manager in my connection class of the php website.
I have also included extension=mongodb.so in the /etc/php/7.0/apache2/php.ini file
The rest of the website is working fine, only when i browse to a page which has a mongodb call at the back-end gives me the following error (from php error log file):
PHP Warning: Module 'mongodb' already loaded in Unknown on line 0
PHP Fatal error: Uncaught Error: Call to undefined method MongoDB\Driver\Manager::selectDB() in /var/www/html/iot/includes/class.abstract-data-collection.php:118
I am not an expert in linux and hence I am stuck here. Anyone have any idea what should I try to actually get to the problem, should I need to change the php code or is there anything I am missing in the configuration?
TA
I am currently migrating a Drupal site for local development. One of the custom modules is throwing an error:
Fatal error: Call to undefined function mssql_connect()
I installed the MS SQL PHP Driver and included it in php.ini
extension=php_sqlsrv_55_ts.dll
extension=php_pdo_sqlsrv_55_ts.dll
However, the error still persists. How can I fix it? the dll's above are for the right version of PHP (5.5.31)
I had a problem with zend library. I am using php 5.2.4 and xampp 1.6.4. I am getting the error below. Here I am using windows 8.
Fatal error: Class 'Zend_View_Helper_Placeholder_Container_Abstract' not found
in C:\xampp\php\PEAR\Zend\View\Helper\Placeholder\Container.php on line 34.
Is there any thing that I need to set. I have tried with latest version zend also. But same error.
When I work with windows 7. It is fine.