snubbr.com

Automatically switch to a Verisign SSL connection when available?

Get a Verisign SSL certificate for 30 days FREE. Click here to use coupon...

Get a free trial of Verisign SSL certificates. Click here for this special deal...
First question I got is Automatically switch to a Verisign SSL connection when available? Thanks in advance for any answer or 2. 2nd question I got is.. Here the drill. I DELETED the database.php file in admin/includes/database.php. I believe thats where the database file is located in the /admin section. I did this for many reasons.



I wanted to create a sitemap so I used this contribution:.

Increase your Google Page Rank, add an XML Sitemap (FREE).

And in the zip it had this link to go to:.

Http://www.xml-sitemaps.com/.

And yes I went there to enter in all the information it ask to create a sitemap..

Then ok I have the latest.

Whos Online Enhancement.

Contribution 3.3 and it started to have errors after the Verisign website above started to crawl my website.

This is the error it had:.

C:\Inetpub\wwwroot\erbanfootwear.com\admin\includes\functions\database.php on line 45.

0 -.

Select time_entry, time_last_click from whos_online where session_id='a8cec528e61a49e5f27c2aaaa601fded'.

I look at the code on like 45 of database.php and find this line:.

$result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error()); ok fair enough. I go to the backup file and compare it and it's the same! ok then I just replace it with the backup file and all worked well UNTIL today. I saw the same error message not even 1 day after I solved it I thought. And I went to /admin/includes/database.php and DELETED the whole thing. I did this so I could repaste it becuase I knew there was no difference. When I clicked save..I CAN NO LONGER access my admin interface.



Fatal error: Call to undefined function: tep_db_connect() in C:\Inetpub\wwwroot\erbanfootwear.com\admin\includes\application_top.php on line 63.

It gets worse. On the main page...index.php where it says "Choose your language"...everytime I or a customer click a different language my admin language changes to the language selected in the admin section......this is WEIRD. and when I change it to english it displays english in admin. This is not good. How do I fix this? Its all thanks to this sitemap thing.

And I dont know what else it messed up. any hints?.

Any help would do great honestly I need all the help I could get..

Thanks,.

Tim..

Comments (158)

I'm stumped. I'm not so sure what is the right answer to your question. I'll do some Googling and get back to you if I discover an good answer. You should email the people at Verisign as they probably could answer your Verisign question..

Comment #1

Yes it does.

...does this make it kinda impossible then? heres the HUGE code just for reference:.

<?php.

/*.

$Id: $.

OsCommerce, Open Source E-Commerce Solutions.

Http://www.oscommerce.com.

Copyright (c) 2007 osCommerce.

Released under the GNU General Public License.

*/.

// Start the clock for the page parse time log.

Define('PAGE_PARSE_START_TIME', microtime());.

// Set the level of error reporting.

Error_reporting(E_ALL & ~E_NOTICE);.

// check support for register_globals.

If (function_exists('ini_get') && (ini_get('register_globals') == false) && (PHP_VERSION < 4.3) ) {.

Exit('Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory. Please use PHP 4.3+ if register_globals cannot be enabled on the server.');.

}.

// Set the local configuration parameters - mainly for developers.

If (file_exists('includes/local/configure.php')) include('includes/local/configure.php');.

// Include application configuration parameters.

Require('includes/configure.php');.

// Define the project version.

Define('PROJECT_VERSION', 'osCommerce Online Merchant v2.2 RC1');.

// some code to solve compatibility issues.

Require(DIR_WS_FUNCTIONS'compatibility.php');.

// set php_self in the local scope.

$PHP_SELF = (isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME']);.

// Used in the "Backup Manager" to compress backups.

Define('LOCAL_EXE_GZIP', '/usr/bin/gzip');.

Define('LOCAL_EXE_GUNZIP', '/usr/bin/gunzip');.

Define('LOCAL_EXE_ZIP', '/usr/local/bin/zip');.

Define('LOCAL_EXE_UNZIP', '/usr/local/bin/unzip');.

// include the list of project filenames.

Require(DIR_WS_INCLUDES'filenames.php');.

// include the list of project database tables.

Require(DIR_WS_INCLUDES'database_tables.php');.

// customization for the design layout.

Define('BOX_WIDTH', 125); // how wide the boxes should be in pixels (default: 125).

// Define how do we update currency exchange rates.

// Possible values are 'oanda' 'xe' or ''.

Define('CURRENCY_SERVER_PRIMARY', 'oanda');.

Define('CURRENCY_SERVER_BACKUP', 'xe');.

// include the database functions.

Require(DIR_WS_FUNCTIONS'database.php');.

// make a connection to the database... now.

Tep_db_connect() or die('Unable to connect to database server!');.

// set application wide parameters.

$configuration_query = tep_db_query('select configuration_key as cfgKey, configuration_value as cfgValue from 'TABLE_CONFIGURATION);.

While ($configuration = tep_db_fetch_array($configuration_query)) {.

Define($configuration['cfgKey'], $configuration['cfgValue']);.

}.

// define our general functions used application-wide.

Require(DIR_WS_FUNCTIONS'general.php');.

Require(DIR_WS_FUNCTIONS'html_output.php');.

// initialize the logger class.

Require(DIR_WS_CLASSES'logger.php');.

// include shopping cart class.

Require(DIR_WS_CLASSES'shopping_cart.php');.

// check to see if php implemented session management functions - if not, include php3/php4 compatible session class.

If (!function_exists('session_start')) {.

Define('PHP_SESSION_NAME', 'osCAdminID');.

Define('PHP_SESSION_PATH', '/');.

Define('PHP_SESSION_SAVE_PATH', SESSION_WRITE_DIRECTORY);.

Include(DIR_WS_CLASSES'sessions.php');.

}.

// define how the session functions will be used.

Require(DIR_WS_FUNCTIONS'sessions.php');.

// set the session name and save path.

Tep_session_name('osCAdminID');.

Tep_session_save_path(SESSION_WRITE_DIRECTORY);.

// set the session cookie parameters.

If (function_exists('session_set_cookie_params')) {.

Session_set_cookie_params(0, DIR_WS_ADMIN);.

} elseif (function_exists('ini_set')) {.

Ini_set('session.cookie_lifetime', '0');.

Ini_set('session.cookie_path', DIR_WS_ADMIN);.

}.

// lets start our session.

Tep_session_start();.

If ( (PHP_VERSION >= 4.3) && function_exists('ini_get') && (ini_get('register_globals') == false) ) {.

Extract($_SESSION, EXTR_OVERWRITE+EXTR_REFS);.

}.

// set the language.

If (!tep_session_is_registered('language') || isset($HTTP_GET_VARS['language'])) {.

If (!tep_session_is_registered('language')) {.

Tep_session_register('language');.

Tep_session_register('languages_id');.

}.

Include(DIR_WS_CLASSES'language.php');.

$lng = new language();.

If (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) {.

$lng->set_language($HTTP_GET_VARS['language']);.

} else {.

$lng->get_browser_language();.

}.

$language = $lng->language['directory'];.

$languages_id = $lng->language['id'];.

}.

// redirect to login page if administrator is not yet logged in.

If (!tep_session_is_registered('admin')) {.

$redirect = false;.

$current_page = basename($PHP_SELF);.

If ($current_page != FILENAME_LOGIN) {.

If (!tep_session_is_registered('redirect_origin')) {.

Tep_session_register('redirect_origin');.

$redirect_origin = array('page' => $current_page,.

'get' => $HTTP_GET_VARS);.

}.

$redirect = true;.

}.

If ($redirect == true) {.

Tep_redirect(tep_href_link(FILENAME_LOGIN));.

}.

Unset($redirect);.

}.

// include the language translations.

Require(DIR_WS_LANGUAGES$language'.php');.

$current_page = basename($PHP_SELF);.

If (file_exists(DIR_WS_LANGUAGES$language'/'$current_page)) {.

Include(DIR_WS_LANGUAGES$language'/'$current_page);.

}.

// define our localization functions.

Require(DIR_WS_FUNCTIONS'localization.php');.

// Include validation functions (right now only email address).

Require(DIR_WS_FUNCTIONS'validations.php');.

// setup our boxes.

Require(DIR_WS_CLASSES'table_block.php');.

Require(DIR_WS_CLASSES'box.php');.

// initialize the message stack for output messages.

Require(DIR_WS_CLASSES'message_stack.php');.

$messageStack = new messageStack;.

// split-page-results.

Require(DIR_WS_CLASSES'split_page_results.php');.

// entry/item info classes.

Require(DIR_WS_CLASSES'object_info.php');.

// email classes.

Require(DIR_WS_CLASSES'mime.php');.

Require(DIR_WS_CLASSES'email.php');.

// file uploading class.

Require(DIR_WS_CLASSES'upload.php');.

// calculate category path.

If (isset($HTTP_GET_VARS['cPath'])) {.

$cPath = $HTTP_GET_VARS['cPath'];.

} else {.

$cPath = '';.

}.

If (tep_not_null($cPath)) {.

$cPath_array = tep_parse_category_path($cPath);.

$cPath = implode('_', $cPath_array);.

$current_category_id = $cPath_array[(sizeof($cPath_array)-1)];.

} else {.

$current_category_id = 0;.

}.

// default open navigation box.

If (!tep_session_is_registered('selected_box')) {.

Tep_session_register('selected_box');.

$selected_box = 'configuration';.

}.

If (isset($HTTP_GET_VARS['selected_box'])) {.

$selected_box = $HTTP_GET_VARS['selected_box'];.

}.

// the following cache blocks are used in the Tools->Cache section.

// ('language' in the filename is automatically replaced by available languages).

$cache_blocks = array(array('title' => TEXT_CACHE_CATEGORIES, 'code' => 'categories', 'file' => 'categories_box-language.cache', 'multiple' => true),.

Array('title' => TEXT_CACHE_MANUFACTURERS, 'code' => 'manufacturers', 'file' => 'manufacturers_box-language.cache', 'multiple' => true),.

Array('title' => TEXT_CACHE_ALSO_PURCHASED, 'code' => 'also_purchased', 'file' => 'also_purchased-language.cache', 'multiple' => true).

);.

// check if a default currency is set.

If (!defined('DEFAULT_CURRENCY')) {.

$messageStack->add(ERROR_NO_DEFAULT_CURRENCY_DEFINED, 'error');.

}.

// check if a default language is set.

If (!defined('DEFAULT_LANGUAGE')) {.

$messageStack->add(ERROR_NO_DEFAULT_LANGUAGE_DEFINED, 'error');.

}.

If (function_exists('ini_get') && ((bool)ini_get('file_uploads') == false) ) {.

$messageStack->add(WARNING_FILE_UPLOADS_DISABLED, 'warning');.

}.

?>..

Comment #2

Eerrmmm well.

Do you really want to see the long code again?.

Here you go man. Many thanks :.

NOTHING AT THE MOMENT..I deleted as stated above to solve a problem but created a GIGANTIC problem :(....do you want the original code that is suppose to be there. I guess I will be locked out...Ill just have to be a visitor like everyone else lol.

Tim..

Comment #3

OK.....

I'm confused now?.

You all fixed up, or still in the cave?..

Comment #4

Lol..ok ok. Heres how it goes. I have no database.php file in admin/includes/function/database.php I know this is infact the problem why I cant see the login page. And it's not solved...sorry to be unclear. And the other problems mentioned above cannot be solved until I could see the login screen at erbanfootwear.com/admin. SO BIG HELP IS NEEDED.



?.

Thanks man,.

Tim..

Comment #5

Here is the original database.php code that is suppose to be there...but is not there at the moment becuase of my mistake.

:.

<?php.

/*.

$Id: database.php,v 1.23 2003/06/20 00:18:30 hpdl Exp $.

OsCommerce, Open Source E-Commerce Solutions.

Http://www.oscommerce.com.

Copyright (c) 2007 osCommerce.

Released under the GNU General Public License.

*/.

Function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') {.

Global $$link;.

If (USE_PCONNECT == 'true') {.

$$link = mysql_pconnect($server, $username, $password);.

} else {.

$$link = mysql_connect($server, $username, $password);.

}.

If ($$link) mysql_select_db($database);.

Return $$link;.

}.

Function tep_db_close($link = 'db_link') {.

Global $$link;.

Return mysql_close($$link);.

}.

Function tep_db_error($query, $errno, $error) {.

Die('<font color="#000000"><b>'$errno' - '$error'<br><br>'$query'<br><br><small><font color="#ff0000">[TEP STOP]</font></small><br><br></b></font>');.

}.

Function tep_db_query($query, $link = 'db_link') {.

Global $$link, $logger;.

If (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {.

If (!is_object($logger)) $logger = new logger;.

$logger->write($query, 'QUERY');.

}.

$result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error());.

If (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) {.

If (mysql_error()) $logger->write(mysql_error(), 'ERROR');.

}.

Return $result;.

}.

Function tep_db_perform($table, $data, $action = 'insert', $parameters = '', $link = 'db_link') {.

Reset($data);.

If ($action == 'insert') {.

$query = 'insert into '$table' (';.

While (list($columns, ) = each($data)) {.

$query .= $columns', ';.

}.

$query = substr($query, 0, -2)') values (';.

Reset($data);.

While (list(, $value) = each($data)) {.

Switch ((string)$value) {.

Case 'now()':.

$query .= 'now(), ';.

Break;.

Case 'null':.

$query .= 'null, ';.

Break;.

Default:.

$query .= '\''tep_db_input($value)'\', ';.

Break;.

}.

}.

$query = substr($query, 0, -2)')';.

} elseif ($action == 'update') {.

$query = 'update '$table' set ';.

While (list($columns, $value) = each($data)) {.

Switch ((string)$value) {.

Case 'now()':.

$query .= $columns' = now(), ';.

Break;.

Case 'null':.

$query .= $columns .= ' = null, ';.

Break;.

Default:.

$query .= $columns' = \''tep_db_input($value)'\', ';.

Break;.

}.

}.

$query = substr($query, 0, -2)' where '$parameters;.

}.

Return tep_db_query($query, $link);.

}.

Function tep_db_fetch_array($db_query) {.

Return mysql_fetch_array($db_query, MYSQL_ASSOC);.

}.

Function tep_db_result($result, $row, $field = '') {.

Return mysql_result($result, $row, $field);.

}.

Function tep_db_num_rows($db_query) {.

Return mysql_num_rows($db_query);.

}.

Function tep_db_data_seek($db_query, $row_number) {.

Return mysql_data_seek($db_query, $row_number);.

}.

Function tep_db_insert_id($link = 'db_link') {.

Global $$link;.

Return mysql_insert_id($$link);.

}.

Function tep_db_free_result($db_query) {.

Return mysql_free_result($db_query);.

}.

Function tep_db_fetch_fields($db_query) {.

Return mysql_fetch_field($db_query);.

}.

Function tep_db_output($string) {.

Return htmlspecialchars($string);.

}.

Function tep_db_input($string, $link = 'db_link') {.

Global $$link;.

If (function_exists('mysql_real_escape_string')) {.

Return mysql_real_escape_string($string, $$link);.

} elseif (function_exists('mysql_escape_string')) {.

Return mysql_escape_string($string);.

}.

Return addslashes($string);.

}.

Function tep_db_prepare_input($string) {.

If (is_string($string)) {.

Return trim(stripslashes($string));.

} elseif (is_array($string)) {.

Reset($string);.

While (list($key, $value) = each($string)) {.

$string[$key] = tep_db_prepare_input($value);.

}.

Return $string;.

} else {.

Return $string;.

}.

}.

?>..

Comment #6

If you can't use osC to replace it, you'll have to use your site's Control Panel, or FTP..

Comment #7

And I will have to wait until my friend comes.......whenever he feels like coming.

Oh and by the way what do you think about the rest of what I said" I wanted to create a sitemap so I used this contribution: Increase your Google Page Rank, add an XML Sitemap (FREE) and in the zip it had this link to go to:.

Http://www.xml-sitemaps.com/.

And yes I went there to enter in all the information it ask to create a sitemap..

Then ok I have the latest Whos Online Enhancement contribution 3.3 and it started to have errors after the Verisign website above started to crawl my Verisign website sad.gif This is the error it had :" ETC.... I could use help there for when I do get it up and running later today. What you think is altered and what you think could be done to fix this not so good issue of the sitemap and language problems?.

Thanks for everything man.

Tim..

Comment #8

I've not messed with the Sitemap or the Who's Online Enhancement contribution , so your guess is as good as mine...

Comment #9

Just wondering, if you deleted a file, just use your FTP progam to upload a fresh copy of it. haha..

Comment #10

Hey Tim,.

Ok, first things first....

Did you have the - Whos Online Enhancement 3.3 contribution installed first?.

Was everything working just fine if you answered yes to above?.

Things went crazy when you added the sitemap contribution and you thought deleting the database.php file would solve your problems. Then things started to snowball..

Your not going to like my recommendation but I can not see any other way of bailing out of the mess without going nuts with checking ton's of coding and still not knowing what the results will be..

Edit back all the files that the sitemap contribution had you do and remove the contribution..

Upload a clean database.php file to - \admin\includes\functions\.

Double check that your Verisign site is back to functioning properly and look for a different sitemap contribution..

Might I suggest these as they came highly recommended by a very experienced forum member (Jack mcs, thank you Jack)..

Google Sitemap Generator for MS2.

And.

Dynamic SiteMap V 1.0.

..

Good luck!..

Comment #11

Hey Man just want to thank you for everything man. You have sent me a email and I have not replied. I just wanted to let you know I have not forgot about you and thanks for all your efforts. I appreciate them all. I know you have better things to do really.

Also, as for the sitemap. Well when I went to this Verisign website listed in the contribution for it to automatically GENERATE a sitemap by means of CRAWLING my webpage. And it broke my online enhancement contribution becuase of the database.php on line 45. which honestly I dont know how it even came to that becuase I never edited the file. And umm lets see here...I have no clue why the language keeps changing other than the fact when a customer switches the language for the Verisign website it also switches for admin.....weird. Any have this problem? And yes all this happened when the CRAWLER crawled my webpage to so call generate the best google sitemap and all the other search engines..

And yes Ill look at the contributions posted.

Thanks for everything man..

Please keep me up to date,.

Tim..

Comment #12

Oh and yes......I NEVER installed a sitemap contribution before..I guess you can say the Verisign website crawling my Verisign website was the first step and last step..

Thanks,.

Tim..

Comment #13

Hey Tim,.

I was glad to have offered my help, I hope some of it was useful. Things are a bit crazy around here right now, besides the family and holidays, I am wrapping up exams. I only come up for a breather now and then..

The reason I suggest removing the sitemap contribution is because....

One, if the Verisign site was working before the modification then we need to get back to that last known working point as we don't know what in the modifications went wrong..

I highly doubt that the automatic crawler edited any of your files (it shouldn't let's put it that way), instead it reads links and such info to create the map..

So if you remove the sitemap and contribution, make sure you have a correct database.php file, and things still don't go back to normal, then we know to look for something suspicious or out of place..

The contribution sent you to a third-party Verisign site (which looks like it also charges for services) to actually crawl your Verisign site to create the map. Who knows what else the site's program might have done. It would be best to stick with tried-n-true contributions right from here or go to Google (good idea anyway) and learn.

How to create a sitemap.

And signup for a free Webmaster account...

Comment #14

Hi. If you have problems with XML Sitemap use.

Sitemap Writer Pro.

I tried different software for creating the sitemap for my website. This is the most effective one among 5-6 programs I tried..

This powerful webtool generates the sitemap for your Verisign website in just seconds. Mayor search engines.

(Google, Yahoo, Ask, MSN, Moreover).

Are able to index and read your sitemaps without any problems. Not expensive and easy to use!..

Comment #15

Here the drill. I DELETED the database.php file in admin/includes/database.php. I believe thats where the database file is located in the /admin section. I did this for many reasons. Heres the reasons and I guess you could call it silly..

I wanted to create a sitemap so I used this contribution:.

Increase your Google Page Rank, add an XML Sitemap (FREE).

And in the zip it had this link to go to:.

Http://www.xml-sitemaps.com/.

And yes I went there to enter in all the information it ask to create a sitemap..

Then ok I have the latest.

Whos Online Enhancement.

Contribution 3.3 and it started to have errors after the Verisign website above started to crawl my website.

This is the error it had:.

C:\Inetpub\wwwroot\erbanfootwear.com\admin\includes\functions\database.php on line 45.

0 -.

Select time_entry, time_last_click from whos_online where session_id='a8cec528e61a49e5f27c2aaaa601fded'.

I look at the code on like 45 of database.php and find this line:.

$result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error()); ok fair enough. I go to the backup file and compare it and it's the same! ok then I just replace it with the backup file and all worked well UNTIL today. I saw the same error message not even 1 day after I solved it I thought. And I went to /admin/includes/database.php and DELETED the whole thing. I did this so I could repaste it becuase I knew there was no difference. When I clicked save..I CAN NO LONGER access my admin interface.



Fatal error: Call to undefined function: tep_db_connect() in C:\Inetpub\wwwroot\erbanfootwear.com\admin\includes\application_top.php on line 63.

It gets worse. On the main page...index.php where it says "Choose your language"...everytime I or a customer click a different language my admin language changes to the language selected in the admin section......this is WEIRD. and when I change it to english it displays english in admin. This is not good. How do I fix this? Its all thanks to this sitemap thing.

And I dont know what else it messed up. any hints?.

Any help would do great honestly I need all the help I could get..

Thanks,.

Tim..

Comment #16

Does the code in your.

/admin/includes/.

Application_top.php.

Look like this:.

// include the database functions.

Require(DIR_WS_FUNCTIONS'database.php');.

// make a connection to the database... now.

Tep_db_connect() or die('Unable to connect to database server!');.

I mean do you have that "require" just before the call to tep_db_connect()..

Comment #17


This question was taken from a support group/message board and re-posted here so others can learn from it.

 

Categories: Home | Diet & Weight Management | Vitamins & Supplements | Herbs & Cleansing |

Sexual Health | Medifast Support | Nutrisystem Support | Medifast Questions |

Web Hosting | Web Hosts | Website Hosting | Hosting |

Web Hosting | GoDaddy | Digital Cameras | Best WebHosts |

Web Hosting FAQ | Web Hosts FAQ | Hosting FAQ | Hosting Group |

Hosting Questions | Camera Tips | Best Cameras To Buy | Best Cameras This Year |

Camera Q-A | Digital Cameras Q-A | Camera Forum | Nov 2010 - Cameras |

Oct 2010 - Cameras | Oct 2010 - DSLRs | Oct 2010 - Camera Tips | Sep 2010 - Cameras |

Sep 2010 - DSLRS | Sep 2010 - Camera Tips | Aug 2010 - Cameras | Aug 2010 - DSLR Tips |

Aug 2010 - Camera Tips | July 2010 - Cameras | July 2010 - Nikon Cameras | July 2010 - Canon Cameras |

July 2010 - Pentax Cameras | Medifast Recipes | Medifast Recipes Tips | Medifast Recipes Strategies |

Medifast Recipes Experiences | Medifast Recipes Group | Medifast Recipes Forum | Medifast Support Strategies |

Medifast Support Experiences |

 

(C) Copyright 2010 All rights reserved.