Connecting to Oracle in Codeigniter (undefined constant OCI_COMMIT_ON_SUCCESS) - php

im kind of a n00b to Oracle db's, but when i set my dbdriver in codeigniter to oci8, i get the following error, which is weird, providing the extension is enabled in the php.ini file.
I get the following error.
A PHP Error was encountered
Severity: Notice
Message: Use of undefined constant OCI_COMMIT_ON_SUCCESS - assumed 'OCI_COMMIT_ON_SUCCESS'
Filename: database/DB.php
Line Number: 82

You should install/enable the oci8 extension.
http://www.php.net/manual/en/book.oci8.php

Related

Aauth codeigniter library, undefined constant PASSWORD_DEFAULT

I have a project using the library aauth CodeIgniter. when I run on windows localhost it running as well. when I move my project to the centos server virtualbox I just installed, I found the following error:
A PHP Error was encountered
Severity: Notice
Message: Use of undefined constant PASSWORD_DEFAULT - assumed
'PASSWORD_DEFAULT'
Filename: config/aauth.php
Line Number: 136
any help would be great. Thank you.

Getting error when trying to install POS on Localhost : Fatal error: Can't use method return value in write context

I am trying to install opensourcepos from https://github.com/jekkos/opensourcepos
But I am getting this error:
Fatal error: Can't use method return value in write context in D:\Xampp\htdocs\opensourcepos\application\helpers\locale_helper.php on line 67
A PHP Error was encountered
Severity: Compile Error
Message: Can't use method return value in write context
Filename: helpers/locale_helper.php
Line Number: 67
Backtrace:
I followed instructions, this is a brand new install, I'm at a loss...
I'm on WIndows 7, using Localhost with Xampp
The line 67 is question is this one:
if (empty($config->item('thousands_separator')))
When I comment it out, the site loads, but it doesn't work
check readme txt
You are getting following error Message: Can't use method return value in write context saying that you are probably using PHP7 which is not completely supported yet. Check your hosting configuration to verify whether you have a supported PHP version installed

Call to undefined function odbc_connect() in Ubuntu

I am trying to connect with PHP to SQL server. I have installed Microsoft ODBC Driver 13 for SQL Server and I have test it using 'isql' command. Now when I am trying to connect to the server in PHP it always crashes and says "http error 500". Here is the code:
<?php
$server = merkur.edikt.local;
$database = ITServiceE;
$connection = odbc_connect("Driver={ODBC DRIVER 13 for SQL Server};
Server=$server;Database=$database;",
'user',
'PW'
);
echo "connected";
?>
I am using Ubuntu 16.04 server and Apache2 and PHP 7.
I think it might be problem with permissions for the Apache(if the Apache can access the ODBC Driver) but I am not really sure how this works.
EDIT:
Here is the log from Apache errors:
PHP Notice: Use of undefined constant merkur - assumed 'merkur' in /var/www/html/index.php on line 2
PHP Notice: Use of undefined constant edikt - assumed 'edikt' in /var/www/html/index.php on line 2
PHP Notice: Use of undefined constant local - assumed 'local' in /var/www/html/index.php on line 2
PHP Notice: Use of undefined constant ITServiceE - assumed 'ITServiceE' in /var/www/html/index.php on line 3
PHP Fatal error: Uncaught Error: Call to undefined function odbc_connect() in /var/www/html/index.php:4\nStack trace:\n#0 {main}\n thrown in /var/www/html/index.php on line 4
and the file odbc.ini is empty and odbcinst.ini looks like this:
[ODBC Driver 13 for SQL Server]
Description=Microsoft ODBC Driver 13 for SQL Server
Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.0.0
Threading=1
UsageCount=2
Call to undefined function odbc_connect() means that your PHP system doesn't have any function with that name.
Since it isn't a user function written in pure PHP but a function from a PHP extension, that means that you haven't installed such extension. It's worth noting that the PHP extensions is not the same as the SQL Server driver (you need both).
Your code also contains some undefined constants which I guess are meant to be strings. I strongly recommend you enable full error reporting in your development box so you don't need to check the error logs to learn about simple errors.

CodeIgniter and PHP 5.5.14 - mysql_escape_string() issue

I've this issue after setting up CodeIgniter with PHP 5.5.14
A PHP Error was encountered
Severity: 8192
Message: mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() instead.
Filename: mysqli/mysqli_driver.php
Line Number: 320
It seems that mysql_real_escape_string() functions has been deprecated on 5.5.14, right?
CodeIgniter have no compatibility with this PHP version??
Any ideas??
Thanks in advance!
Giovanni
There was an error with the MySQL configuration (I'm on a MacBook Pro).
In practice, mysql's tmp path must be setup on mac.
After this step, my issue has disappeared!

Paypal Adaptive Payments PHP Soap SDK Undefined Definitions

I'm trying to integrate an adaptive payments system to my codeigniter project on my centos server. SOAP is installed on my server (I executed "yum install php-soap" via ssh and restarted the server already), and I'm getting errors like this when I try to run:
A PHP Error was encountered
Severity: Notice
Message: Use of undefined constant XML_SERIALIZER_OPTION_INDENT - assumed 'XML_SERIALIZER_OPTION_INDENT'
Filename: SOAPEncoder/SOAPEncoder.php
Line Number: 41
A PHP Error was encountered
Severity: Notice
Message: Use of undefined constant XML_SERIALIZER_OPTION_INDENT - assumed 'XML_SERIALIZER_OPTION_INDENT'
Filename: SOAPEncoder/SOAPEncoder.php
Line Number: 41
What am I missing, how can I solve this ?
Thanks,
Perhaps you need to install the XML_Serializer PEAR package: http://pear.php.net/package/XML_Serializer/
pear install XML_Serializer

Categories