chrometweaks.org

What is the best web iPage hosting service, that has a dedicated server!?

Click Here To View All Answers...


Got a question... What is the best web iPage hosting service, that has a dedicated server!? Hoping for any response. Second question of mine... We just need to allow access to password_forgotten.php. Try this version:.

 if ((basename($PHP_SELF) != "login.php") && (basename($PHP_SELF) != "password_forgotten.php") && (!tep_session_is_registered('customer_id'))) {.

   $navigation->set_snapshot();.

   tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));.

 }.

Regards.

Jim..

Comments (55)

Hmm... I need to find out myself. I don't know what is the answer. I'll do some research and get back to you if I find an anything. You should email the people at iPage as they probably could assist you..

Comment #1

This sounds like a SSL problem. This code will redirect you to a login page that is SSL. If you log in and then go to a non-SSL page the session is lost. Check your entries in includes/configure.php for the SSL-related definitions. If you are still having problems, please post the top part of configure.php (without the database password.).

Regards.

Jim..

Comment #2

Hi Jim,.

It doesn't work but I'm not a coder. This is the code of my configure.php:.

<?php.

/*.

 osCommerce, Open Source E-Commerce Solutions.

 http://www.oscommerce.com.

 Copyright (c) 2003 osCommerce.

 Released under the GNU General Public License.

*/.

// Define the webserver and path parameters.

// * DIR_FS_* = Filesystem directories (local/physical).

// * DIR_WS_* = Webserver directories (virtual/URL).

 define('HTTP_SERVER', 'http://xx.xxx.xxx.x:xxxx');.

 define('HTTPS_SERVER', 'https://xx.xxx.xxx.x:xxxx');.

 define('ENABLE_SSL', true); // secure webserver for checkout procedure?.

 define('HTTP_COOKIE_DOMAIN', '127.0.0.1');.

 define('HTTPS_COOKIE_DOMAIN', '');.

 define('HTTP_COOKIE_PATH', '/catalog/');.

 define('HTTPS_COOKIE_PATH', '');.

 define('DIR_WS_HTTP_CATALOG', '/catalog/');.

 define('DIR_WS_HTTPS_CATALOG', '');.

 define('DIR_WS_IMAGES', 'images/');.

 define('DIR_WS_ICONS', DIR_WS_IMAGES'icons/');.

 define('DIR_WS_INCLUDES', 'includes/');.

 define('DIR_WS_BOXES', DIR_WS_INCLUDES'boxes/');.

 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES'functions/');.

 define('DIR_WS_CLASSES', DIR_WS_INCLUDES'classes/');.

 define('DIR_WS_MODULES', DIR_WS_INCLUDES'modules/');.

 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES'languages/');.

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');.

 define('DIR_FS_CATALOG', '/easyphp/www/catalog/');.

 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG'download/');.

 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG'pub/');.

// define our database connection.

 define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers.

 define('DB_SERVER_USERNAME', 'root');.

 define('DB_SERVER_PASSWORD', 'xxxxx');.

 define('DB_DATABASE', 'mabase');.

 define('USE_PCONNECT', 'true'); // use persistent connections?.

 define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'.

// eselect plus payement.

 define('DIR_WS_MONERIS', DIR_WS_INCLUDES. 'moneris/');.

// STS: ADD: Define Simple Template System files.

 define('STS_START_CAPTURE', DIR_WS_INCLUDES'sts_start_capture.php');.

 define('STS_STOP_CAPTURE', DIR_WS_INCLUDES'sts_stop_capture.php');.

 define('STS_RESTART_CAPTURE', DIR_WS_INCLUDES'sts_restart_capture.php');.

 define('STS_TEMPLATE_DIR', DIR_WS_INCLUDES'sts_templates/');.

 define('STS_DEFAULT_TEMPLATE', DIR_WS_INCLUDES'sts_template.html');.

 define('STS_DISPLAY_OUTPUT', DIR_WS_INCLUDES'sts_display_output.php');.

 define('STS_USER_CODE', DIR_WS_INCLUDES'sts_user_code.php');.

 define('STS_PRODUCT_INFO', DIR_WS_INCLUDES'sts_product_info.php');.

// STS: EOADD.

?>.

Thk a lot for your help.

Fabien..

Comment #3

You are missing a few things in the SSL side. Try changing the first block of defines to this:.

Define('HTTP_SERVER', 'http://xx.xxx.xxx.x:xxxx');.

Define('HTTPS_SERVER', 'https://xx.xxx.xxx.x:xxxx');.

Define('ENABLE_SSL', true); // secure webserver for checkout procedure?.

Define('HTTP_COOKIE_DOMAIN', 'xx.xxx.xxx.x:xxxx');.

Define('HTTPS_COOKIE_DOMAIN', 'xx.xxx.xxx.x:xxxx');.

Define('HTTP_COOKIE_PATH', '/catalog/');.

Define('HTTPS_COOKIE_PATH', '/catalog/');.

Define('DIR_WS_HTTP_CATALOG', '/catalog/');.

Define('DIR_WS_HTTPS_CATALOG', '/catalog/');.

Define('DIR_WS_IMAGES', 'images/');.

Define('DIR_WS_ICONS', DIR_WS_IMAGES'icons/');.

Define('DIR_WS_INCLUDES', 'includes/');.

Define('DIR_WS_BOXES', DIR_WS_INCLUDES'boxes/');.

Define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES'functions/');.

Define('DIR_WS_CLASSES', DIR_WS_INCLUDES'classes/');.

Define('DIR_WS_MODULES', DIR_WS_INCLUDES'modules/');.

Define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES'languages/');.

Assuming that the rest of the settings are correct, this should fix the SSL issues..

Regards.

Jim..

Comment #4

Yes!!! It's working. You're the best.

Thanks a lot.

Fab..

Comment #5

I think this is the most simple way of doing this :.

In Catalog\includes\Classes\Currencies.php.

Find on line 71 :.

Function display_price($products_price, $products_tax, $quantity = 1) {.

Return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);.

}.

}.

?>.

Replace with :.

Function display_price($products_price, $products_tax, $quantity = 1) {.

If (tep_session_is_registered('customer_id')){.

Return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);.

} else {.

Return 'Log in for price';.

}.

}.

}.

?>..

Comment #6

CDGo IT Consultancy I think you posted in the wrong topic..

Comment #7

Well well, my old pb is back and don't understand why!!!.

I come back to the login page when I click on the dropdown menu installed by STS.

Kymation could you enter in my iPage website to see the pb?.

I PM you.

Fab..

Comment #8

I don't think so!.

I mean it's about needing the customer to log in to view your prices right?.

So this is in my opinion the easiest and for sure the least destructive way of doing it..

You can try it in my live shop!!!!!!!!!!!!!!!!!!!!.

Www.schicktech.nl/catalog/index.php..

Comment #9

Ok j'ai pig, mais avec kymation on a opt pour une autre mthode qui empeche de rentrer sur le iPage site sans s'identifier. C'est la solution qu'il me fallait et qui fonctionne sauf pour une nouvelle box que STS m'a installe. A mon avis le pb n'est pas complique a corrige mais il faut juste etre un codeur et kymation est en train de regarder a..

Merci pour ton conseil cDGo IT Consultancy.

Fab..

Comment #10

Now I wish that I had taken that French class in high school. Not that I wouldn't have forgotten it all by now anyway..

Seriously, I'm having trouble finding the code that you use to generate the dropdown. Could you please post that code here for me to look at? Thanks..

Regards.

Jim..

Comment #11

Hi Kymation,.

Do you want some french lesson? no pb for me.

Ok, this is the code (I'm not sure) of the catmenu (dropdownbox):.

<?php.

/*.

$Id: sts_user_code.php,v 1.2 2004/02/05 05:57:21 jhtalk Exp jhtalk $.

OsCommerce, Open Source E-Commerce Solutions.

Http://www.oscommerce.com.

Copyright (c) 2003 osCommerce.

Released under the GNU General Public License.

*/.

/*.

 Simple Template System (STS) - Copyright (c) 2004 Brian Gallagher -.

*/.

// PUT USER MODIFIED CODE IN HERE, SUCH AS NEW BOXES, ETC..

// The following code is a sample of how to add new boxes easily..

//  Just uncomment block below and tweak for your needs!.

//  Use as many blocks as you need and just change the block names..

 // $sts_block_name = 'newthingbox';.

 // require(STS_START_CAPTURE);.

 // require(DIR_WS_BOXES'new_thing_box.php');.

 // require(STS_STOP_CAPTURE);.

 // $template['newthingbox'] = strip_unwanted_tags($sts_block['newthingbox'], 'newthingbox');.

   $sts_block_name = 'catmenu';.

   require(STS_START_CAPTURE);.

   echo "\n<! Start Category Menu >\n";.

   echo tep_draw_form('goto', FILENAME_DEFAULT, 'get', '');.

   echo tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"');.

   echo "</form>\n";.

   echo "<! End Category Menu >\n";.

   require(STS_STOP_CAPTURE);.

   $template['catmenu'] = $sts_block['catmenu'];.

 function tep_get_category_tree($parent_id = '0', $spacing = '', $exclude = '', $category_tree_array = '', $include_itself = false) {.

   global $languages_id;.

   if (!is_array($category_tree_array)) $category_tree_array = array();.

   if ( (sizeof($category_tree_array) < 1) && ($exclude != '0') ) $category_tree_array[] = array('id' => '0', 'text' => "Catalog");.

   if ($include_itself) {.

     $category_query = tep_db_query("select cd.categories_name from "TABLE_CATEGORIES_DESCRIPTION" cd where cd.language_id = '"(int)$languages_id"' and cd.categories_id = '"(int)$parent_id"'");.

     $category = tep_db_fetch_array($category_query);.

     $category_tree_array[] = array('id' => $parent_id, 'text' => $category['categories_name']);.

   }.

   $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.parent_id from "TABLE_CATEGORIES" c, "TABLE_CATEGORIES_DESCRIPTION" cd where c.categories_id = cd.categories_id and cd.language_id = '"(int)$languages_id"' and c.parent_id = '"(int)$parent_id"' order by c.sort_order, cd.categories_name");.

   while ($categories = tep_db_fetch_array($categories_query)) {.

     if ($exclude != $categories['categories_id']) $category_tree_array[] = array('id' => $categories['categories_id'], 'text' => $spacing$categories['categories_name']);.

     $category_tree_array = tep_get_category_tree($categories['categories_id'], $spacing'&nbsp;&nbsp;&nbsp;', $exclude, $category_tree_array);.

   }.

   return $category_tree_array;.

 }.

?>.

Thx.

Fab..

Comment #12

I think that this will work, but I have no way to test. If it creates errors, please post the error and any other information that you get and I'll try to work it out..

Find this code:.

 $sts_block_name = 'catmenu';.

 require(STS_START_CAPTURE);.

 echo "\n<! Start Category Menu >\n";.

 echo tep_draw_form('goto', FILENAME_DEFAULT, 'get', '');.

 echo tep_draw_pull_down_menu('cPath', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"');.

 echo "</form>\n";.

 echo "<! End Category Menu >\n";.

 require(STS_STOP_CAPTURE);.

 $template['catmenu'] = $sts_block['catmenu'];.

And replace it with this:.

 $sts_block_name = 'catmenu';.

 require(STS_START_CAPTURE);.

 echo "\n<! Start Category Menu >\n";.

 echo tep_draw_form('goto', FILENAME_DEFAULT, 'get', '');.

 echo tep_draw_pull_down_menu(tep_get_all_get_params(array('cPath'))'&cPath', tep_get_category_tree(), $current_category_id, 'onChange="this.form.submit();"');.

 echo "</form>\n";.

 echo "<! End Category Menu >\n";.

 require(STS_STOP_CAPTURE);.

 $template['catmenu'] = $sts_block['catmenu'];.

Please let me know what happens..

Regards.

Jim..

Comment #13

It' doesn't work.

Nothing more happen..

Another try?.

Fab..

Comment #14

Please post the URL before and after session is lost..

Debugging this way is a real pain..

Regards.

Jim..

Comment #15

I give up. I'm sorry, but I just can't figure out why the session is getting lost. I suspect something in STS, but I can't find it..

You could probably solve this by requiring cookies, but that will cost you some customers..

Regards.

Jim..

Comment #16

Ok, no pb, I understand..

Thx again for your help.

Fab..

Comment #17

Hi Kymation,.

In a previous post you said how to allow access to password_forgotten.php. Now I need to allow access to create_account.php. How do you code this in:.

If ((basename($PHP_SELF) != "login.php") && (basename($PHP_SELF) != "password_forgotten.php") && (!tep_session_is_registered('customer_id'))) {.

  $navigation->set_snapshot();.

  tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));.

}.

Thx.

Fab..

Comment #18

We just need to allow access to password_forgotten.php. Try this version:.

 if ((basename($PHP_SELF) != "login.php") && (basename($PHP_SELF) != "password_forgotten.php") && (!tep_session_is_registered('customer_id'))) {.

   $navigation->set_snapshot();.

   tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));.

 }.

Regards.

Jim..

Comment #19

Hi kymation,.

Thx four your code.

But I have a problem wiht it because I installed STS and the dropdownmenu, include in it, is protected and ask me to indentify myself again. Moreover, I have the same problem when I moved hypertext link of the information box (Shipping & Returns, Privacy Notice, Conditions of Use, Contact Us) at the bottom of my iPage website because when I click on those links, it ask me to sign in again. I think, that is necessary to modify your code to allow access at future modification..

Thx by advance.

Fab..

Comment #20


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