Fatal error: Call to undefined function printer_list() - php

So Im busy with this project that involves printing. I found a class online to do so. But when I try to test it, I get the following error:
Fatal error: Call to undefined function printer_list() in /Applications/XAMPP/xamppfiles/htdocs/barcode/Sample.php on line 9
And I know that I probably should install an extention, but how which one and how to do so? I use Xampp on OSX Yosemite.

The printer extension working only on Windows

printer_list() id deprecate in new php

Related

PHP Fatal error: Class 'WP_UnitTestCase' not found - phpunit

I know that it already has answer in PHP Fatal error: Class 'WP_UnitTestCase' not found when trying to run test-sample But it doesn't fixed my issue. I am trying to initialize php unit testing with my wordpress plugin using phpunit. I found this tutorial and it was easy to follow. Here's the link
https://www.smashingmagazine.com/2017/12/automated-testing-wordpress-plugins-phpunit/
Everything was working great until the below step.
When I came to this Step in tutorial where the command I tried to run
phpunit tests/test-sample.php
and I get:
PHP Fatal error: Class 'WP_UnitTestCase' not found in PHP Fatal error: Class 'WP_UnitTestCase' not found in /var/www/html/testwordpress/wp-content/plugins/wp-ultimate-csv-importer/tests/test-sample.php on line 11
I don't Know how to solve this issue. I found the same question in Stackoverflow. Here's the Link:
PHP Fatal error: Class 'WP_UnitTestCase' not found when trying to run test-sample
But it was in windows. Somehow he managed to fix it. I checked his solution and it says that issue in MySQL.
But in my case, MySQL works fine and I am in linux with the flavor of Ubuntu. Help me with some solutions to fix this problem in Linux

Prestashop: Call to undefined function mysql_connect

I installed prestashop using softaculous, my php version is 5.2.17 and despite of that it shows this
ERROR: Fatal error: Call to undefined function mysql_connect() in /home/adeego/public_html/prestashop/classes/db/MySQL.php on line 51
If I go changing php version then it will be very painful to change every mysql_ into mysqli_ or pdo_mysqli_.
What is the best solution?

PHP Fatal error: Call to undefined function json_decode() on Cpanel

I have php 5.6 version but still face that error
I'm using Cpanel to run a codeigniter project and I got this error:
PHP Fatal error: Call to undefined function json_decode() in/home/ntn/public_html/application/controllers/Login.php on line 69
I don't know how to solve this error
How can I resolve this error?
Unless you show your code, I cannot help you because call to undefined function is means it is calling a function which is not defined or mention in your code. its not a cpanel error for sure. its an error in your code

"Fatal error: Call to undefined function" resulting in particular local server, but ran well in others'

I'm developing a PHP application which generating reports to PDF
Right now I'm facing some troubles
I'm working from my own computer with XAMPP Server and the code ran well
But when I copied the codes to my office's WAMP5 Version 1.6.5 Server I got errors
Fatal error: Call to undefined function array_fill_keys() in D:\wwwroot\tcpdf\include\tcpdf_fonts.php on line 1848
I went to that troubled line and removed it, but another Fatal error: Call to undefined function occured
Is there something wrong with my WAMP5 configuration?
Thanks
Your version of php is to old... as Royal Bg suspected.
Either upgrade to 1.6.6 for php 5.2. But if there is no reason to use such an old version switch to something less than 7 years old :)
see:
http://sourceforge.net/p/wampserver/news/?source=navbar

Fatal error: Call to undefined method SplFileInfo::getRealPath()

I've got a client who has just set up a new VPN and is attempting to install my plugin.
He's getting the following error:
Fatal error: Call to undefined method SplFileInfo::getRealPath() on the commented line below. This appears to have something to do with the ZEND libraries. Any ideas what I should tell him to do?
If you are getting the undefined error means you have lower version of PHP.
The function is supported after PHP 5.2.2
SplFileInfo::getRealPath
(PHP 5 >= 5.2.2)
SplFileInfo::getRealPath — Gets
absolute path to file
http://php.net/manual/en/splfileinfo.getrealpath.php

Categories