RoninS14 Posted February 21, 2008 Posted February 21, 2008 I recently moved hosting company. going from php4 and mysql 3 to php5/mysql5 Applied the rc1 update. now when I check out I see this error: Warning: str_repeat() [function.str-repeat]: Second argument has to be greater than or equal to 0 in /usr/www/users/tahiti/includes/modules/payment/authorizenet_aim.php on line 175
RoninS14 Posted February 21, 2008 Author Posted February 21, 2008 or when I use cc.php as payment module. I get this: Warning: str_repeat() [function.str-repeat]: Second argument has to be greater than or equal to 0 in /usr/www/users/tahiti/includes/modules/payment/cc.php on line 137
germ Posted February 21, 2008 Posted February 21, 2008 /includes/modules/payment/cc.php line 137 'field' => substr($this->cc_card_number, 0, 4) . str_repeat('X', (strlen($this->cc_card_number) - 8)) . substr($this->cc_card_number, -4)), /includes/modules/payment/authorizenet_aim.php line 175 'field' => substr($this->cc_card_number, 0, 4) . str_repeat('X', (strlen($this->cc_card_number) - 8)) . substr($this->cc_card_number, -4)), The "second argument" (common to both) is: (strlen($this->cc_card_number) - 8) That will fail if the length of the cc card number is less than 8 digits/characters. Are you "testing"? :unsure: If so, be sure the cc number you enter has a minimum of 8 digits/characters. ;) If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
RoninS14 Posted February 21, 2008 Author Posted February 21, 2008 thats the problem. The credit card number is a valid legit one and has 16 digits. However, when I use the cc.php the order goes into the database w/out a problem and the cc # gets stored in my database. And when I use authorize.net from vger, I get the whole (TESTMODE) error thing which tells me that the credit card number can't be processed and to try again or contact for assistance.
germ Posted February 21, 2008 Posted February 21, 2008 If there is a support thread for the authorize.net module you are using, make a post in it. I have no experience with that module. I can explain the error, but not the cause... :blush: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
RoninS14 Posted February 21, 2008 Author Posted February 21, 2008 Also, I made a mistake in my first post. i'm using 2.2MS2-051113 and 2.2MS2-060817 patches and not rc1. should I update to rc1 since i'm now on php5/mysql5
germ Posted February 21, 2008 Posted February 21, 2008 I can't answer that either... :blush: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there >
RoninS14 Posted February 21, 2008 Author Posted February 21, 2008 I did, however I don't think it is at all related to authorize.net now. The error message appeared after I made the switch in hosting company. Would you happen to know off the top of your head if there is a thread pertaining to transferring your site from one host using older php/mysql versions to another host using php5/mysql5? I'm about to start my search and will check back here to see if any one has any idea on this. I have a feeling that my problems are related to compatibility issues between the older versions and the newer ones. thank you for the help you've provided me with so far. I really appreciate it.
♥Vger Posted February 21, 2008 Posted February 21, 2008 If your host upgraded you to PHP and MySQL 5 then it's a fairly sound bet that they also set Register Globals ot 'off' in php.ini - and this will cause problems especially if you have contributions installed. Authorize Net testing facilities are total c**p, and you may not get the module to work until your account is in Live mode. You can try changing the 'test' mode address to 'certification' but if that does not work then try replacing the test address with the full 'live' address in the module - while keeping the account in Test Mode at the A Net end of things. Vger
RoninS14 Posted February 21, 2008 Author Posted February 21, 2008 I decided to go ahead and attempt a RC2 update on my site. Would I need to do a RC1 update first?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.