Jump to content

gateway error


Recommended Posts

I'm using credit card capture (I know) and after upgrading to CubeCart 6.5.1 (from 6.4.10) and PHP 8.1 I get the following error when placing a test order:

[<strong>Exception</strong>] /home/sojourn1/public_html/modules/gateway/Card_Capture/gateway.class.php:138 - implode(): Argument #2 ($array) must be of type ?array, bool given
https://www.sojourner.biz/index.php?_a=gateway

Am I missing a PHP extension?

Link to comment
Share on other sites

Please try this:

In the Card_Capture module, gateway.class.php, at line 138, find THIS PART:

= implode(' ',unserialize($item['product_options']));

Change THIS PART to:

= implode(' ',unserialize($item['product_options']) ?: array());

PHP 8.1 is much more picky about what is required vs. what is given. If $item['product_options'] cannot be unserialized, a false is returned, which cannot be used with implode(). The added code will determine if unserialize() returns false, and if so, will give an empty array to implode().

I have not tested this.

Link to comment
Share on other sites

  • 2 weeks later...

The automatic install on this version does not work for me, either from the extension updates tab or by using the token from the extension marketplace. Either one just takes me to a blank page and puts the following in the error log:

[<strong>Exception</strong>] /home/sojourn1/public_html/admin_RANDOM/sources/plugins.index.inc.php:57 - Class "ZipArchive" not found
https://www.sojourner.biz/admin_RANDOM.php?_g=plugins&install[type]=plugins&install[id]=29&install[seller_id]=1

 

Never mind. It worked when I switched PHP from 8.0.x to 8.1.18

Link to comment
Share on other sites

During the running of 'setup', CubeCart makes some tests: certain folders must exist and be writable, and key PHP extensions must be initialized.

For CubeCart 6.5+, PHP 7.4+ (8.2 recommended but will probably be required for CC652+), the extensions include: MySQLi, GD Image library, Simple XML parser, cURL, ZipArchive, and the MultiByte String library.

The test during setup is reported as a list of Pass/Fail line items on the second page shown. Setup will not proceed to the third page if any item shows as failed.

CubeCart continuously checks to make sure the version of PHP is compatible, so should PHP change versions (7.4 downgrade to 7.3, for example), CubeCart will make complaints.

However, CubeCart does not do continuous compliance checks for the presence of required extensions.

Edited by bsmither
  • Like 1
Link to comment
Share on other sites

10 minutes ago, bsmither said:

For CubeCart 6.5+, PHP 7.4+ (8.2 recommended but will probably be required for CC652+), the extensions include: MySQLi, GD Image library, Simple XML parser, cURL, ZipArchive, and the MultiByte String library.

I thought that PHP 8.2 no longer supported mysqli -- at least it's not available in cPanel.

Edited by robertbell
Link to comment
Share on other sites

PHP 7+ no longer supports the MySQL extension (without the 'i'). The cPanel situation may just call any appropriate extension as being for communication with a MySQL database server. (I have no knowledge of cPanel.)

Edited by bsmither
Link to comment
Share on other sites

1 hour ago, robertbell said:

FWIW, cPanel no longer lists ioncube_loader for 8.2. Those using it may want to take note.

Thanks, Al. The version of cPanel on my server is 110.0.7.

This is quite normal. No doubt it will be added and available further down the line. It wasn't for 8.1 for a while either.

Link to comment
Share on other sites

This is the configure command:

'./configure' 
'--prefix=/opt/homebrew/Cellar/php/8.2.5' 
'--localstatedir=/opt/homebrew/var' 
'--sysconfdir=/opt/homebrew/etc/php/8.2' 
'--with-config-file-path=/opt/homebrew/etc/php/8.2' 
'--with-config-file-scan-dir=/opt/homebrew/etc/php/8.2/conf.d' 
'--with-pear=/opt/homebrew/Cellar/php/8.2.5/share/php/pear' 
'--enable-bcmath' 
'--enable-calendar' 
'--enable-dba' 
'--enable-exif' 
'--enable-ftp' 
'--enable-fpm' 
'--enable-gd' 
'--enable-intl' 
'--enable-mbregex' 
'--enable-mbstring' 
'--enable-mysqlnd' 
'--enable-pcntl' 
'--enable-phpdbg' 
'--enable-phpdbg-readline' 
'--enable-shmop' 
'--enable-soap' 
'--enable-sockets' 
'--enable-sysvmsg' 
'--enable-sysvsem' 
'--enable-sysvshm' 
'--with-apxs2=/opt/homebrew/opt/httpd/bin/apxs' 
'--with-bz2=/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr' 
'--with-curl' 
'--with-external-gd' 
'--with-external-pcre' 
'--with-ffi' 
'--with-fpm-user=_www' 
'--with-fpm-group=_www' 
'--with-gettext=/opt/homebrew/opt/gettext' 
'--with-gmp=/opt/homebrew/opt/gmp' 
'--with-iconv=/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr' 
'--with-kerberos' 
'--with-layout=GNU' 
'--with-ldap=/opt/homebrew/opt/openldap' 
'--with-libxml' 
'--with-libedit' 
'--with-mhash=/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr' 
'--with-mysql-sock=/tmp/mysql.sock' 
'--with-mysqli=mysqlnd' 
'--with-ndbm=/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr' 
'--with-openssl' 
'--with-password-argon2=/opt/homebrew/opt/argon2' 
'--with-pdo-dblib=/opt/homebrew/opt/freetds' 
'--with-pdo-mysql=mysqlnd' 
'--with-pdo-odbc=unixODBC,/opt/homebrew/opt/unixodbc' 
'--with-pdo-pgsql=/opt/homebrew/opt/libpq' 
'--with-pdo-sqlite' 
'--with-pgsql=/opt/homebrew/opt/libpq' 
'--with-pic' 
'--with-pspell=/opt/homebrew/opt/aspell' 
'--with-sodium' 
'--with-sqlite3' 
'--with-tidy=/opt/homebrew/opt/tidy-html5' 
'--with-unixODBC' 
'--with-xsl' 
'--with-zip' 
'--with-zlib' 
'--enable-dtrace' 
'--with-ldap-sasl' 
'--with-os-sdkpath=/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk' 'PKG_CONFIG_PATH=/opt/homebrew/opt/apr/lib/pkgconfig:/opt/homebrew/opt/[email protected]/lib/pkgconfig:/opt/homebrew/opt/apr-util/lib/pkgconfig:/opt/homebrew/opt/argon2/lib/pkgconfig:/opt/homebrew/opt/brotli/lib/pkgconfig:/opt/homebrew/opt/libidn2/lib/pkgconfig:/opt/homebrew/opt/libnghttp2/lib/pkgconfig:/opt/homebrew/opt/libssh2/lib/pkgconfig:/opt/homebrew/opt/openldap/lib/pkgconfig:/opt/homebrew/opt/rtmpdump/lib/pkgconfig:/opt/homebrew/opt/lz4/lib/pkgconfig:/opt/homebrew/opt/xz/lib/pkgconfig:/opt/homebrew/opt/zstd/lib/pkgconfig:/opt/homebrew/opt/curl/lib/pkgconfig:/opt/homebrew/opt/unixodbc/lib/pkgconfig:/opt/homebrew/opt/libpng/lib/pkgconfig:/opt/homebrew/opt/freetype/lib/pkgconfig:/opt/homebrew/opt/fontconfig/lib/pkgconfig:/opt/homebrew/opt/jpeg-turbo/lib/pkgconfig:/opt/homebrew/opt/highway/lib/pkgconfig:/opt/homebrew/opt/imath/lib/pkgconfig:/opt/homebrew/opt/libtiff/lib/pkgconfig:/opt/homebrew/opt/little-cms2/lib/pkgconfig:/opt/homebrew/opt/openexr/lib/pkgconfig:/opt/homebrew/opt/webp/lib/pkgconfig:/opt/homebrew/opt/jpeg-xl/lib/pkgconfig:/opt/homebrew/opt/libvmaf/lib/pkgconfig:/opt/homebrew/opt/aom/lib/pkgconfig:/opt/homebrew/opt/libavif/lib/pkgconfig:/opt/homebrew/opt/gd/lib/pkgconfig:/opt/homebrew/opt/gmp/lib/pkgconfig:/opt/homebrew/opt/icu4c/lib/pkgconfig:/opt/homebrew/opt/krb5/lib/pkgconfig:/opt/homebrew/opt/libpq/lib/pkgconfig:/opt/homebrew/opt/libsodium/lib/pkgconfig:/opt/homebrew/opt/libzip/lib/pkgconfig:/opt/homebrew/opt/oniguruma/lib/pkgconfig:/opt/homebrew/opt/pcre2/lib/pkgconfig:/opt/homebrew/opt/readline/lib/pkgconfig:/opt/homebrew/opt/sqlite/lib/pkgconfig:/opt/homebrew/opt/tidy-html5/lib/pkgconfig' 'PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig:/opt/homebrew/Library/Homebrew/os/mac/pkgconfig/13' 'KERBEROS_CFLAGS= ' 'SASL_CFLAGS=-I/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sasl' 'SASL_LIBS=-lsasl2'

Notice:

'--with-mysql-sock=/tmp/mysql.sock' 
'--with-mysqli=mysqlnd' 

 

Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...