I have just installed Wordpress using
It also says Learn more about debugging in WordPress.
So, I follow instructions and get the following in /tmp/wp-errors.log:
This is the function causing the problem. Does it mean anything to anyone?
pkg install wordpress
, created the mysql database, user and password and Wordpress is starting up but then I get error msg mentioned in the title.It also says Learn more about debugging in WordPress.
So, I follow instructions and get the following in /tmp/wp-errors.log:
Code:
[19-Feb-2020 21:50:39 UTC] PHP Fatal error: Uncaught Error: Call to undefined function json_encode() in usr/local/www/apache24/data/wordpress/wp-includes/functions.php:3820
Stack trace:
#0 /usr/local/www/apache24/data/wordpress/wp-includes/widgets/class-wp-widget-text.php(58): wp_json_encode('text')
#1 /usr/local/www/apache24/data/wordpress/wp-includes/class-wp-widget.php(260): WP_Widget_Text->_register_one()
#2 /usr/local/www/apache24/data/wordpress/wp-includes/class-wp-widget-factory.php(112): WP_Widget->_register()
#3 /usr/local/www/apache24/data/wordpress/wp-includes/class-wp-hook.php(288): WP_Widget_Factory->_register_widgets('')
#4 /usr/local/www/apache24/data/wordpress/wp-includes/class-wp-hook.php(312): WP_Hook->apply_filters('', Array)
#5 /usr/local/www/apache24/data/wordpress/wp-includes/plugin.php(478): WP_Hook->do_action(Array)
#6 /usr/local/www/apache24/data/wordpress/wp-includes/widgets.php(1765): do_action('widgets_init')
#7 /usr/local/www/apache24/data/wordpress/wp-includes/class-wp-hook.php(288): wp_widgets_init('')
#8 /usr/local/www/ in /usr/local/www/apache24/data/wordpress/wp-includes/functions.php on line 3820
This is the function causing the problem. Does it mean anything to anyone?
Code:
function wp_json_encode( $data, $options = 0, $depth = 512 ) {
<------>$json = json_encode( $data, $options, $depth ); ####<-------------------- line 3820 ------------------*********
<------>// If json_encode() was successful, no need to do more sanity checking.
<------>if ( false !== $json ) {
<------><------>return $json;
<------>}
<------>try {
<------><------>$data = _wp_json_sanity_check( $data, $depth );
<------>} catch ( Exception $e ) {
<------><------>return false;
<------>}
<------>return json_encode( $data, $options, $depth );
}
Last edited by a moderator: