Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Help. Fatal error Call to a member function...


Guest

Recommended Posts

Posted

Dear fellows, my hosting provider suddenly upgraded the server OHP version to "5" and i have a fatal error:

 

 

Fatal error: Call to a member function call_api() on a non-object in /home/movingso/public_html/tienda/checkout_process.php on line 127

 

I would be so gratefull if you can help me to solve this issue.

Thanks

Posted

chek line 127 it will be having $....->call_api.

 

The $... is an assumed instance of a class which actually is not the case.

 

This might happen when a session variable to considered as a global variable.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Posted

Hello I was also receiving the same error different page.

Fatal error: Call to a member function add_current_page() on a non-object in /home/ouraccount/public_html/catalog/includes/application_top.php on line 313

However when I checked with the host they had no made any changes. I then cleared the cashe on the browser and the page came up correctly. Have you contacted the host are you sure they changed the php installation?

If so you may need this update.

On your last day only you will have to approve or disaprove of how your life has been.

Posted

$navigation is a session var but considered global.

 

Apply this

require(DIR_WS_FUNCTIONS . 'compatibility.php'); move it just after

// include server parameters

require('includes/configure.php');

 

if (strlen(DB_SERVER) < 1) {

if (is_dir('install')) {

header('Location: install/index.php');

}

}

 

 

plus replace compatability file with a file from lastest rc2 osc version.

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Posted
Hello I was also receiving the same error different page.

Fatal error: Call to a member function add_current_page() on a non-object in /home/ouraccount/public_html/catalog/includes/application_top.php on line 313

However when I checked with the host they had no made any changes. I then cleared the cashe on the browser and the page came up correctly. Have you contacted the host are you sure they changed the php installation?

If so you may need this update.

Yes, im sure because i asked this action to my datacenter im the server owner. I dont know if the update could be the fix, because this is an almost fresh installation. but any way im going to check this who knows if this could work, thank you!

Posted
$navigation is a session var but considered global.

 

Apply this

require(DIR_WS_FUNCTIONS . 'compatibility.php'); move it just after

// include server parameters

require('includes/configure.php');

 

if (strlen(DB_SERVER) < 1) {

if (is_dir('install')) {

header('Location: install/index.php');

}

}

 

 

plus replace compatability file with a file from lastest rc2 osc version.

 

Satish

Thank you satish, do you mean i have to check the page and try to meke the changes you are eriting in your posting?

Posted

well the compatability file that is in includes/function folder has been upgraded by oscommerce and the upgraded file can be found in download with RC2.

 

So update that file.

 

Also as some code is affected so You need to place the includes line as stated in my previous comment.

 

 

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

  • 5 months later...
Posted
Dear fellows, my hosting provider suddenly upgraded the server OHP version to "5" and i have a fatal error:

 

 

Fatal error: Call to a member function call_api() on a non-object in /home/movingso/public_html/tienda/checkout_process.php on line 127

 

I would be so gratefull if you can help me to solve this issue.

Thanks

 

 

Hopefully this topic is still open.

 

I have a similar message to Ferga minus the api call: Fatal error: Call to a member function on a non-object in /home/trans128/public_html/bookings/checkout_process.php on line 127

 

 

This happens when I select pay by check/money order and then try to confirm the final step where it should return the success page.

 

I have searched read this post, uploaded the latest compatibility.php file.

 

Satish, I'm not clear on where the code you suggested is meant to go ie: what file and where in the file, and will it resolve my issue.

 

A bit of background: I have moved my site and oscommerce to a new host. I installed a clean oscommerce install using Fantastico then uploaded my customised files and the database.

 

Any help would be appreciated.

 

David

Posted
Hopefully this topic is still open.

 

I have a similar message to Ferga minus the api call: Fatal error: Call to a member function on a non-object in /home/trans128/public_html/bookings/checkout_process.php on line 127

 

 

This happens when I select pay by check/money order and then try to confirm the final step where it should return the success page.

 

I have searched read this post, uploaded the latest compatibility.php file.

 

Satish, I'm not clear on where the code you suggested is meant to go ie: what file and where in the file, and will it resolve my issue.

 

A bit of background: I have moved my site and oscommerce to a new host. I installed a clean oscommerce install using Fantastico then uploaded my customised files and the database.

 

Any help would be appreciated.

 

David

 

 

Solved, and here is the solution I found for anyone having the same issues.

In the catalog/checkout_process.php I uploaded a version that didn't have the buySAFE part in it and it worked.

 

This is the code I deleted:

-------------------------

// {{ buySAFE Module

$buysafe_cart_id = MODULE_BUYSAFE_BUYSAFE_CART_PREFIX . '-' . tep_session_id() . (tep_count_customer_orders()-1);

$checkout_params = array('WantsBond' => ($WantsBond ? $WantsBond : 'false'), 'orders_id' => $insert_id, 'buysafe_cart_id' => $buysafe_cart_id);

$checkout_result = $buysafe_module->call_api('SetShoppingCartCheckout', $checkout_params);

if (is_array($checkout_result) && $checkout_result['IsBuySafeEnabled'] == 'true')

{

$update_data_array = array('buysafe_cart_id' => $buysafe_cart_id,

'buysafe_client_ip' => tep_get_ip_address(),

'buysafe_session_id' => tep_session_id());

tep_db_perform(TABLE_ORDERS, $update_data_array, 'update', "orders_id = '" . (int)$insert_id . "'");

}

---------------------

 

Hope it helps someone else.

 

David

  • 9 months later...

Archived

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

×
×
  • Create New...