How to conncect Oracle with PHP under Winginx? - php

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?

Related

Uncaught Error: Undefined constant AF_NET - PHP Socket

*Hello everyone, I got AF_NET error using php socket.
I try to found on multiple post, but all enable this extension=sockets or extension=php_sockets.dll in their php.ini and work.
I enable both and separately on my php.ini of my XAMPP in Windows, I resolve the Undefined socket_create but now I get this error and nothing works. Try to restart Xampp also.
If someone know and can help me please I would be very happy 😪 !
AF_NET undefined
Here is my code below to create a php socket :

PHP: Fatal error: Call to undefined function openssl_pkcs12_read()

I'm using PHP to read encryted file using opensll.
when doing
openssl_pkcs12_read($storedfile, $certificateinfo, $passwd)
in my script, error came out is :
Fatal error: Call to undefined function openssl_pkcs12_read()
I'm trying to install openssl extension for my Suse Linux Enterprise Server 11.
Can anybody help me how to install openssl extension in SLES. or how to solve this problem.
thanks

Fatal error: Call to undefined method mysqli_stmt::get_result() in

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/

ci_connect(): OCIEnvNlsCreate() failed

I am using Laravel 5 with yajra/laravel-oci8 . Problem is that I am getting this error:
ErrorException in Oci8.php line 81:
oci_connect(): OCIEnvNlsCreate() failed. There is something wrong with your system - please check that PATH includes the directory with Oracle Instant Client libraries
I edited System Environment variables, activated OCI8 in php.ini and tried everything that I could find on Google but none of that worked...
EDIT: Added PHP Enviroments:
Does someone knows where's the problem?

Fatal error: Call to undefined function printer_open()

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.

Categories