Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Catalog side blank, Admin side OK


DeadDingo

Recommended Posts

Posted

Hi All

 

Got a bit of a strange one that I hope you can help with.

 

I have been building a new shop (using rc2a build) on my test domain and decided to move it over to the proper domain today.

I backed up all the files and the database.

 

I made all the relevant changes to the includes/configure.php and admin/includes/configure.php and uploaded all the files to the root of the properdomain and imported the database.

 

I am able to access the admin area with no problems at all. The problem is that the catalog side shows nothing, even if I look at a specific product. If I go to view the page source in IE, there is only the following

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8"></HEAD>
<BODY></BODY></HTML>

 

 

here is my configure.php file for the catalog area (domain name changed for here)

(the shop is in the root directory)

 

<?php
 define('HTTP_SERVER', 'http://mydomain.com');
 define('HTTPS_SERVER', 'http://mydomain.com');
 define('ENABLE_SSL', false);
 define('HTTP_COOKIE_DOMAIN', 'mydomain.com');
 define('HTTPS_COOKIE_DOMAIN', 'mydomain.com');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '/');
 define('DIR_WS_HTTP_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', '/hsphere/local/home/mydomain.com/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 define('DB_SERVER', 'my_sql_server');
 define('DB_SERVER_USERNAME', 'my_username');
 define('DB_SERVER_PASSWORD', 'my_password');
 define('DB_DATABASE', 'my_database');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', 'mysql');
?>

 

 

Thanks in advance for any help you can give.

Posted

I had a similar issue a while back, add the below code to your .htaccess file in your catalog directory, this will display any errors (if any) that are occurring.

 

Try to access the page again and reply if there are errors and we'll see if we can't help.

 

php_flag display_errors on

 

-dubz

Posted

Thanks for the input.

 

I added the .htaccess file and got the following result

 

Warning: main(includes/languages//index.php): failed to open stream: No such file or directory in /hsphere/local/home/banana/bananaenglish.net/index.php on line 43 Warning: main(includes/languages//index.php): failed to open stream: No such file or directory in /hsphere/local/home/banana/bananaenglish.net/index.php on line 43 Fatal error: main(): Failed opening required 'includes/languages//index.php' (include_path='.:/hsphere/shared/apache/libexec/php4ext/php/') in /hsphere/local/home/banana/bananaenglish.net/index.php on line 43

 

I am not sure why I am getting the double / after 'languages' It is set as shown in my original post

 

Line 43 of the index.php is

 

  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);

 

 

I have the latest STS contrib installed (as well as many others) and tried it with and without that contrib enabled

 

The same thing is that the first time I try the site in either IE or firefox I get the debug as show above. If I refresh the page it changes to the following

 

Warning: main(includes/languages/.php): failed to open stream: No such file or directory in /hsphere/local/home/banana/bananaenglish.net/includes/application_top.php on line 288 Warning: main(includes/languages/.php): failed to open stream: No such file or directory in /hsphere/local/home/banana/bananaenglish.net/includes/application_top.php on line 288 Fatal error: main(): Failed opening required 'includes/languages/.php' (include_path='.:/hsphere/shared/apache/libexec/php4ext/php/') in /hsphere/local/home/banana/bananaenglish.net/includes/application_top.php on line 288

 

 

Would it be worth, as a last resort, installing a vanilla version of oscommerce first and then just replacing/adding my original files and Database to see if that helps?

Posted

Hmmm

 

Are the server settings the same from your test domain to your live site, same server? Compare PHP versions if they are different as well as OS versions (linux, windows, etc.)

 

I am assuming the only change has been your configure.php file for the new server setup and was working in your test environment.

 

From the errors it looks like the language file is not being defined properly (line 288 error) For example this line should be reading as follows (addition in BOLD)

 

Warning: main(includes/languages//index.php -current

Warning: main(includes/languages/english/index.php -should be

 

That's why the extra '/' is appearing.

 

Look at file /includes/application_top.php and post lines starting with

// set the language (about line 267)

to

require(DIR_WS_LANGUAGES . $language . '.php'); about line 288.

 

Just curious to see if any changes have been made.

 

-dubz

Posted

Thanks again for your quick response.

 

I have checked the php versions and found that the test site (where it works) is using php 5.2.4 and the new site is using php 4.4.7 I have asked the host to change it for me. As soon as he does, I will test again.

 

In the mean time, here are the lines from application_top.php that you requested to see

 

// 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'];
 }

// include the language translations
 require(DIR_WS_LANGUAGES . $language . '.php');

Posted

This issue is now resolved.

 

The PHP has been upgraded to 5.2.4 (from 4.4.7) and all is working well.

 

Thanks for the help in getting to the bottom of this one.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...