Title: Server Error 5(xxx) PHP version conflicts
Last modified: January 31, 2025

---

# Server Error 5(xxx) PHP version conflicts

 *  [Cocotu](https://wordpress.org/support/users/realcocotu/)
 * (@realcocotu)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/server-error-5xxx-php-version-conflicts/)
 * Several URLs were giving 5xx server errors. I contacted my host provider. They
   found out my theme version Rife Free Version: 2.4.21 conflicts with their current
   PHP version 8.2. My WordPress version is 6.7.1. Below are my host’s server errors:
 *     ```wp-block-code
       [30-Jan-2025 21:31:17 UTC] PHP Fatal error:  Uncaught TypeError: sizeof(): Argument #1 ($value) must be of type Countable|array, bool given in /home/customer/www/nycmoments.nyc/public_html/wp-content/themes/rife-free/advance/utilities/woocommerce.php:356Stack trace:#0 /home/customer/www/nycmoments.nyc/public_html/wp-includes/class-wp-hook.php(324): apollo13framework_wc_loop_single_product_categories('')#1 /home/customer/www/nycmoments.nyc/public_html/wp-includes/class-wp-hook.php(348): WP_Hook-&gt;apply_filters(NULL, Array)#2 /home/customer/www/nycmoments.nyc/public_html/wp-includes/plugin.php(517): WP_Hook-&gt;do_action(Array)#3 /home/customer/www/nycmoments.nyc/public_html/wp-content/plugins/woocommerce/templates/content-product.php(42): do_action('woocommerce_bef...')#4 /home/customer/www/nycmoments.nyc/public_html/wp-includes/template.php(812): require('/home/customer/...')#5 /home/customer/www/nycmoments.nyc/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(284): load_template('/home/customer/...', false)#6 /home/customer/www/nycmoments.nyc/public_html/wp-content/plugins/woocommerce/templates/single-product/up-sells.php(42): wc_get_template_part('content', 'product')#7 /home/customer/www/nycmoments.nyc/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(345): include('/home/customer/...')#8 /home/customer/www/nycmoments.nyc/public_html/wp-content/plugins/woocommerce/includes/wc-template-functions.php(2283): wc_get_template('single-product/...', Array)#9 /home/customer/www/nycmoments.nyc/public_html/wp-includes/class-wp-hook.php(324): woocommerce_upsell_display(0)#10 /home/customer/www/nycmoments.nyc/public_html/wp-includes/class-wp-hook.php(348): WP_Hook-&gt;apply_filters(NULL, Array)#11 /home/customer/www/nycmoments.nyc/public_html/wp-includes/plugin.php(517): WP_Hook-&gt;do_action(Array)#12 /home/customer/www/nycmoments.nyc/public_html/wp-content/plugins/woocommerce/templates/content-single-product.php(72): do_action('woocommerce_aft...')#13 /home/customer/www/nycmoments.nyc/public_html/wp-includes/template.php(812): require('/home/customer/...')#14 /home/customer/www/nycmoments.nyc/public_html/wp-content/plugins/woocommerce/includes/wc-core-functions.php(284): load_template('/home/customer/...', false)#15 /home/customer/www/nycmoments.nyc/public_html/wp-content/plugins/woocommerce/templates/single-product.php(37): wc_get_template_part('content', 'single-product')#16 /home/customer/www/nycmoments.nyc/public_html/wp-includes/template-loader.php(106): include('/home/customer/...')#17 /home/customer/www/nycmoments.nyc/public_html/wp-blog-header.php(19): require_once('/home/customer/...')#18 /home/customer/www/nycmoments.nyc/public_html/index.php(17): require('/home/customer/...')#19 {main}  thrown in /home/customer/www/nycmoments.nyc/public_html/wp-content/themes/rife-free/advance/utilities/woocommerce.php on line 356
       ```
   
 * At this point my server is running PHP 7.4 (outdated) My host provider recommends
   to be on PHP 8.2. Are you going to make your theme compatible with the latest
   PHP versions.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fserver-error-5xxx-php-version-conflicts%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 13 replies - 1 through 13 (of 13 total)

 *  Theme Author [apollo13themes](https://wordpress.org/support/users/apollo13themes/)
 * (@apollo13themes)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/server-error-5xxx-php-version-conflicts/#post-18278518)
 * Hi, this will be fixed soon – for now, if you are using a child theme – add this
   code to the functions.php in child theme:
 *     ```wp-block-code
       function apollo13framework_wc_loop_single_product_categories() {    global $product;    //categories    $terms = get_the_terms( apollo13framework_wc_get_product_id($product), 'product_cat' );    if(!is_array($terms)){        return;    }    if( sizeof( $terms ) ){        echo '<span class="posted_in">';        $temp = 1;        foreach ( $terms as $term ) {            if($temp > 1){                echo '<span class="sep">/</span>';            }            echo esc_html($term->name);            $temp++;        }        echo '</span>';    }}
       ```
   
 *  Thread Starter [Cocotu](https://wordpress.org/support/users/realcocotu/)
 * (@realcocotu)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/server-error-5xxx-php-version-conflicts/#post-18285229)
 * Hello,
 * That did not work for my site. After creating the functions.php for my child 
   theme I see the code being displayed at the top of every page in the website.
   Items from my shop do not show in the cart.
 * Where can i send you screenshots? Thanks.
 *  Theme Author [apollo13themes](https://wordpress.org/support/users/apollo13themes/)
 * (@apollo13themes)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/server-error-5xxx-php-version-conflicts/#post-18285723)
 * Probably some sneaky bug in your functions.php file.
 * Please send the screenshots by using [https://snipboard.io/](https://snipboard.io/)
 *  Thread Starter [Cocotu](https://wordpress.org/support/users/realcocotu/)
 * (@realcocotu)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/server-error-5xxx-php-version-conflicts/#post-18286891)
 * [https://snipboard.io/ebq8LK.jpg](https://snipboard.io/ebq8LK.jpg)
 *  Thread Starter [Cocotu](https://wordpress.org/support/users/realcocotu/)
 * (@realcocotu)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/server-error-5xxx-php-version-conflicts/#post-18286934)
 * Can you share the proper way to create a child theme for your theme? Thanks.
 *  Theme Author [apollo13themes](https://wordpress.org/support/users/apollo13themes/)
 * (@apollo13themes)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/server-error-5xxx-php-version-conflicts/#post-18286955)
 * [https://rifetheme.com/help/docs/installation-updating/installing-the-rife-child-theme/](https://rifetheme.com/help/docs/installation-updating/installing-the-rife-child-theme/)
 *  Thread Starter [Cocotu](https://wordpress.org/support/users/realcocotu/)
 * (@realcocotu)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/server-error-5xxx-php-version-conflicts/#post-18287054)
 * Yes, I followed those steps to create the child theme and still got that error
   in the screenshot above. What else do you suggest? When is your fix going to 
   be available?
 *  Theme Author [apollo13themes](https://wordpress.org/support/users/apollo13themes/)
 * (@apollo13themes)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/server-error-5xxx-php-version-conflicts/#post-18287116)
 * well, there must be a php error in the file you modified.
 * can you paste here the entire functions.php file from child theme?
 *  Thread Starter [Cocotu](https://wordpress.org/support/users/realcocotu/)
 * (@realcocotu)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/server-error-5xxx-php-version-conflicts/#post-18287383)
 * My functions.php:
 *     ```wp-block-code
       function apollo13framework_wc_loop_single_product_categories() {global $product;//categories$terms = get_the_terms( apollo13framework_wc_get_product_id($product), 'product_cat' );if(!is_array($terms)){return;}if( sizeof( $terms ) ){echo '<span class="posted_in">';$temp = 1;foreach ( $terms as $term ) {if($temp > 1){echo '<span class="sep">/</span>';}echo esc_html($term->name);$temp++;}echo '</span>';}}
       ```
   
 *  Theme Author [apollo13themes](https://wordpress.org/support/users/apollo13themes/)
 * (@apollo13themes)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/server-error-5xxx-php-version-conflicts/#post-18287412)
 *     ```wp-block-code
       <?php/** * make sure child theme style.css will be loaded as last file before user.css */function a13_child_style(){global $wp_styles;//get current user.css dependencies $user_css_deps = $wp_styles->registered['a13-user-css']->deps;//register child theme style.css and add it with dependencies for user.css, to be sure it will be loaded after all other style files //it is useful for doing easier style overwrites wp_register_style('child-style', get_stylesheet_directory_uri(). '/style.css', $user_css_deps, A13FRAMEWORK_THEME_VER);//add child theme style.css as also needed for user.css array_push($wp_styles->registered['a13-user-css']->deps, 'child-style');}//register it later then parent theme stylesadd_action('wp_enqueue_scripts', 'a13_child_style', 27);/* * Add here your functions below, and overwrite native theme functions */function apollo13framework_wc_loop_single_product_categories() {global $product;//categories $terms = get_the_terms( apollo13framework_wc_get_product_id($product), 'product_cat' );if(!is_array($terms)){return;}if( sizeof( $terms ) ){echo '<span class="posted_in">';$temp = 1;foreach ( $terms as $term ) {if($temp > 1){echo '<span class="sep">/</span>';}echo esc_html($term->name);$temp++;}echo '</span>';}}
       ```
   
 * You have no php opening tag and the file is not complete, is does not load parent
   assets. Please try the code I pasted
    -  This reply was modified 1 year, 4 months ago by [apollo13themes](https://wordpress.org/support/users/apollo13themes/).
 *  Thread Starter [Cocotu](https://wordpress.org/support/users/realcocotu/)
 * (@realcocotu)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/server-error-5xxx-php-version-conflicts/#post-18287473)
 * Thanks. If the code you pasted works, can I change back to the latest PHP version?
 *  Theme Author [apollo13themes](https://wordpress.org/support/users/apollo13themes/)
 * (@apollo13themes)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/server-error-5xxx-php-version-conflicts/#post-18287476)
 * give a try
 *  Thread Starter [Cocotu](https://wordpress.org/support/users/realcocotu/)
 * (@realcocotu)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/server-error-5xxx-php-version-conflicts/#post-18287696)
 * It works now. I also tested with PHP 8.4.3. Should we keep this child theme even
   when you release the next update?

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘Server Error 5(xxx) PHP version conflicts’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/rife-free/2.4.24/screenshot.png)
 * Rife Free
 * [Support Threads](https://wordpress.org/support/theme/rife-free/)
 * [Active Topics](https://wordpress.org/support/theme/rife-free/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/rife-free/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/rife-free/reviews/)

 * 13 replies
 * 2 participants
 * Last reply from: [Cocotu](https://wordpress.org/support/users/realcocotu/)
 * Last activity: [1 year, 4 months ago](https://wordpress.org/support/topic/server-error-5xxx-php-version-conflicts/#post-18287696)
 * Status: not resolved