Jump to content
Sign in to follow this  
Transcend

paypal ipn error - out of the blue

Recommended Posts

1146 - Table 'transmag_store.TABLE_ORDERS_SESSION_INFO' doesn't exist

 

insert into TABLE_ORDERS_SESSION_INFO (orders_id, sendto, billto, language, currency, content_type) values ('43', '55', '55', 'english', 'CAD', 'physical')

 

[TEP STOP]

 

All of a sudden i am receiving this error when clients attempt to place orders. The order enter my system, but they do not get redirected to paypal...any idea how to solve this??

 

It worked perfectly for weeks, then all fo a sudden decided to stop working. IS this on paypal's end or mine?

Share this post


Link to post
Share on other sites

the problem is because in your catalog the table 'orders_session_info' is not defined. Which version are you using (2.0 ? ).

 

for quickness, just put

define('TABLE_ORDERS_SESSION_INFO','orders_session_info');

into catalog/includes/database_tables.php

 

but you should also make your that the other paypal (contrib) related db tables are correctly defined too, see the documentation that came with it.


"Any fool can know. The point is to understand." -- Albert Einstein

Share this post


Link to post
Share on other sites

greg, thanks for the quick reply. I am just curious as to why it stopped working all of a sudden? It has been processing orders like a champ for weeks.

 

great contribution, thanks.

Share this post


Link to post
Share on other sites

Upon adding that line to the file, i get the following error at the top of every page..

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/transmag/public_html/store/includes/database_tables.php:2) in /home/transmag/public_html/store/includes/functions/sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/transmag/public_html/store/includes/database_tables.php:2) in /home/transmag/public_html/store/includes/functions/sessions.php on line 67

Share this post


Link to post
Share on other sites

where did you put that line? it needs to placed within the <?php ?> php quotes.

 

Actually if you are using v2.0 then put the following in between the <?php ?> tags

 //begin PayPal_Shopping_Cart_IPN
define('TABLE_PAYPAL_IPN','paypal_ipn');
define('TABLE_PAYPAL_IPN_ORDERS','paypal_ipn_orders');
define('TABLE_PAYPAL_IPN_ORDERS_MEMO','paypal_ipn_orders_memo');
define('TABLE_PAYPAL_IPN_TXN_TYPE','paypal_ipn_txn_type');
define('TABLE_PAYPAL_IPN_REASON_CODE','paypal_ipn_reason_code');
define('TABLE_PAYPAL_IPN_PAYMENT_TYPE','paypal_ipn_payment_type');
define('TABLE_PAYPAL_IPN_PAYMENT_STATUS','paypal_ipn_payment_status');
define('TABLE_PAYPAL_IPN_PAYMENT_PENDING_REASON','paypal_ipn_pending_reason');
define('TABLE_PAYPAL_IPN_MC_CURRENCY','paypal_ipn_mc_currency');
define('TABLE_PAYPAL_IPN_PAYMENT_ADDRESS_STATUS','paypal_ipn_address_status');
define('TABLE_ORDERS_SESSION_INFO', 'orders_session_info');
//end PayPal_Shopping_Cart_IPN

 

You may of uploaded a new/different database_tables.php to that directory, cos files don't normally change themselves :).

 

At some point you should consider upgrading to 2.2, it will allow customers to click back from the PayPal site yet still recommence the checkout sequence.

Edited by gregbaboolal

"Any fool can know. The point is to understand." -- Albert Einstein

Share this post


Link to post
Share on other sites

I am upgrading it as we speak. I am not sure what happenned to the site, but I will be sure to have it working in the next few hours and get back to you.

 

I believe i was using 1.3 before?

Share this post


Link to post
Share on other sites

I have now updated to 2.2

 

Greg, can you explain why i am now getting this error on top of all store pages?

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/transmag/public_html/store/includes/database_tables.php:2) in /home/transmag/public_html/store/includes/functions/sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/transmag/public_html/store/includes/database_tables.php:2) in /home/transmag/public_html/store/includes/functions/sessions.php on line 67

 

I believe it has something to do with the STS templating system i have running, but am not sure. It didn't happen until i tried your suggested changes. Is it

a CHMOD issue?

 

all pages following the login page also bring up these errors

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/transmag/public_html/store/includes/database_tables.php:2) in /home/transmag/public_html/store/includes/functions/sessions.php on line 67

 

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/transmag/public_html/store/includes/database_tables.php:2) in /home/transmag/public_html/store/includes/functions/sessions.php on line 67

 

Warning: Cannot modify header information - headers already sent by (output started at /home/transmag/public_html/store/includes/database_tables.php:2) in /home/transmag/public_html/store/includes/functions/general.php on line 29

Share this post


Link to post
Share on other sites

I now have the above issue sorted out. BUT it is going from bad to worse, unfortunately.

 

In the admin panel, i now receive errors such as the following on an individual order page:

 

Warning: main(FILENAME_PAYPAL_INFO): failed to open stream: No such file or directory in /home/transmag/public_html/store/admin/orders.php on line 204

 

Warning: main(): Failed opening 'FILENAME_PAYPAL_INFO' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/transmag/public_html/store/admin/orders.php on line 204

 

on my order list page i receive the following error:

 

1146 - Table 'transmag_store.TABLE_PAYPAL_IPN' doesn't exist

 

select ps.payment_status_name from TABLE_PAYPAL_IPN p left join orders o on p.paypal_ipn_id = o.paypal_ipn_id left join TABLE_PAYPAL_IPN_PAYMENT_STATUS ps on ps.payment_status_id = p.payment_status where o.orders_id ='47'

 

[TEP STOP]

 

Paypal_IPN DOES indeed exist in my database..

 

Please help!

f

Edited by Transcend

Share this post


Link to post
Share on other sites

It would seem that the define statement suggested earlier is at the very top of the file outside the <?php ?> tags, remove that line:

define (orders_session_info) ???


"Any fool can know. The point is to understand." -- Albert Einstein

Share this post


Link to post
Share on other sites

greg, it is exactly as you told me to do, yet i am still receiving the table_paypal_ipn error on my orders page, as well as the paypal_info errors on order screens. I have included my database_tables code.. Please let me know if i screwed it up!

 

<?php

/*

  $Id: database_tables.php,v 1.1 2003/03/14 02:10:58 hpdl Exp $

 

  osCommerce, Open Source E-Commerce Solutions

  http://www.oscommerce.com

 

  Copyright © 2003 osCommerce

 

  Released under the GNU General Public License

*/

 

// define the database table names used in the project

  define('TABLE_ADDRESS_BOOK', 'address_book');

  define('TABLE_ADDRESS_FORMAT', 'address_format');

  define('TABLE_BANNERS', 'banners');

  define('TABLE_BANNERS_HISTORY', 'banners_history');

  define('TABLE_CATEGORIES', 'categories');

  define('TABLE_CATEGORIES_DESCRIPTION', 'categories_description');

  define('TABLE_CONFIGURATION', 'configuration');

  define('TABLE_CONFIGURATION_GROUP', 'configuration_group');

  define('TABLE_COUNTER', 'counter');

  define('TABLE_COUNTER_HISTORY', 'counter_history');

  define('TABLE_COUNTRIES', 'countries');

  define('TABLE_CURRENCIES', 'currencies');

  define('TABLE_CUSTOMERS', 'customers');

  define('TABLE_CUSTOMERS_BASKET', 'customers_basket');

  define('TABLE_CUSTOMERS_BASKET_ATTRIBUTES', 'customers_basket_attributes');

  define('TABLE_CUSTOMERS_INFO', 'customers_info');

  define('TABLE_LANGUAGES', 'languages');

  define('TABLE_MANUFACTURERS', 'manufacturers');

  define('TABLE_MANUFACTURERS_INFO', 'manufacturers_info');

  define('TABLE_ORDERS', 'orders');

  define('TABLE_ORDERS_PRODUCTS', 'orders_products');

  define('TABLE_ORDERS_PRODUCTS_ATTRIBUTES', 'orders_products_attributes');

  define('TABLE_ORDERS_PRODUCTS_DOWNLOAD', 'orders_products_download');

  define('TABLE_ORDERS_STATUS', 'orders_status');

  define('TABLE_ORDERS_STATUS_HISTORY', 'orders_status_history');

  define('TABLE_ORDERS_TOTAL', 'orders_total');

  define('TABLE_PRODUCTS', 'products');

  define('TABLE_PRODUCTS_ATTRIBUTES', 'products_attributes');

  define('TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD', 'products_attributes_download');

  define('TABLE_PRODUCTS_DESCRIPTION', 'products_description');

  define('TABLE_PRODUCTS_NOTIFICATIONS', 'products_notifications');

  define('TABLE_PRODUCTS_OPTIONS', 'products_options');

  define('TABLE_PRODUCTS_OPTIONS_VALUES', 'products_options_values');

  define('TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS', 'products_options_values_to_products_options');

  define('TABLE_PRODUCTS_TO_CATEGORIES', 'products_to_categories');

  define('TABLE_REVIEWS', 'reviews');

  define('TABLE_REVIEWS_DESCRIPTION', 'reviews_description');

  define('TABLE_SESSIONS', 'sessions');

  define('TABLE_SPECIALS', 'specials');

  define('TABLE_TAX_CLASS', 'tax_class');

  define('TABLE_TAX_RATES', 'tax_rates');

  define('TABLE_GEO_ZONES', 'geo_zones');

  define('TABLE_ZONES_TO_GEO_ZONES', 'zones_to_geo_zones');

  define('TABLE_WHOS_ONLINE', 'whos_online');

  define('TABLE_ZONES', 'zones');

//begin PayPal_Shopping_Cart_IPN

define('TABLE_PAYPAL_IPN','paypal_ipn');

define('TABLE_PAYPAL_IPN_ORDERS','paypal_ipn_orders');

define('TABLE_PAYPAL_IPN_ORDERS_MEMO','paypal_ipn_orders_memo');

define('TABLE_PAYPAL_IPN_TXN_TYPE','paypal_ipn_txn_type');

define('TABLE_PAYPAL_IPN_REASON_CODE','paypal_ipn_reason_code');

define('TABLE_PAYPAL_IPN_PAYMENT_TYPE','paypal_ipn_payment_type');

define('TABLE_PAYPAL_IPN_PAYMENT_STATUS','paypal_ipn_payment_status');

define('TABLE_PAYPAL_IPN_PAYMENT_PENDING_REASON','paypal_ipn_pending_reason');

define('TABLE_PAYPAL_IPN_MC_CURRENCY','paypal_ipn_mc_currency');

define('TABLE_PAYPAL_IPN_PAYMENT_ADDRESS_STATUS','paypal_ipn_address_status');

define('TABLE_ORDERS_SESSION_INFO', 'orders_session_info');

//end PayPal_Shopping_Cart_IPN

?>

Share this post


Link to post
Share on other sites

Are you sure your installing version 2.2, the above is no longer used, try to verify the edits in admin/orders.php since they have changed (you need to follow the install instructions carefully irrespective of having any previous versions there are some subtle changes - so it is suggested to just copy and paste the new stuff).

 

When the errors seem to have ironed out, look in the orders db table and find the highest 'paypal_ipn_id' number and now set ( this number +1 ) as the autiincrement value in the table 'paypal'.


"Any fool can know. The point is to understand." -- Albert Einstein

Share this post


Link to post
Share on other sites

The above file is from catalog/includes/database_tables.php ? if so then it has nothing to do with Admin Orders, you can remove the database declarations made by this ocntrib in that file and upload to catalog/includes.

 

Now, catalog/admin/includes/databastes_tables.php only needs to have one line entered (as such) see below:

 

//begin PayPal_Shopping_Cart_IPN
 require_once(DIR_FS_CATALOG_MODULES . 'payment/paypal/database_tables.php');
//end PayPal_Shopping_Cart_IPN

BUT you 'must' be installing v2.2 for this.


"Any fool can know. The point is to understand." -- Albert Einstein

Share this post


Link to post
Share on other sites

I just installed 2.2 now, fresh off the contribution page! I added the last section, as per your advice. I went through and did every seperate edit again, just to be sure. :(

 

Sorry if I am being a pain in the ass this evening.

Share this post


Link to post
Share on other sites

I removed the database declarations in catalog/includes/database_tables.php and reuploaded it.

 

in catalog/admin/includes/databastes_tables.php i had already added that one addition. Still receiving the same errors.

Share this post


Link to post
Share on other sites

Better off taking your time, at least that way if something goes wrong you might have a better idea where etc.

 

In admin/orders.php where you had the FILENAME_PAYPAL_INFO error it should now read:

 

//begin PayPal_Shopping_Cart_IPN

 

if (strtolower($order->info['payment_method']) == 'paypal') {

 

include DIR_FS_CATALOG_MODULES . 'payment/paypal/admin_orders.php';

 

} else {

?>

  <td><table border="0" cellspacing="0" cellpadding="2">

    <tr>

    <td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td>

    <td class="main"><?php echo $order->info['payment_method']; ?></td>

  </tr>

<?php

}//else not paypal

//end PayPal_Shopping_Cart_IPN

 

Which page you receiving the errors? admin/orders.php? You need to do the edits for that section again, also for admin/includes/functions/general.php


"Any fool can know. The point is to understand." -- Albert Einstein

Share this post


Link to post
Share on other sites

I think I have it figured out. I was editing an already edited orders.php file. I believe i transposed an old edit over a new one somehow, as i grabbed a clean one from my oscommerce tar and reedited it, and nwo it seems to be functioning normally.

 

All IPN Ids are now at zero, so i am guessing somehow they were overwritten. That is not a big deal. Hopefully it will work from now on.

 

as a side note, what return address should I have paypel set to to make sure IPN is working properly?

 

I really appreciate yoru help, and am sorry for being such a drain on yoru time this evening

 

thanks again

Fraser

Edited by Transcend

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×