CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • CiviContribute Database Error
Pages: [1]

Author Topic: CiviContribute Database Error  (Read 2605 times)

Gallagher

  • Guest
CiviContribute Database Error
March 12, 2008, 11:38:43 pm
Hi,

I've created a CiviContribute page that doesn't collect any payment, its only purpose is to give users a certain membership.

I'm using godaddy hosting and don't have a payment processor set up.

Here's the error message (this comes across in 3 different colors):

Code: [Select]
warning: mktime() expects parameter 6 to be long, string given in /home/content/s/c/n/scnoalum/html/sites/all/modules/civicrm/CRM/Member/BAO/MembershipType.php on line 454.

unrecoverable error
    Sorry. A non-recoverable error has occurred.

    Database Error Code: Duplicate entry '5-1' for key 2, 1062

    Return to home page.

Error Details:

Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -5
    [message] => DB Error: already exists
    [mode] => 16
    [debug_info] => INSERT INTO civicrm_membership_payment (membership_id , contribution_id ) VALUES ( 1 ,  5 )  [nativecode=1062 ** Duplicate entry '5-1' for key 2]
    [type] => DB_Error
    [user_info] => INSERT INTO civicrm_membership_payment (membership_id , contribution_id ) VALUES ( 1 ,  5 )  [nativecode=1062 ** Duplicate entry '5-1' for key 2]
    [to_string] => [db_error: message="DB Error: already exists" code=-5 mode=callback callback=CRM_Core_Error::handle prefix="" info="INSERT INTO civicrm_membership_payment (membership_id , contribution_id ) VALUES ( 1 ,  5 )  [nativecode=1062 ** Duplicate entry '5-1' for key 2]"]
)

Thanks in advance,
Mike[/code]

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviContribute Database Error
March 12, 2008, 11:49:55 pm
Mike:

Please try to replicate this on http://drupal.demo.civicrm.org, if replicated file an issue in jira.

thanx,

kurund
Found this reply helpful? Support CiviCRM

Gallagher

  • Guest
Re: CiviContribute Database Error
March 13, 2008, 12:58:13 am
Thanks for the suggestion, although I couldn't replicate the error.

I have fixed one of the problems, though. The outgoing SMTP server for shared godaddy hosting is as follows:
smtp server: relay-hosting.secureserver.net
port: 25
no authorization, email address, or password

I could not get google apps or gmail settings to work with godaddy shared hosting... something about cURL and proxies. I feel like this may be a common problem for people using godaddy. Is there anywhere I can put this information to be sure it is found before someone loses hair over this like me?

I still have one problem, though.
Code: [Select]
warning: mktime() expects parameter 6 to be long, string given in /home/content/s/c/n/scnoalum/html/sites/all/modules/civicrm/CRM/Member/BAO/MembershipType.php on line 454.

Any help would be appreciated. I'm so close! This remaining error did not appear when I replicated on the demo server.

tentmakers

  • Guest
Re: CiviContribute Database Error
March 17, 2008, 09:31:50 am
Just upgraded from CiviCRM 2.0 b5 (php 5.0) to 2.0.1 and php 5.2.5 and started getting this same error message after confirming a donation in civicontribute:

warning: mktime() expects parameter 6 to be long, string given in /home/teachwi1/public_html/sites/all/modules/civicrm/CRM/Member/BAO/MembershipType.php on line 454.

I didn't get this error message with beta 5/php 5.0.

Any ideas?

Thanks.

Paul

Manish Zope

  • I’m new here
  • *
  • Posts: 18
  • Karma: 4
Re: CiviContribute Database Error
March 18, 2008, 11:40:52 pm
Hosting providers listing : http://wiki.civicrm.org/confluence/x/dCU

Quote from: Gallagher on March 13, 2008, 12:58:13 am
I have fixed one of the problems, though. The outgoing SMTP server for shared godaddy hosting is as follows:
smtp server: relay-hosting.secureserver.net
port: 25
no authorization, email address, or password

I could not get google apps or gmail settings to work with godaddy shared hosting... something about cURL and proxies. I feel like this may be a common problem for people using godaddy. Is there anywhere I can put this information to be sure it is found before someone loses hair over this like me?

ymmatt

  • I’m new here
  • *
  • Posts: 29
  • Karma: 0
Re: CiviContribute Database Error
March 25, 2008, 01:13:11 pm

I'm getting the same error on the same setup:

Code: [Select]
warning: mktime() expects parameter 6 to be long, string given in /sites/all/modules/civicrm/CRM/Member/BAO/MembershipType.php on line 454.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviContribute Database Error
March 25, 2008, 02:46:26 pm
Quote from: tentmakers on March 17, 2008, 09:31:50 am
warning: mktime() expects parameter 6 to be long, string given in /home/teachwi1/public_html/sites/all/modules/civicrm/CRM/Member/BAO/MembershipType.php on line 454.

can u add the following debug line to

/home/teachwi1/public_html/sites/all/modules/civicrm/CRM/Member/BAO/MembershipType.php, line 453

Code: [Select]
CRM_Core_Error::debug( 'd', $date );
exit( );

and let me know the output

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: CiviContribute Database Error
March 25, 2008, 02:51:30 pm

There is an issue filed for this in 2.0 now: http://issues.civicrm.org/jira/browse/CRM-2900

we'd like to resolve this before 2.0.2, so a quick response would be great. I dont think we've seen this error message in our testing.

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviContribute (Moderator: Donald Lobo) »
  • CiviContribute Database Error

This forum was archived on 2017-11-26.