Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / PHP Warning: mktime() expects parameter 6 to be long

PHP Warning: mktime() expects parameter 6 to be long

Locked

Views: 6,331

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
21 Dec 2010, 1:53 AM
#1
milkyway avatar

milkyway

Inactive

Join Date:
Aug 2006
Location:
Singapore
Posts:
167
Plugin Contributions:
1

PHP Warning: mktime() expects parameter 6 to be long

Dear Zenner!

My client have a trouble with his store, whenever a customer made payment using PayPal IPN the order is not recorded in zencart admin. This problem only occur after we upgraded the store to v1.3.9h (from v1.3.8)

I have verified all the files against v1.3.9h package and can confirm all the files are in the good shape and updated.

This store doesn't have customizations and maybe just a few standard non obtrusive mod.

All are in good shape when I checked.

I attempted to remove, reinstall PayPal IPN module, and the reuploaded the payment modules files, but to no avail.

In the log of PayPal IPN, I found these below, at the last bits there is PHP Warning.... checked the forum but didn't have a clue on it, could it be the cause?

Dec 20 2010 15:14 -- CURL response: VERIFIED

Dec 20 2010 15:14 -- IPN INFO (cl) - Confirmation/Validation response VERIFIED

Dec 20 2010 15:14 -- Breakpoint: 1 - Collected data from PayPal notification

Dec 20 2010 15:14 -- IPN INFO :: Transaction email details.
From IPN =  | [email protected]
From CONFIG = [email protected]

Dec 20 2010 15:14 -- Breakpoint: 2 - Validated transaction components

Dec 20 2010 15:14 -- Breakpoint: 3 - Communication method verified

Dec 20 2010 15:14 -- IPN NOTICE :: Found pending-address record in database

Dec 20 2010 15:14 -- Breakpoint: 4 - Details:  txn_type=cleared-address    ordersID = 0  IPN_id=75

   Relevant data from POST:
     txn_type = cleared-address
     parent_txn_id = None
     txn_id = 34L6572232024184Y

Dec 20 2010 15:14 -- IPN NOTICE :: IPN pausing: waiting for PDT to process. Sleeping 10 seconds ...

Dec 20 2010 15:14 -- Breakpoint: 5 - Transaction type (txn_type) = cleared-address   [parentLookup=cleared-address]

Dec 20 2010 15:14 -- IPN NOTICE :: Storing order/update details for order #0 txn_id: 34L6572232024184Y PP IPN ID: 75

Dec 20 2010 15:14 -- IPN NOTICE :: Added PP status-history record for order #0 txn_id: 34L6572232024184Y (updated/child) PP IPN ID: 75

Dec 20 2010 15:14 -- IPN NOTICE :: Set new status 2 for order ID = 0

Dec 20 2010 15:14 -- IPN NOTICE :: Updating order #0 to status: 2 (txn_type: cleared-address)

Dec 20 2010 15:14 -- IPN NOTICE :: Update complete.

[20-Dec-2010 15:14:28] PHP Warning:  mktime() expects parameter 6 to be long, string given in /home/hawaiifl/public_html/includes/functions/functions_general.php on line 1462
Dec 20 2010 15:14 -- IPN NOTICE :: Updating order #0 downloads (if any).  New max days: 14970, New count: 5

We really appreciate any helps

Milkyway

21 Dec 2010, 2:33 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: PHP Warning: mktime() expects parameter 6 to be long

mktime() expects parameter 6 to be long, string given in /home/hawaiifl/public_html/includes/functions/functions_general.php on line 1462

Looks like the correct/expected date format is not being passed as it calls for

$date2_set = mktime(0,0,0, $m2, $d2, $y2); 

$m2 = 2digits
$d2 = 2digits
$y2 = 2digits

21 Dec 2010, 3:55 AM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: PHP Warning: mktime() expects parameter 6 to be long

  1. Is there a reason why you're using the older IPN module when Express Checkout is more reliable and offers the same features at the same cost?

  2. Does that problem only occur if the customer triggers a pending-address condition? or does it happen on all orders?

21 Dec 2010, 8:13 AM
#4
milkyway avatar

milkyway

Inactive

Join Date:
Aug 2006
Location:
Singapore
Posts:
167
Plugin Contributions:
1

Re: PHP Warning: mktime() expects parameter 6 to be long

DrByte:

  1. Is there a reason why you're using the older IPN module when Express Checkout is more reliable and offers the same features at the same cost?

  2. Does that problem only occur if the customer triggers a pending-address condition? or does it happen on all orders?

Kobra/DrByte .. Thank you for your reply...

  1. PayPal IPN works before the upgrade so me and client curious of this issue, he seems wants to stay with it, though we can think about moving to PayPal Express if this the best way to resolve the issue.

  2. This site is selling flowers, so the shipping address is always different than billing address, because customer send it as gift.

We only have two success orders posted to admin, and it was test orders made by my client, and I just realized he used his own address for shipping, means the same billing and shipping, so what was failed were the orders from normal customer who put different shipping address than their billing address.

I think we see some clue here... do you know what it is?

Thanks!

21 Dec 2010, 10:49 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: PHP Warning: mktime() expects parameter 6 to be long

Sounds like more testing is required on your end to determine what exactly is causing the problem. Can't fix the problem if we don't know exactly what's causing it.

If I start from a brand new clean fresh shop with no customizations, how exactly can I reproduce this same problem, consistently?

21 Dec 2010, 11:13 AM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: PHP Warning: mktime() expects parameter 6 to be long

PayPal IPN works before the upgrade
Try from the admin

Record the Module settings
Uninstall it
Reinstall it

Run a test to see if that fixes it

23 Dec 2010, 9:39 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: PHP Warning: mktime() expects parameter 6 to be long

kobra, he already said he did that, in his first post.
I don't think that's the issue.

It seems more likely that it's something amuck with addresses etc.

Problem probably completely disappears if switching to Express Checkout instead :blush:

29 Dec 2010, 2:19 PM
#8
milkyway avatar

milkyway

Inactive

Join Date:
Aug 2006
Location:
Singapore
Posts:
167
Plugin Contributions:
1

Re: PHP Warning: mktime() expects parameter 6 to be long

DrByte,

My client has concern that if he switch to PayPal Express he will not be able to receive credit card payment (only PayPal user can purchase), while with PayPal IPN non Paypal customer can pay him using credit card.

I have reinstalled Paypal, even double check all the files again with Winmerge, nothing is suspicious, and I don't know what to do know, any idea how I can resolve this problem?

Does PayPal IPN has issue with v1.3.9? Because before upgrade we dont have this issue.

Many thanks!