CodeIgniter and PHP 5.5.14 - mysql_escape_string() issue - php

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!

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.

How to connect to MS SQL Server 2016 from PHP 7

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()

Codeigniter Deprecated: mysql_real_escape_string():

Got below error while using codigniter 3.0
FYI using PHP Version 5.5.12,Apache Version Apache/2.4.9 (Win64) PHP/5.5.12
A PHP Error was encountered
Severity: 8192
Message: mysql_real_escape_string(): The mysql extension is deprecated
and will be removed in the future: use mysqli or PDO instead
Filename: models/common_model.php
Line Number: 21
Backtrace:
File: C:\wamp\www\Codeigniter\application\models\common_model.php
Line: 21 Function: mysql_real_escape_string
Go to application => config => database.php and change from
$db['default']['dbdriver'] = 'mysql';
to
$db['default']['dbdriver'] = 'mysqli';
Note It is recommended to use query builder class for queries.
use mysqli_real_escape_string();
and replace mysql to mysqli in every functions.
You should use PDO in codeigniter to solve all problem related to mysql and mysqli..
see how to use PDO in CI
if you are using CI 3 then http://www.codeigniter.com/user_guide/database/configuration.html
and if you are using CI 2.x
How to use pdo in codeigniter?

Connecting to Oracle in Codeigniter (undefined constant OCI_COMMIT_ON_SUCCESS)

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

Php ESP not running into php 5.3.4 version or later

I want to run phpESP on my local pc. But I'm getting lots of errors. How can I run this without any error?. It shows me errors like this:
Deprecated: Function split() is deprecated in C:\xampp\htdocs\zrg\phpESP\admin\include\lib\espi18n.inc on line 66
Deprecated: Function ereg() is deprecated in C:\xampp\htdocs\zrg\phpESP\admin\include\lib\espi18n.inc on line 72
Deprecated: Function set_magic_quotes_runtime() is deprecated in C:\xampp\htdocs\zrg\phpESP\admin\include\funcs.inc on line 23
Fatal error: Call to undefined function session_register() in C:\xampp\htdocs\zrg\phpESP\admin\manage.php on line 29
Did you grab the latest copy of phpESP? A version came out only a few months ago that must surely support a recent PHP. Also you need to update your version of PHP, yours is pretty old.
http://sourceforge.net/projects/phpesp/

Categories