I am using prepared statements but I'm experiencing this problem:
Fatal error: Call to undefined method mysqli_stmt::get_result() in ...
I tried it in xampp and get_result(); works perfectly, however I have a dedicated server with cPanel/WHM installed and I get this error. I have installed MYSQLND rebooted the system but still the error occurs.
My Code:
$sqlzprep = $db->prepare("SELECT COUNT(*) FROM table WHERE table1=? AND table2=? AND table3=? AND table4=? AND table5=?");
$sqlzprep->bind_param("sssss", $list[0], $list[2], $list[3], $list[4], $list[5]);
$sqlzprep->execute();
$numrowz = $sqlzprep->get_result();
$numrowz = $numrowz->fetch_row();
Can somebody please help me?
enabled mysql, mysqli, and pdo compatibility by creating
/var/cpanel/easy/apache/rawopts/all_php5
In this file place the following directives:
--with-mysql=mysqlnd
--with-mysqli=mysqlnd
--with-pdo-mysql=mysqlnd
and use EasyApache to rebuild your php configurations.
more info here
http://olaitanmayowa.com/call-to-undefined-method-mysqli_stmtget_result/
Related
I want to use PHP to connect to Oracle, but get an error:
Fatal error: Call to undefined function oci_connect()...
I searched in Google, and get that the OCI is not enabled in PHP, but after install Ora10InstantClient & enable extension=php_oci8_12c.dll , I still get the error.
I checked phpinfo(), found the "configure command" -> with-oci8-12c= ... was WRONG. How do I fix this path? If this is not this problem, how can I resolve the problem?
I'm attempting to insert rows in table in a database hosted in MS SQL Server 2016 installed in my local computer.
Here is my snippet $dbc = mssql_connect('MwangiCJ-PC/mwangi','sqluser','xxxx','mydb');
I have tried out the answer from
mssql_connect() with PHP5 and MSSQL2012 Express but I still get the error Fatal error: Uncaught Error: Call to undefined function mssql_connect()
When i run a simple phpinfo() I can see that I already have both sqlsrv and pdo_sqlsrv available.
Am I missing anything else? Please help. Thank you.
From the PHP docs:
Warning
This function was REMOVED in PHP 7.0.0.
Alternatives to this function include:
PDO::__construct()
sqlsrv_connect()
odbc_connect()
I want to connect to oracle database, but i got this error :
"Fatal error: Call to undefined function oci_connect() in C:\xampp81\htdocs\test\inc\db.php on line 75."
I already check php.ini file, and there are 2 lines :
;extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client
;extension=php_oci8_11g.dll ; Use with Oracle 11gR2 Instant Client
I already remove the (;)
extension=php_oci8.dll ; Use with Oracle 10gR2 Instant Client
Then I restart the apache, but when I start the apache, I got an error:
"error when start apache the procedure entry point OCIPing could not be located in the dynamic link library OCI.dll"
After that I try to login to my website, then i got an error:
"Fatal error: Call to undefined function oci_connect() in C:\xampp81\htdocs\test\inc\db.php on line 75"
Any solution for this case? I already tried to uncomment the extension=php_oci8.dll , but still have an error.
Thank you.
you can also see this answer from this question
here is tutorial of installing oci8 drivers for PHP
https://stackoverflow.com/a/34494636/2125924
I have to use fribidi_log2vis in PHP. When I call it, my localhost (XAMPP) shows this error:
Fatal error: Call to undefined function fribidi_log2vis()
but this function is exists in php.net (http://php.net/manual/en/function.fribidi-log2vis.php)
Fribidi is a PECL extension that is not bundled with PHP by default. Installing instructions: http://php.net/manual/en/install.pecl.php
I'm trying to print some string using PHP, i'm using the PHP print functions:
$printer = ("HP LaserJet Professional P1102");
$handler= printer_open($printer);
$content="Test Content";
printer_write($handler, $content);
printer_close($handler);
but I got that error :
Fatal error: Call to undefined function printer_open() in C:\xampp\htdocs\print.php on line 12
after googling it i found that i must add the php_printer.dll to the extensions file in php and add it's extension to the php.ini file, then restarting the server services, all of that accomplished but still getting that error.
p.s. I've tried it on WAMP and XAMPP
I think solution would be extension location.php_printer extension should be stored in c:\xampp\php\ext and not in c:\xampp\php. So move it to the ext-folder, and restart Apache.
Can you look into the error_log, which tells you, if it fails to load the module. You should also run a phpinfo(), which shows up all loaded modules, you must find the printer extensions there.
I hope it may resolve your issue.