09-08-2016, 05:58 PM
Here's how I would handle that. The UserSpice 4 classes are more secure and more universal with PDO and they're also better documented.
1. I would download the latest userspice 4.1.4
2. Go to users/classes/DB.php and copy that class to your usercake folder somewhere.
3. Edit the class lines 26-30 from
to
4. Then include the new DB class into your project. It shouldn't affect how the core usercake stuff works and then for all the stuff you do moving forward, you can use the modern PDO way of doing things that are documented here.
http://userspice.org/documentation-db-class-2/
If that doesn't work, let me know.
1. I would download the latest userspice 4.1.4
2. Go to users/classes/DB.php and copy that class to your usercake folder somewhere.
3. Edit the class lines 26-30 from
Code:
$this->_pdo = new PDO('mysql:host=' .
Code:
Config::get('mysql/host') .';dbname='.
Code:
Config::get('mysql/db'),
Code:
Config::get('mysql/username'),
Code:
Config::get('mysql/password'),
Code:
$this->_pdo = new PDO('mysql:host=YOURHOSTNAME,;dbname=YOURDBNAME,YOURdbUSERNAME,YOURdbPASSWORD,
4. Then include the new DB class into your project. It shouldn't affect how the core usercake stuff works and then for all the stuff you do moving forward, you can use the modern PDO way of doing things that are documented here.
http://userspice.org/documentation-db-class-2/
If that doesn't work, let me know.