Title: PHP Parse error: woocommerce.php on line 57
Last modified: October 24, 2021

---

# PHP Parse error: woocommerce.php on line 57

 *  Resolved [Ibby](https://wordpress.org/support/users/ibby/)
 * (@ibby)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/php-parse-error-woocommerce-php-on-line-57/)
 * This message started appearing in cpanel server logs yesterday after updating
   to v5.8.0. The site is loading on frontend but admin is no longer accessible.
   
   I attempted to re-install v5.7.1 and v5.9.0beta1 but the issue persists. Not 
   sure if it’s something server related but I’m scratching my head.
 * The full error is:
    `PHP Parse error: syntax error, unexpected ':', expecting'{'
   in /wp-content/plugins/woocommerce/woocommerce.php on line 57`
 * This corresponds to the following line in woocommerce.php:
    `function wc_get_container():\
   Psr\Container\ContainerInterface {`
 * The admin panel will not load and only brings up a 500 Internal Server Error.
   The development was being done on PHP80 so I forced the subdomain back to 7.4
   via htaccess and verified using health tools and disabling the woocommerce plugin
   via FTP (the site loads perfectly when WooCommerce is disabled). Unfortunately,
   this didn’t work either.
 * EDIT: Frontend is also not working now.
    -  This topic was modified 4 years, 7 months ago by [Ibby](https://wordpress.org/support/users/ibby/).
    -  This topic was modified 4 years, 7 months ago by [Ibby](https://wordpress.org/support/users/ibby/).
    -  This topic was modified 4 years, 7 months ago by [Ibby](https://wordpress.org/support/users/ibby/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-parse-error-woocommerce-php-on-line-57%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [Ibby](https://wordpress.org/support/users/ibby/)
 * (@ibby)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/php-parse-error-woocommerce-php-on-line-57/#post-15000512)
 * Strange, now it’s back…
 *  [Peter Lawrenson](https://wordpress.org/support/users/lorro/)
 * (@lorro)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/php-parse-error-woocommerce-php-on-line-57/#post-15001032)
 * The colon syntax in the function declarion was introduced in PHP 7. The code 
   between the colon and the bracket is the return type declaration. WooCommerce
   requires PHP 7.4 minimum.
 * If you are seeing this error, I would say that the server is actually using PHP
   5.x despite your efforts.

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

The topic ‘PHP Parse error: woocommerce.php on line 57’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Peter Lawrenson](https://wordpress.org/support/users/lorro/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/php-parse-error-woocommerce-php-on-line-57/#post-15001032)
 * Status: resolved