CodeIgniter Forums
mysql_pconnect - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: mysql_pconnect (/showthread.php?tid=59856)



mysql_pconnect - El Forum - 11-29-2013

[eluser]jjhii[/eluser]
I was doing some debugging and looked up mysql_pconnect from the MySQL driver and noticed that it is being deprecated in the next version. Are there any plans to replace it or update the MySQL drivers?

http://php.net/manual/en/function.mysql-pconnect.php

John


mysql_pconnect - El Forum - 11-29-2013

[eluser]Tpojka[/eluser]
Have you read whole first paragraph of page you've linked/posted here?


mysql_pconnect - El Forum - 11-29-2013

[eluser]jjhii[/eluser]
yep, read it the first time I saw it, read it again when I posted, and am reading it now. Since you made the statement I am obviously missing something and it is most likely obvious but sorry I'm still not see it, please explain, thanks...


mysql_pconnect - El Forum - 11-29-2013

[eluser]Tpojka[/eluser]
Now I am confused. First I thought you are asking about PHP itself. However it is old news and I stood double confused.
You can use mysqli driver instead as well. Read in application/config/config.php file in EXPLANATION OF VARIABLES section.
If you prefer PDO, it can be used too, but you need to change
Code:
$db['default']['hostname'] = 'localhost';
to
Code:
$db['default']['hostname'] = 'mysql:host=localhost';
and
Code:
$db['default']['dbdriver'] = 'mysql';
to
Code:
$db['default']['dbdriver'] = 'PDO';


If you would use mysqli driver, you would need second change from here only:
Code:
$db['default']['dbdriver'] = 'mysql';
to
Code:
$db['default']['dbdriver'] = 'mysqli';



mysql_pconnect - El Forum - 11-29-2013

[eluser]jjhii[/eluser]
Well I guess we are now both not confused Smile

Thanks for the response, that is just what I was looking for...