robertbell Posted May 25 Share Posted May 25 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? Quote Link to comment Share on other sites More sharing options...
bsmither Posted May 26 Share Posted May 26 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. Quote Link to comment Share on other sites More sharing options...
robertbell Posted May 26 Author Share Posted May 26 Thanks. I'll let you know how it goes. Yep. Works for me. Thanks, as always. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted June 6 Share Posted June 6 Thanks. Updated in 1.0.12. Quote Link to comment Share on other sites More sharing options...
robertbell Posted June 6 Author Share Posted June 6 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 Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted June 6 Share Posted June 6 The error was because PHP 8.0 doesn't have ZipArchive support. Your PHP 8.1 clearly does. Inconsistent PHP configurations. Pleased it's now working for you. Quote Link to comment Share on other sites More sharing options...
robertbell Posted June 8 Author Share Posted June 8 Is the list of required PHP extensions and configuration options documented anywhere? Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 8 Share Posted June 8 (edited) 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 June 8 by bsmither 1 Quote Link to comment Share on other sites More sharing options...
robertbell Posted June 8 Author Share Posted June 8 (edited) 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 June 8 by robertbell Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 8 Share Posted June 8 (edited) 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 June 8 by bsmither Quote Link to comment Share on other sites More sharing options...
robertbell Posted June 8 Author Share Posted June 8 (edited) From cPanel, available extensions with PHP 8.1: Â and with 8.2: Â Â Edited June 8 by robertbell Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 8 Share Posted June 8 Interesting, to be sure. But I have no knowledgeable answer as regards cPanel. Â Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted June 8 Share Posted June 8 I'll check on my cPanel server in the morning... Stick to PHP 8.1 for now. It does seem odd to be missing MySQLi Quote Link to comment Share on other sites More sharing options...
robertbell Posted June 8 Author Share Posted June 8 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. Quote Link to comment Share on other sites More sharing options...
bsmither Posted June 8 Share Posted June 8 According to  https://php.watch/versions/8.2/mysqli-libmysql-no-longer-supported Last section... Two other named extensions enabled, when combined, equates to 'mysqli'. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted June 8 Share Posted June 8 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. Quote Link to comment Share on other sites More sharing options...
robertbell Posted June 12 Author Share Posted June 12 On 6/8/2023 at 3:36 PM, Al Brookbanks said: I'll check on my cPanel server in the morning... Stick to PHP 8.1 for now. It does seem odd to be missing MySQLi Al, Did you have a chance to check your cPanel? Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted June 13 Share Posted June 13 I haven't tried on cPanel but my development environment is working under PHP 8.1 with mo issues. Quote Link to comment Share on other sites More sharing options...
robertbell Posted June 13 Author Share Posted June 13 5 hours ago, Al Brookbanks said: I haven't tried on cPanel but my development environment is working under PHP 8.1 with mo issues. Which PHP extensions are enabled? Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted June 13 Share Posted June 13 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' Â Quote Link to comment Share on other sites More sharing options...
robertbell Posted June 13 Author Share Posted June 13 I bit the bullet and switched to PHP 8.2.5, with mysqlnd and nd_mysqli enabled. Seems to be working, so far. Â Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted June 13 Share Posted June 13 Great!! It should be ok but there is a change an extension will be unhappy. Quote Link to comment Share on other sites More sharing options...
robertbell Posted June 13 Author Share Posted June 13 I'm only running All in One Shipping v 1.0.24, Card Capture v 1.0.12, and Google Base v 1.0.3. So far, so good, but I'll keep an eye on them. 1 Quote Link to comment Share on other sites More sharing options...
robertbell Posted July 17 Author Share Posted July 17 CubeCart 6.5.1 is still all good (so far) on PHP 8.2.7, with AIOS 1.0.26, Card Capture 1.0.12, and Google Base 1.0.3. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted July 17 Share Posted July 17 Great!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.