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
Forum Search
Google Site Search
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 Error message when trying to access control panel
Author « Topic »  

arnold931
Starting Member

USA
6 Posts

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

Posted - 01/08/2021 :  13:26:19  
I was notified by some customers that my site (kalico.com) was down. When I log in I only get the background pattern and no content. When I tried to log into my control panel I get a "Call to undefined function: mysql_connect(). Please install the MySQL Connector for PHP" error message. Any idea where I can start?

dbdave
ECT Moderator

USA
10410 Posts

Posted - 01/08/2021 :  13:38:13  
That sounds like a server error.
Have you shown this to your host?

Thanks,
David

arnold931
Starting Member

USA
6 Posts

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

Posted - 01/08/2021 :  13:48:55  
No. I will do that. thanks.

dbdave
ECT Moderator

USA
10410 Posts

Posted - 01/08/2021 :  14:22:36  
Please post back if you cannot resolve it.

Thanks,
David

arnold931
Starting Member

USA
6 Posts

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

Posted - 01/08/2021 :  14:28:52  
I chatted with my host (Bluehost) and they said there are no error messages on their end.

1818charlie
ECT Moderator

United Kingdom
1194 Posts

Posted - 01/08/2021 :  17:01:22  
Hi Terry

Looking in source code of the page on your domain shows the full contents of your database connection file and all the includes file content too! First & foremost I would certainly remove all of that. You should NOT ever be able to publicly view that stuff.

Has this site been regularly maintained? Reason I ask is that since 2001 to July 2019 the site has been shown on the internet archive but nothing at since then https://web.archive.org

Update - If I visit the search.php, cart.php, about.php & the vsadmin/login.php all those pages show exactly the same page source with all the db connection & includes file contents.

Steve
Egerton Village, Bolton, UK

Edited by - 1818charlie on 01/08/2021 18:26:44

Phil
ECT Moderator

United Kingdom
7680 Posts

Posted - 01/09/2021 :  02:16:32  
Hi Terry,
quote:
Please install the MySQL Connector for PHP
- This suggests the php version on the server is PHP7 so the MYSQL connector will not exist, it'll be MYSQLI

So the problem is in your code for the vsadmin/includes.php and the vsadmin/db_con_open.php file
Instead of an opening tag of <?php you have <SCRIPT language="php">
and instead of a closing tag of?> you have </SCRIPT>

so open both those files in notepad and follow the instructions here https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=107737 including the database connection method

so your db_con_open.php file should look like this (with your user name, database name and password of course

<?php

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

$db_username = "xxxxxxx"; // Your database login username
$db_password = "xxxxxxx"; // Your database login password
$db_name = "xxxxxxxx"; // 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. //
//////////////////////////////////////////////////

$GLOBALS['ectdatabase'] = new mysqli($db_host, $db_username, $db_password, $db_name);
if(mysqli_connect_error()){
ob_clean();
print '<html><head><title>Database connect error</title></head><body><div style="margin:20px;clear:both">Database Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error() . '</div>';
print('<div style="margin:20px;clear:both">You need to set your database connection in vsadmin/db_conn_open.php</div>');
print '<div style="margin:20px;clear:both">For help setting your database connection please see...<br />';
print '<a href="https://www.ecommercetemplates.com/phphelp/ecommplus/instructions.asp#dbconn" target="_blank">https://www.ecommercetemplates.com/phphelp/ecommplus/instructions.asp#dbconn</a></div>';
print '<div style="margin:20px;clear:both">We also have a support forum here...<br />';
print '<a href="https://www.ecommercetemplates.com/support/" target="_blank">https://www.ecommercetemplates.com/support/</a></div>';
die('</body></html>');
}
?>




* Database Migrations and Conversions*
* ASP to PHP Cart Conversions*

*Contact Us*
*Buy The PHP Capture Card Plugin*
*Rate Our Services/View Our Feedback*

Edited by - Phil on 01/09/2021 02:25:17

arnold931
Starting Member

USA
6 Posts

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

Posted - 01/09/2021 :  15:00:25  
Thanks everyone. It has been several years since I have done any maintenance on this site. It looks like I have some work to do. I will post back with my results.

Phil
ECT Moderator

United Kingdom
7680 Posts

Posted - 01/10/2021 :  01:34:56  
Hi Terry,
quote:
It has been several years since I have done any maintenance on this site.

Making those changes shouldn't take any longer than a few minutes, but if that still doesn't fix things you may have to update the store software to a later version if you haven't done so already



* Database Migrations and Conversions*
* ASP to PHP Cart Conversions*

*Contact Us*
*Buy The PHP Capture Card Plugin*
*Rate Our Services/View Our Feedback*

Edited by - Phil on 01/10/2021 01:35:50
  « 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