Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error in application_top.php (fresh install)


mcisar

Recommended Posts

Re. language errors in clean install... per earlier thread

 

Fatal error: Failed opening required 'includes/languages/.php' (include_path='.:/usr/share/pear') in /home/hitechtest/public_html/catalog/includes/application_top.php on line 285

 

Steve, completely nuked this time including database... same old deal.

 

Cheers,

>>>>> Mike <<<<<

Link to comment
Share on other sites

I see you are running red hat and apache2

 

I think that you are still having issues with the upload or check your permissions as your file manager does not seem to be there in admin yet I can get to the other pages by adding &language=en to the url

however if I do this in the catalog for categories I still get the call to non object

Fatal error: Call to a member function on a non-object in /home/hitechtest/public_html/catalog/includes/application_top.php on line 309[code]

 

for this fresh post can we have your configure.php files

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Steve is superb at this stuff.

 

He helped me through this problem turned out to be my database

 

Browse your language table in your database and make sure your languages are set properly.

 

Worked at this all day. But finally got it.

"One Of Life's Greatest Pleasures Is Doing What Others Say You Can't"

Link to comment
Share on other sites

Changed the permissions on the configs to 744 after the install to shut up the warning (changing to 706 didn't work in the installer)... what are the "recommended" permissions? In any case have now changed them to 777 at least temporarily.

 

<?php

/*

  osCommerce, Open Source E-Commerce Solutions

  http://www.oscommerce.com

 

  Copyright © 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://hitech.iul.net'); // eg, http://localhost - should not be empty for productive servers

  define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers

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

  define('HTTP_COOKIE_DOMAIN', 'hitech.iul.net');

  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', '/home/hitechtest/public_html/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', 'blah');

  define('DB_SERVER_PASSWORD', 'blah');

  define('DB_DATABASE', 'blah');

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

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

?>

 

<?php

/*

  osCommerce, Open Source E-Commerce Solutions

  http://www.oscommerce.com

 

  Copyright © 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://hitech.iul.net'); // eg, http://localhost - should not be empty for productive servers

  define('HTTP_CATALOG_SERVER', 'http://hitech.iul.net');

  define('HTTPS_CATALOG_SERVER', '');

  define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module

  define('DIR_FS_DOCUMENT_ROOT', '/home/hitechtest/public_html/catalog/'); // where the pages are located on the server

  define('DIR_WS_ADMIN', '/catalog/admin/'); // absolute path required

  define('DIR_FS_ADMIN', '/home/hitechtest/public_html/catalog/admin/'); // absolute pate required

  define('DIR_WS_CATALOG', '/catalog/'); // absolute path required

  define('DIR_FS_CATALOG', '/home/hitechtest/public_html/catalog/'); // absolute path required

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

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

  define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');

  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_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');

  define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');

  define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');

  define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');

  define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

 

// define our database connection

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

  define('DB_SERVER_USERNAME', 'blah');

  define('DB_SERVER_PASSWORD', 'blah');

  define('DB_DATABASE', 'blah');

  define('USE_PCONNECT', 'false'); // use persisstent connections?

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

?>

Link to comment
Share on other sites

Steve... remember to ?language=en instead of &language=en on the file manager, it seems to be there ok.

 

Doug... had actually followed your other thread all day doing what I could figure out how to do (pretty much a total newbie at SQL). I got all the way through to the point where I could see the languages table with the 3 languages listed. But I've no clue how to check the SQL to see which was set as the default tho (english shows as default in the admin app)... and thats the point when you proclaimed "solved". HEHE

 

Cheers,

>>>>> Mike <<<<<

Link to comment
Share on other sites

Ok let me try and explain

 

In phpmyadmin

 

1.select your database

2.In the right window all your database table should appear

3.Scroll down and select your language table

4. Under actions you should see some icons

5. Mouse over to see the browse icon

6. Cick on browse

7. Another window will open to show the settings in the table

----

For English

---

languages_id        name        code    image      directory  sort_order 

1                        English      en                      english    1

 

Hope this helps

"One Of Life's Greatest Pleasures Is Doing What Others Say You Can't"

Link to comment
Share on other sites

No GUI here for me I'm afraid, but I did the following from Steve's post

 

mysql> SELECT * FROM `languages` WHERE 1;
+--------------+---------+------+----------+-----------+------------+
| languages_id | name    | code | image    | directory | sort_order |
+--------------+---------+------+----------+-----------+------------+
|            1 | English | en   | icon.gif | english   |          1 |
|            2 | Deutsch | de   | icon.gif | german    |          2 |
|            3 | Espa?ol | es   | icon.gif | espanol   |          3 |
+--------------+---------+------+----------+-----------+------------+
3 rows in set (0.00 sec)

 

Which I think gets the same result as what you were doing. But where does it show which is default?

 

Cheers,

>>>>> Mike <<<<

Link to comment
Share on other sites

Hi Steve/Doug/Everybody :-)

 

Did some poking around regarding this issue and found some interesting/new/different stuff.

 

First off, check out Bug #1202... no resolution but interesting bug, looks like it's been hanging around for a long long time now :-)

 

So, based on that (and what my brain decided would be a good fix) I did the following...

 

=============================================

| line 110 of admin/includes/application_top.php

 

  from:

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

 

  to:

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

 

=============================================   

| line 266 of includes/application_top.php

 

  from:

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

 

  to:

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

 

I'm sure that broke language support completely, but no more language errors for now.

 

Then I get through to the "call to a member function..." mentioned earlier in the thread so...

 

=============================================

| line 311 of includes/application_top.php

 

  from:

    $navigation->add_current_page();

 

  to:

    //  $navigation->add_current_page();

 

That gets past that error, everything seems to work fine... can nose around, look at items *but* when I click on any 'buy it now' or 'add to cart' buttons it pops through to a window and proudly proclaims "your shopping cart is empty".

 

There were some other threads indicating that sessions stored in the database can be problematic, so I turned that off so that sessions are stored in files (besides, easier to look at the session files when they're files... will turn them back into mysql mode again later once the other issues go away). Went in, tried to make a purchase again... same deal "shopping cart empty".

 

=============================================

| test session file (wrapped)

cart|O:12:"shoppingcart":5:{s:8:"contents";a:0:{}s:5:"total";i:0;s:6:"weight";i:0;s:6:"cartID";

N;s:12:"content_type";b:0;}language|s:7:"english";languages_id|s:1:"1";currency|s:3:"USD";navigation|O:17:

"navigationhistory":2:{s:4:"path";a:1:{i:0;a:4:{s:4:"page";s:9:"index.php";s:4:"mode";s:6:"NONSSL";s:3:

"get";a:0:{}s:4:"post";a:0:{}}}s:8:"snapshot";a:0:{}}new_products_id_in_cart|s:9:"1{4}1{3}5";customer_id|i:2;

customer_first_name|s:4:"test";customer_default_address_id|i:2;customer_country_id|s:2:"38";customer_zone_id|s:2:"66";

 

The above is a copy of the session file at that point.

 

There are a few other places that throw up the "call to member function" error, and they as well all seem to be related to the "$navigation" stuff as well.

 

Anyhow thats all the "progress" I've been able to make at this point. I've left my "fixes" in place for now... Steve, please let me know if you need me to remove them again when you look at the system.

 

Cheers,

>>>>> Mike <<<<<

Link to comment
Share on other sites

Solved the pesky sucker!!!

 

Turns out that it was a register_globals problem.

 

When doing the setup I had put

 

php_value register_globals "on"

 

in the per directory config in my httpd.conf. This was enough to make the "register_global" warning in osCommerce go away, but when looking in detail at the phpinfo() report, that's not enough to turn on register_globals. I had to use

 

php_value register_globals 1

 

before phpinfo() showed that register_globals was active... lo and behold everthing started working just fine.

 

Thanks for all of your help though! I'm off to see if krazy glue will re-attach all the hair I've pulled out through the course of the day.

 

Cheers,

>>>>> Mike <<<<<

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...