I today upgraded WordPress on a FreeBSD 11.3-RELEASE-p12 jail (FAMP) successfully to 5.5. PHP version was 7.2.32.
Somewhere in the tools section there where an audit section to audit the security and it gave me the hint to upgrade to php74.
I then compiled the php74 port on the FreeBSD jail with MySQL Native Driver (nd_mysql or mysqlnd).
But I still receive this error:
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /www/wp/soliform/wp-includes/wp-db.php:1670
Complete error:
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /www/wp/soliform/wp-includes/wp-db.php:1670 Stack trace: #0 /www/wp/soliform/wp-includes/wp-db.php(632): wpdb->db_connect() #1 /www/wp/soliform/wp-includes/load.php(476): wpdb->__construct('xxxxsoliform', 'xxxxxx', 'wp_soliform', '127.0.0.1') #2 /www/wp/soliform/wp-settings.php(124): require_wp_db() #3 /www/wp/soliform/wp-config.php(123): require_once('/www/wp/solifor...') #4 /www/wp/soliform/wp-load.php(37): require_once('/www/wp/solifor...') #5 /www/wp/soliform/wp-blog-header.php(13): require_once('/www/wp/solifor...') #6 /www/wp/soliform/index.php(17): require('/www/wp/solifor...') #7 {main} thrown in /www/wp/soliform/wp-includes/wp-db.php on line 1670
root@FAMP:~ # php -r "print phpinfo();" | egrep -i ".ini|mysql"
Configure Command => './configure' '--with-layout=GNU' '--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' '--with-libxml' '--with-password-argon2=/usr/local' '--program-prefix=' '--enable-mysqlnd' '--enable-fpm' '--with-fpm-user=www' '--with-fpm-group=www' '--enable-embed' '--enable-dtrace' '--prefix=/usr/local' '--localstatedir=/var' '--mandir=/usr/local/man' '--infodir=/usr/local/share/info/' '--build=amd64-portbld-freebsd11.3' 'build_alias=amd64-portbld-freebsd11.3' 'PKG_CONFIG=pkgconf' 'CFLAGS=-O2 -pipe -fstack-protector-strong -fno-strict-aliasing ' 'CPP=cpp' 'CXXFLAGS=-O2 -pipe -fstack-protector-strong -fno-strict-aliasing '
Configuration File (php.ini) Path => /usr/local/etc
Loaded Configuration File => /usr/local/etc/php.ini
Scan this dir for additional .ini files => /usr/local/etc/php
Additional .ini files parsed => /usr/local/etc/php/ext-10-opcache.ini,
/usr/local/etc/php/ext-18-session.ini,
/usr/local/etc/php/ext-20-bz2.ini,
/usr/local/etc/php/ext-20-ctype.ini,
/usr/local/etc/php/ext-20-dom.ini,
/usr/local/etc/php/ext-20-exif.ini,
/usr/local/etc/php/ext-20-fileinfo.ini,
/usr/local/etc/php/ext-20-filter.ini,
/usr/local/etc/php/ext-20-gd.ini,
/usr/local/etc/php/ext-20-iconv.ini,
/usr/local/etc/php/ext-20-json.ini,
/usr/local/etc/php/ext-20-mbstring.ini,
/usr/local/etc/php/ext-20-mysqli.ini,
/usr/local/etc/php/ext-20-openssl.ini,
/usr/local/etc/php/ext-20-pdo.ini,
/usr/local/etc/php/ext-20-phar.ini,
/usr/local/etc/php/ext-20-posix.ini,
/usr/local/etc/php/ext-20-simplexml.ini,
/usr/local/etc/php/ext-20-sqlite3.ini,
/usr/local/etc/php/ext-20-tidy.ini,
/usr/local/etc/php/ext-20-tokenizer.ini,
/usr/local/etc/php/ext-20-xml.ini,
/usr/local/etc/php/ext-20-xmlreader.ini,
/usr/local/etc/php/ext-20-xmlwriter.ini,
/usr/local/etc/php/ext-20-zip.ini,
/usr/local/etc/php/ext-20-zlib.ini,
/usr/local/etc/php/ext-30-pdo_mysql.ini,
/usr/local/etc/php/ext-30-pdo_sqlite.ini
user_ini.cache_ttl => 300 => 300
user_ini.filename => .user.ini => .user.ini
mysqli
MysqlI Support => enabled
Client API library version => mysqlnd 7.4.9
mysqli.allow_local_infile => Off => Off
mysqli.allow_persistent => On => On
mysqli.default_host => no value => no value
mysqli.default_port => 3306 => 3306
mysqli.default_pw => no value => no value
mysqli.default_socket => no value => no value
mysqli.default_user => no value => no value
mysqli.max_links => Unlimited => Unlimited
mysqli.max_persistent => Unlimited => Unlimited
mysqli.reconnect => Off => Off
mysqli.rollback_on_cached_plink => Off => Off
mysqlnd
mysqlnd => enabled
Version => mysqlnd 7.4.9
Loaded plugins => mysqlnd,debug_trace,auth_plugin_mysql_native_password,auth_plugin_mysql_clear_password
API Extensions => mysqli,pdo_mysql
PDO drivers => mysql, sqlite
pdo_mysql
PDO Driver for MySQL => enabled
Client API version => mysqlnd 7.4.9
pdo_mysql.default_socket => no value => no value
Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException
I’m failrly new to WordPress and also to FreeBSD.
I found this thread in the FreeBSD forums and also posted the php74 and MySQL Native Driver Aspects there.
https://forums.freebsd.org/threads/php-startup-unable-to-load-dynamic-library.54454/#post-476069
This seems related, but I can’t dig it’s solution.
https://www.ads-software.com/support/topic/fatal-error-after-upgrading-to-php-7-3/
Related too.
Datbase error: Call to undefined function mysql_connect
https://www.ads-software.com/support/topic/datbase-error-call-to-undefined-function-mysql_connect/
The php.ini and phpinfo(); output are looking fine to me.
I added define(‘WP_USE_EXT_MYSQL’, false); to config.php with no success, neither true nor false.
root@FAMP:~ # egrep -v '^;|^ *$' /usr/local/etc/php.ini
[PHP]
engine = On
short_open_tag = Off
precision = 14
output_buffering = 4096
zlib.output_compression = Off
implicit_flush = Off
unserialize_callback_func =
serialize_precision = -1
disable_functions =
disable_classes =
zend.enable_gc = On
expose_php = On
max_execution_time = 30
max_input_time = 60
memory_limit = 128M
error_reporting = E_ALL
display_errors = On
display_startup_errors = On
log_errors = On
log_errors_max_len = 1024
ignore_repeated_errors = Off
ignore_repeated_source = Off
report_memleaks = On
html_errors = On
variables_order = "GPCS"
request_order = "GP"
register_argc_argv = Off
auto_globals_jit = On
post_max_size = 8M
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
default_charset = "UTF-8"
doc_root =
user_dir =
enable_dl = Off
file_uploads = On
upload_max_filesize = 2M
max_file_uploads = 20
allow_url_fopen = On
allow_url_include = Off
default_socket_timeout = 60
extension=mysqli
extension=pdo_mysql
[CLI Server]
cli_server.color = On
[Date]
date.timezone = Europe/Berlin
[filter]
[iconv]
[intl]
[sqlite3]
[Pcre]
[Pdo]
[Pdo_mysql]
pdo_mysql.cache_size = 2000
pdo_mysql.default_socket=
[Phar]
[mail function]
SMTP = localhost
smtp_port = 25
mail.add_x_header = Off
[ODBC]
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1
[Interbase]
ibase.allow_persistent = 1
ibase.max_persistent = -1
ibase.max_links = -1
ibase.timestampformat = "%Y-%m-%d %H:%M:%S"
ibase.dateformat = "%Y-%m-%d"
ibase.timeformat = "%H:%M:%S"
[MySQLi]
mysqli.max_persistent = -1
mysqli.allow_persistent = On
mysqli.max_links = -1
mysqli.cache_size = 2000
mysqli.default_port = 3306
mysqli.default_socket =
mysqli.default_host =
mysqli.default_user =
mysqli.default_pw =
mysqli.reconnect = Off
[mysqlnd]
mysqlnd.collect_statistics = On
mysqlnd.collect_memory_statistics = On
[OCI8]
[PostgreSQL]
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1
pgsql.ignore_notice = 0
pgsql.log_notice = 0
[bcmath]
bcmath.scale = 0
[browscap]
[Session]
session.save_handler = files
session.use_strict_mode = 0
session.use_cookies = 1
session.use_only_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.cookie_httponly =
session.serialize_handler = php
session.gc_probability = 1
session.gc_divisor = 1000
session.gc_maxlifetime = 1440
session.referer_check =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 0
session.sid_length = 26
session.trans_sid_tags = "a=href,area=href,frame=src,form="
session.sid_bits_per_character = 5
[Assertion]
zend.assertions = 1
[COM]
[mbstring]
[gd]
[exif]
[Tidy]
tidy.clean_output = Off
[soap]
soap.wsdl_cache_enabled=1
soap.wsdl_cache_dir="/tmp"
soap.wsdl_cache_ttl=86400
soap.wsdl_cache_limit = 5
[sysvshm]
[ldap]
ldap.max_links = -1
[dba]
[opcache]
[curl]
[openssl]
]]>in version PHP7.2, PHP lib mcrypt was deprecated so WPCassify show errors after save his options.
Could you replace the use of mcrypt?
Thanks.
Regards.
]]>203 | WARNING | Function create_function() is deprecated since PHP 7.2; Use an anonymous function instead
]]>it results in 502 Server error:
PHP message: PHP Warning: strpos(): Empty needle in /var/www/vhosts/MYSITE/httpdocs/wp-content/plugins/footnotes-made-easy/footnotes-made-easy.php on line 252
2019/04/14 14:01:12 [error] 11931#0: *72 FastCGI sent in stderr: “rpos(): Empty needle in /var/www/vhosts/MYSITE/httpdocs/wp-content/plugins/footnotes-made-easy/footnotes-made-easy.php on line 252
there seem to be a few PHP7-Compatibility-Problems in this plugin. Any hints for this?
FILE: …/wp-content/plugins/stopbadbots/stopbadbots.php
——————————————————————————————————————————————————-
FOUND 1 ERROR AFFECTING 1 LINE
——————————————————————————————————————————————————-
153 | ERROR | The behaviour of hexadecimal numeric strings was inconsistent prior to PHP 7 and support has been removed in PHP 7. Found: ‘0x3c62723e’
——————————————————————————————————————————————————-
FILE: …/wp-content/plugins/stopbadbots/includes/list-tables/page.php
—————————————————————————————————————————————
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
—————————————————————————————————————————————
1 | WARNING | File has mixed line endings; this may cause incorrect results
—————————————————————————————————————————————
FILE: …/wp-content/plugins/stopbadbots/includes/list-tables/class-sbb-list-table.php
——————————————————————————————————————————————————-
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
——————————————————————————————————————————————————-
1 | WARNING | File has mixed line endings; this may cause incorrect results
Supsystic plugins work fine with every version of PHP all the way up to 7.3
“PHP Compatibility Checker Report says plugin is not compatible”
We are aware that the PHP checker can provide information that is valuable but not necessarily defining as to compatibility.
If you performed a scan using “PHP Compatibility Checker” or any another checker and got warnings, these are just warnings, nothing to worry about here.
Because our plugins have checks built-in that prevent the functions are called wrongly. They will only be called if they are available. The plugin you use to test with does not take into account code made for backwards compatibility.
By the way, if you have a plugin that is up to date but still flagged as incompatible, it might also be a false positive.
Which version is recommended to use?
To the best of our knowledge, all our plugins are compatible with the latest stable releases of PHP and generally, we recommend at least using PHP 7.0.x as secure and stable to use.
This WordPress Statistic the charts showing what sorts of systems people are running WordPress on. As you can see, 45.4 % of developers use 7.0 and up PHP versions. Thus, nearly half of 214.000+ customers use PHP 7.0.x. and Supsystic plugins. Surely, they would have noticed if they had compatibility issues.
So, if you are about to migrate to a current version of PHP, maybe to PHP 7.2, maybe from PHP 5.6, PHP 7.0, you can do it with confidence and be sure our plugins fully compatible.
]]>Supsystic plugins work fine with every version of PHP all the way up to 7.3
“PHP Compatibility Checker Report says plugin is not compatible”
We are aware that the PHP checker can provide information that is valuable but not necessarily defining as to compatibility.
If you performed a scan using “PHP Compatibility Checker” or any another checker and got warnings, these are just warnings, nothing to worry about here.
Because our?plugins?have checks built-in that prevent the functions are called wrongly. They will only be called if they are available. The plugin you use to test with does not take into account code made for backwards compatibility.
By the way, if you have a plugin that is up to date but still flagged as incompatible, it might also be a false positive.
Which version is recommended to use?
To the best of our knowledge, all our plugins are compatible with the latest stable releases of PHP and generally, we recommend at least using PHP 7.0.x as secure and stable to use.
This?WordPress Statistic?the charts showing what sorts of systems people are running WordPress on. As you can see, 45.4 % of developers use 7.0 and up PHP versions. Thus, nearly half?of 214.000+ customers use PHP 7.0.x. and Supsystic plugins. Surely, they would have noticed if they had compatibility issues.
So, if you are about to migrate to a current version of PHP, maybe to PHP 7.2, maybe from PHP 5.6, PHP 7.0, you can do it with confidence and be sure our plugins fully compatible.
]]>This plugin is not compatible to php 7.2.
FILE: /nas/content/live/protrain/wp-content/plugins/pricing-table-by-supsystic/classes/helpers/recaptchalib.php
—————————————————————————————FOUND 4 ERRORS AFFECTING 3 LINES
—————————————————————
239 | ERROR | The constant “MCRYPT_MODE_CBC” is deprecated since PHP 7.1 and removed since PHP 7.2
240 | ERROR | The constant “MCRYPT_RIJNDAEL_128” is deprecated since PHP 7.1 and removed since PHP 7.2
242 | ERROR | Function mcrypt_encrypt() is deprecated since PHP 7.1 and removed since PHP 7.2; Use OpenSSL instead
242 | ERROR | Extension ‘mcrypt’ is deprecated since PHP 7.1 and removed since PHP 7.2; Use openssl (preferred) or pecl/mcrypt once available instead
—————————————————————————————
These are certain methods which are deprecated from 7.1 and removed in 7.2.
Are you going to provide support for this before 14th, if not, can you please help up to make this work else we will need to change plugin.
Thank you in advance
]]>Deprecated: Function create_function() is deprecated in /Users/myusername/Sites/bbbbb.test/web/wp-content/plugins/wp-category-permalink/wpcp_post.php on line 160
… which is this line of code:
$taxa = array_filter( $taxa, create_function( '$a', 'return !!$a->rewrite;' ) );
I did a bit of Googling, and came up with this as a potential fix from a StackOverflow article:
$taxa = array_filter( $taxa, function( $a ) { return !!$a->rewrite; } );
(See https://stackoverflow.com/questions/48161526/php-7-2-function-create-function-is-deprecated)
However, I’m not an expert PHP programmer, and am not sure this bit of interpreted code is really doing what you are looking to do.
Can you update this plugin for PHP 7.2?
Thanks!
]]>