Hi!
We got a new php 5.6 server running next to our php 5.3 server. We got a OC 1.5.6.4 webshop and on php 5.3 it is working perfect. I just uploaded the webshop to the php 5.6 server, cleaned the cache etc. But i'm getting the following error:
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/puchshop/public_html/test2/vqmod/vqcache/vq2-system_startup.php on line 117
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/puchshop/public_html/test2/vqmod/vqcache/vq2-system_startup.php:117) in /home/puchshop/public_html/test2/vqmod/vqcache/vq2-system_startup.php on line 135
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/puchshop/public_html/test2/vqmod/vqcache/vq2-system_startup.php:117) in /home/puchshop/public_html/test2/vqmod/vqcache/vq2-system_startup.php on line 135
The DB_driver in the config.php and admin/config.php files are already on mysqli, this was also on the php 5.3 server so it has to work but it doesn't work.
I searched on google and here on the forums, but didn't got a solution to get this work.
Can anybody help us?
I also tried this mod but didn't work: http://www.opencart.com/index.php?route ... n_id=23099
Kind regards,
Weiqunw
We got a new php 5.6 server running next to our php 5.3 server. We got a OC 1.5.6.4 webshop and on php 5.3 it is working perfect. I just uploaded the webshop to the php 5.6 server, cleaned the cache etc. But i'm getting the following error:
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/puchshop/public_html/test2/vqmod/vqcache/vq2-system_startup.php on line 117
Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/puchshop/public_html/test2/vqmod/vqcache/vq2-system_startup.php:117) in /home/puchshop/public_html/test2/vqmod/vqcache/vq2-system_startup.php on line 135
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/puchshop/public_html/test2/vqmod/vqcache/vq2-system_startup.php:117) in /home/puchshop/public_html/test2/vqmod/vqcache/vq2-system_startup.php on line 135
The DB_driver in the config.php and admin/config.php files are already on mysqli, this was also on the php 5.3 server so it has to work but it doesn't work.
I searched on google and here on the forums, but didn't got a solution to get this work.
Can anybody help us?
I also tried this mod but didn't work: http://www.opencart.com/index.php?route ... n_id=23099
Kind regards,
Weiqunw
Just GOOGLE FOR THIS, and set the value to DURING THE PAST MONTH:
and you will find out easy, many already answerred Postings already exist on this!
Ernie
Code: Select all
Deprecated: mysql_connect(): The mysql extension is deprecated opencart
Ernie
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Just adjust both config files in root and admin
find
change to
that should solve your problem
find
Code: Select all
define('DB_DRIVER', 'mysql');
Code: Select all
define('DB_DRIVER', 'mysqli');
Koeltechnische deurrubbers eenvoudig online op maat bestellen.
Alle niet stekplichtige onderdelen zoals scharnieren, sloten, randverwarming en verlichting voor alle typen koelingen en vriezers.
https://koelcel-onderdelen.com
Yeah I did google and find those answers for changing mysql to mysqli... offcourse that I first try to google it then I'm asking on the forum.
But my config db driver was already on mysqli even on the php 5.3 server.. so thats why i'm asking how is this possible. 100% sure about this.
Both config.php and admin/config.php are already on mysqli.
Also cleaned the system cache and vqmod cache with no results.
But my config db driver was already on mysqli even on the php 5.3 server.. so thats why i'm asking how is this possible. 100% sure about this.
Both config.php and admin/config.php are already on mysqli.
Also cleaned the system cache and vqmod cache with no results.
Just a wild guess:
I would de-activate VqMod, as long as it does not work. It's easier to find problems, if some should exist.
To do this, you should temporarely remove this in your BOTH index.php:
just to make sure, that No VqMod-related 'function' possibly looks for
something, related to MySql instead of MySqli.
Ernie
I would de-activate VqMod, as long as it does not work. It's easier to find problems, if some should exist.
To do this, you should temporarely remove this in your BOTH index.php:
Code: Select all
// VirtualQMOD
require_once('./vqmod/vqmod.php');
VQMod::bootup();
// VQMODDED Startup
require_once(VQMod::modCheck(DIR_SYSTEM . 'startup.php'));
// Application Classes
require_once(VQMod::modCheck(DIR_SYSTEM . 'library/customer.php'));
require_once(VQMod::modCheck(DIR_SYSTEM . 'library/affiliate.php'));
require_once(VQMod::modCheck(DIR_SYSTEM . 'library/currency.php'));
require_once(VQMod::modCheck(DIR_SYSTEM . 'library/tax.php'));
require_once(VQMod::modCheck(DIR_SYSTEM . 'library/weight.php'));
require_once(VQMod::modCheck(DIR_SYSTEM . 'library/length.php'));
require_once(VQMod::modCheck(DIR_SYSTEM . 'library/cart.php'));
----
admin
----
//VirtualQMOD
require_once('../vqmod/vqmod.php');
VQMod::bootup();
// VQMODDED Startup
require_once(VQMod::modCheck(DIR_SYSTEM . 'startup.php'));
// Application Classes
require_once(VQMod::modCheck(DIR_SYSTEM . 'library/currency.php'));
require_once(VQMod::modCheck(DIR_SYSTEM . 'library/user.php'));
require_once(VQMod::modCheck(DIR_SYSTEM . 'library/weight.php'));
require_once(VQMod::modCheck(DIR_SYSTEM . 'library/length.php'));
something, related to MySql instead of MySqli.
Ernie
My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
It was indeed caused by a VqMod!
Line 117 in system/startup.php was this line:
mysql_select_db(DB_DATABASE) or die("Unable to select database");
From the Vqmod file with this mysql connection:
Now I have to change this to mysqli.
Thanks for thinking with me!
Line 117 in system/startup.php was this line:
mysql_select_db(DB_DATABASE) or die("Unable to select database");
From the Vqmod file with this mysql connection:
Code: Select all
// Common
$db2 = mysql_connect( DB_HOSTNAME, DB_USERNAME, DB_PASSWORD) or die("Unable to connect to database");
mysql_select_db(DB_DATABASE) or die("Unable to select database");
// Settings
$sql = "SELECT * FROM " . DB_PREFIX . "setting where `key` in ('product_shipping_limit','mix_cart_shipping','conflict_cart_shipping','force_shipping_methods')";
$query =mysql_query($sql) or die(mysql_error());
$psl = 0;$mcs = 0;$ccs = 0;$fsm = 0;
while($setting = mysql_fetch_assoc($query)){
if( $setting['key']=='product_shipping_limit')
$psl = $setting['value'];
if( $setting['key']=='mix_cart_shipping')
$mcs = $setting['value'];
if( $setting['key']=='conflict_cart_shipping')
$ccs = $setting['value'];
if( $setting['key']=='force_shipping_methods')
$fsm = $setting['value'];
}
Thanks for thinking with me!
Last edited by Weiqunw on Mon Oct 12, 2015 8:20 pm, edited 1 time in total.
It is fixed!
To make the connection work in mysqli I had to add/change a few things
the lines with mysql to mysqli, so mysqli_connect
add $db2 to the mysqli_select_db
add $db2 to the mysqli_query
Like this:
To make the connection work in mysqli I had to add/change a few things
the lines with mysql to mysqli, so mysqli_connect
add $db2 to the mysqli_select_db
add $db2 to the mysqli_query
Like this:
Code: Select all
$db2 = mysqli_connect( DB_HOSTNAME, DB_USERNAME, DB_PASSWORD) or die("Unable to connect to database");
mysqli_select_db($db2, DB_DATABASE) or die("Unable to select database");
// Settings
$sql = "SELECT * FROM " . DB_PREFIX . "setting where `key` in ('product_shipping_limit','mix_cart_shipping','conflict_cart_shipping','force_shipping_methods')";
$query =mysqli_query($db2, $sql) or die(mysqli_error($db2));
$psl = 0;$mcs = 0;$ccs = 0;$fsm = 0;
while ($setting = mysqli_fetch_assoc($query)){
Who is online
Users browsing this forum: No registered users and 3 guests