Call to undefined function sqlite_open - php

Searched already on many sites with no results. PHP keeps on saying:
Call to undefined function sqlite_open()
If I manually load sqlite (it's already installed with yum install php-pdo) I get
PHP Warning: Module 'PDO' already loaded in Unknown on line 0
PHP Warning: Module 'pdo_sqlite' already loaded in Unknown on line 0
PHP Warning: Module 'sqlite3' already loaded in Unknown on line 0
PHP Fatal error: Call to undefined function sqlite_open() in /home/kpark/dbconnect.php on line 9

sqlite_open was the function in the sqlite2 extension. What you've installed is probably the sqlite3 module, which requires sqlite3::open() instead.
But you should not use the native interface either way. Use PDO to open sqlite databases. http://www.php.net/manual/en/ref.pdo-sqlite.php

Related

unable to start php debugger in vscode after php upgrade to 8.0; cannot open browscap.ini

Following my update from php 7.3 to php 8.0, I am no longer able to debug in VS Code. I am using the PHP pack extension.
I attempted uninstalling/reinstalling extensions and restarting vscode.
I get the error:
PHP Warning: Cannot open "C:\XXX\browscap.ini" for reading in Unknown on line 0
PHP Fatal error: Unable to start standard module in Unknown on line 0
Warning: Cannot open "C:\xXXX\browscap.ini" for reading in Unknown on line 0
Fatal error: Unable to start standard module in Unknown on line 0

Fatal error: Uncaught Error: Call to undefined function oci_connect()

I am having problems with oci_connect() in PHP. I can't connect with an Oracle Database, after I had installed the Oracle InstantClient(32 Bit) and copied the required *.dll's in the apache/bin/ and xampp/php folders.
I get this:
Fatal error: Uncaught Error: Call to undefined function oci_connect()
in C:\xampp\htdocs\OracleTest\connect.php:9 Stack trace: #0 {main}
thrown in C:\xampp\htdocs\OracleTest\connect.php on line 9.
There is also the Problem that I am unable to load the dynamic libraries:
PHP Warning: PHP Startup: Unable to load dynamic library
'C:\xampp\php\ext\php_oci8_11g.dll' - The specified module could not
be found. in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library
'C:\xampp\php\ext\php_oci8_11g.dll' - The specified module could not
be found. in Unknown on line 0
My Code is this:
$oc_conn = oci_connect('127.0.0.1/XE','****', '****');
if($oc_conn)
{
echo "Success!!!";
}
else
{
$e = oci_error();
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
I am struggling on that Problem for over 3 weeks..I really need help, thank you in advance.
The "Call to undefined function oci_connect()" seems to be a secondary error resulting from a root cause error. The root cause error, as the error message says, seems to be that PHP cannot find the file named C:\xampp\php\ext\php_oci8_11g.dll. PHP will get this file name from the extension=php_oci8_12c.dll statement in your php.ini. It also seems that your php.ini has defined C:\xampp\php\ext\ as the place where extension code should be located.
FIX: Make sure the .dll is in C:\xampp\php\ext\, not just apache/bin. Also, make sure the name of the .dll is php_oci8_11g.dll, not oci.dll.
Successfully loading a dynamic library / extension will (usually) make new functions and classes available to your PHP code. Once you've got php_oci8_11g.dll loaded, you'll probably find that the oci_connect() error is fixed too.

PHP Warning: Module 'Phar' already loaded in Unknown on line 0

PHP Warning: Module 'Phar' already loaded in Unknown on line 0
Hi, I get this error when I run a .php file from my cent terminal. I am trying to create a queueing system like https://github.com/chrisboulton/php-resque and I managed to get it to work but I always get this error when a run the files. Any suggestion why this happens?
I think your problem is related to a server module 'Phar' which is loaded multiple times. This could help: http://www.somacon.com/p520.php

how to setup pdo_sqlite and pdo module to work in php configuration

every time when a page of my site is loaded by someone i got these error in my error log file
PHP Warning: Module 'PDO' already loaded in Unknown on line 0
PHP Warning: Module 'pdo_sqlite' already loaded in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo_mysql.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/pdo_mysql.so:
how to resolve this error please help me
i dont know how to access these file etc
You are using cPanel control panel so you need to check /usr/local/lib/php.ini file on your server.

error while running mongodb php program

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212+lfs/mongo.so' - /usr/lib/php5/20121212+lfs/mongo.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Fatal error: Class 'MongoClient' not found in /var/www/exhange/b1_functions.php on line 8
This is the error popped up when running a monogdb php program in ubuntu. How can I fix that?

Categories