chrometweaks.org

How is web hosting at iPage supposed to work?

Click Here To View All Answers...


First of all How is web hosting at iPage supposed to work? Hoping for any answer. Another quick question... On my store front I am getting this weired message about the general.php file. It was only happening when you tried to add the product to the shopping cart and know it is doing it on just about everything. I am really in left field with this. I understand a little about php web sites but not enough to getr my butt out of this one.



Thanks.

Josh.

Http://www.precision-boats.com/catalog..

Comments (68)

I would like to know the answer too. Anyone here know what is the answer. I'll do some research in Google and get back to you if I bump into an useful answer. You should email the people at iPage as they probably could give you an answer..

Comment #1

Here are the first lines from that file..

Thanks.

Josh.

<?php.

/*.

$Id: general.php,v 1.231 2003/07/09 01:15:48 hpdl Exp $.

OsCommerce, Open Source E-Commerce Solutions.

Http://www.oscommerce.com.

Copyright © 2003 osCommerce.

Released under the GNU General Public License.

*/.

////.

// Stop from parsing any further PHP code.

Function tep_exit() {.

Tep_session_close();.

Exit();.

}.

////.

// Redirect to another page or site.

Function tep_redirect($url) {.

If ( (ENABLE_SSL == true) &amp;amp;&amp;amp; (getenv('HTTPS') == 'on') ) { // We are loading an SSL page.

If (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url.

$url = HTTPS_SERVERsubstr($url, strlen(HTTP_SERVER)); // Change it to SSL.

}.

}.

Header('Location: '$url);.

Tep_exit();.

}.

////.

// Parse the data used in the html tags to ensure the tags will not break.

Function tep_parse_input_field_data($data, $parse) {.

Return strtr(trim($data), $parse);.

}.

Function tep_output_string($string, $translate = false, $protected = false) {.

If ($protected == true) {.

Return htmlspecialchars($string);.

} else {.

If ($translate == false) {.

Return tep_parse_input_field_data($string, array('"' => '&quot;'));.

} else {.

Return tep_parse_input_field_data($string, $translate);.

}.

}.

}.

Function tep_output_string_protected($string) {.

Return tep_output_string($string, false, true);.

}.

Function tep_sanitize_string($string) {.

$string = ereg_replace(' +', ' ', trim($string));.

Return preg_replace("/[<>]/", '_', $string);.

}.

////.

// Return a random row from a database query.

Function tep_random_select($query) {.

$random_product = '';.

$random_query = tep_db_query($query);.

$num_rows = tep_db_num_rows($random_query);.

If ($num_rows > 0) {.

$random_row = tep_rand(0, ($num_rows - 1));.

Tep_db_data_seek($random_query, $random_row);.

$random_product = tep_db_fetch_array($random_query);.

}.

Return $random_product;.

}.

////.

// Return a product's name.

// TABLES: products.

Function tep_get_products_name($product_id, $language = '') {.

Global $languages_id;.

If (empty($language)) $language = $languages_id;.

$product_query = tep_db_query("select products_name from "TABLE_PRODUCTS_DESCRIPTION" where products_id = '"(int)$product_id"' and language_id = '"(int)$language"'");.

$product = tep_db_fetch_array($product_query);.

Return $product['products_name'];.

}..

Comment #2

LOL, that's not exactly "a few lines". You make it difficult for people to help. If you had just posted a few lines, I could have spotted the parse error and told you what it was, but when you post the entire thing, I have to copy it to an editor that has line numbers so that I can find where the error is. Make sure you read directions a little more carefully, and that might help you with your work on OSCommerce in general..

Anyways, it looks like you error is here.....

If ( (ENABLE_SSL == true) &amp;amp;&amp;amp; (getenv('HTTPS') == 'on') ) { // We are loading an SSL page.

Should be.

If ( (ENABLE_SSL == true) &&(getenv('HTTPS') == 'on') ) { // We are loading an SSL page.

Or.

If ( (ENABLE_SSL == true) &amp;$amp;(getenv('HTTPS') == 'on') ) { // We are loading an SSL page.

Either should work. I assume you must have modified this line when you instaelled a contribution or something?.

This post has been edited by.

Wizardsandwars.

: 25 February 2004, 18:37..

Comment #3

Thanks for the help. Yeah I posted that in a hurry so I could get to lunch. Thanks for the help, lets see if it works. I didn't change it manually wonder if it changed by itself? Weired. Ok know it says line 662. This is what that line says.....

While ( ($flag == 'on') &amp;amp;amp;&amp;amp;amp; ($k < count($pieces)) ) {.

While (substr($pieces[$k], -1) == ')') {.

$post_objects[] = ')';.

If (strlen($pieces[$k]) > 1) {.

$pieces[$k] = substr($pieces[$k], 0, -1);.

} else {.

$pieces[$k] = '';.

}.

}..

Comment #4

Hmmn, that's weird. Not sure why it's doing that. It might have somethign to do with the way you are uploading the files, such as through a cpanel file manager..

Replace the.

&amp;amp;amp;&amp;amp;amp;.

With.

&&..

Comment #5

Chris,.

Really weired, when I make the changes it goes abck and forth from line 662 to line 23?? Maybe unistall and start over?? Is there anything else I can give you chris to help out??.

Thanks.

Josh..

Comment #6

On my store front I am getting this weired message about the general.php file. It was only happening when you tried to add the product to the shopping cart and know it is doing it on just about everything. I am really in left field with this. I understand a little about php web sites but not enough to getr my butt out of this one. Any help would be welcomed greatly..

Thanks.

Josh.

Http://www.precision-boats.com/catalog..

Comment #7

Post the few lines around line 23 of home/josh/public_html/catalog/includes/functions/general.php..

Comment #8


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