Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 Deprecated: mysql_connect problem
Author « Topic »  

Donnalit
Starting Member

USA
5 Posts

Pre-sales questions only
(More Details...)

Posted - 08/08/2020 :  12:49:18  
no previous issues with my site at all but recently installed phpplusupdate_v7.2.3 following all the guidelines as far as i can tell - now the shopping cart button does nothing and this error msg is at the top of my site:

Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home1/donnalit/public_html/vsadmin/db_conn_open.php on line 14

db_conn_open.php reads:

<?php

// You host should be able to provide you with these settings if you do not know them already

$db_username = "xxxxxxxxxx"; // Your database login username
$db_password = "#xxxxxxxxxx"; // Your database login password
$db_name = "xxxxxxxx_Store"; // The name of the database you wish to use
$db_host = "localhost"; // The address of the database. Often this is localhost, but may be for example db.yoursite.com

//////////////////////////////////////////////////
// Please do not edit anything below this line. //
//////////////////////////////////////////////////

$dbh=mysql_connect($db_host, $db_username, $db_password) or die ('You need to set your database connection in vsadmin/db_conn_open.php.</td></tr></table></body></html>');
mysql_select_db($db_name) or die ('You need to set your database connection in vsadmin/db_conn_open.php.</td></tr></table></body></html>');

?>

no trouble getting into the dashboard with my to add product - I've looked thru this site to find answers from others who have experienced this but not sure what else to look at to fix this...?? host is MySQL Version 5.6.32-78.1

Donna
TheHouseOfSparkle.com

Edited by - Donnalit on 08/08/2020 13:03:24

dbdave
ECT Moderator

USA
10277 Posts

Posted - 08/08/2020 :  13:30:42  
Hi, this thread should get you back on track.
https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=107737

Thanks,
David

Donnalit
Starting Member

USA
5 Posts

Pre-sales questions only
(More Details...)

Posted - 08/08/2020 :  14:02:10  
yes - i read thru that post - the sql version my host uses is still 5.6 - not 7 - doesn't that mean i should continue using the db_conn.php file i have ?

Vince
Administrator

42472 Posts

Posted - 08/08/2020 :  15:18:23  
Hi Donnalit
quote:
the sql version my host uses is still 5.6 - not 7
This is to do with the version of PHP on the server, not the version of mySQL.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

Donnalit
Starting Member

USA
5 Posts

Pre-sales questions only
(More Details...)

Posted - 08/08/2020 :  15:30:38  
sorry, typo - my host has PHP version: 5.6.30

Vince
Administrator

42472 Posts

Posted - 08/09/2020 :  02:09:32  
Hi Donnalit
quote:
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home1/donnalit/public_html/vsadmin/db_conn_open.php on line 14
If your host had PHP 7.0 then you would have an error message because of this. As your host has PHP 5.6 installed you just get a deprecated warning. But the fix is the same and is to do with the database connection in this thread as per dbdave ...
https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=107737
As your host will eventually move to PHP 7+ at some point it needs doing anyway.

Looking through your post again though it also looks like you are missing the ectcart.js file as here...
https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=107040

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

Donnalit
Starting Member

USA
5 Posts

Pre-sales questions only
(More Details...)

Posted - 08/09/2020 :  10:31:05  
ok THANK YOU so much for your help - after experiencing several issues trying to implement code line changes (including the site wouldn't load at all) I reverted back to an old version of my site without the latest updater and I finally fixed and removed the deprecated error msg!

Now, currently still don't have a working CART button and now most of my product pictures don't show up. CART button will "click" and turn color, but nothing happens.

Q1 -since i reverted back to a working site version without the current v7.2.3 updater (update: my dashboard does show ECT v7.2.3 ? so i guess my site IS using 7.2.3 - i'm so confused!) ( v7.1.8 was in use on the now working version of my site) do I still need to add the to add these lines in order to get the cart button to work or does updater v7.1.8 need these 2 lines for the cart to work:

<link rel="stylesheet" type="text/css" href="/css/ectcart.css"/>
<script type="text/javascript" src="/js/ectcart.js"></script>
if the new lines are needed, is there a particular spot on the dwt file where the to be?

This is what I find instead:
@import url('../ectcart.css');
<link href="css/ectcart.css" rel="stylesheet" type="text/css">

view cart error msg = Warning: Unexpected character in input:'in /home1/donnalit/xxxxxxxx/vsadmin/inc/inccart.php on line 6210 - fixed by getting rid of 50 lines of 'X's...copied code from a clean cart.php copy...

still have error on cart page - Parse error: syntax error, unexpected '=' in /home1/donnalit/xxxxxxxx/vsadmin/inc/inccart.php on line 6210 - comparing this code line letter by letter, can't seem to see where this is or how to remedy this:

if(@$useimageincart && ! (trim($alldata['pImage'])=='' || trim($alldata['pImage'])=='prodimages/')) print $startlink . '<img class="cartimage" src="' . $alldata['pImage'] . '" alt="' . strip_tags($alldata['cartProdName']) . '" />' . $endlink; else proShip=TRUE;



Q2 - why do you think my product pictures disappeared? I know I can re-add them, but i'm not sure what caused that to happen...

I'm not a trained website creator, so I'm trying to painstakingly go line by line and get thru fixing these problems one by one.
thank you for your advice and help

Donnalit
TheHouseOfSparkle.com

Edited by - Donnalit on 08/09/2020 13:17:17

dbdave
ECT Moderator

USA
10277 Posts

Posted - 08/09/2020 :  15:51:43  
quote:
I reverted back to an old version of my site


With the missing images issue, what steps did you take to "revert" back to an old version? Did you perhaps delete your images?

Personally, I think you should try to get on the new version and resolve the issue there. It's only a matter of time before your host forces you to php version 7+ really.

As for the add to cart, it sounds like you need to restore the ectcart.js file that matches the version of the cart you are on, and I suspect you still have the one from the latest updater there.

Thanks,
David

Donnalit
Starting Member

USA
5 Posts

Pre-sales questions only
(More Details...)

Posted - 08/09/2020 :  16:12:52  
i double backed up everything - re-ran the v7.2.3 updater and now it's working!
thank you SO much for your help and advice!!!

Donna

Edited by - Donnalit on 08/09/2020 17:01:09
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000