PHP Warning: PHP Startup Errors on WordPressPHP Warning: PHP Startup Errors on WordPress

_______________________________________________________________________________ Don't Forget: As an Affiliate, I Earn from Qualifying Purchases. If you click on any Amazon, Chewy, Walmart, or other links on my site and make a purchase through those companies, I may receive a small percentage of that sale at no extra cost to you. This helps me pay for the upkeep and maintenance of my site. You'll also notice advertisements on my site, which help contribute to the costs of running the site. _______________________________________________________________________________

I’m just wondering if anybody else is  getting these kind of errors on their WordPress site or if you did have them but resolved them, can you explain what the issue was? PHP Warning:  PHP Startup 

02-Dec-2018 01:08:25 UTC] PHP Warning: PHP Startup: imagick: Unable to initialize module
Module compiled with module API=20131226
PHP compiled with module API=20160303
These options need to match
in Unknown on line 0
[02-Dec-2018 01:08:25 UTC] PHP Warning: PHP Startup: SourceGuardian: Unable to initialize module

PHP Warning: PHP Startup Errors on WordPress
PHP Warning: PHP Startup Errors on WordPress

This error appears thousands of times in the error log and it’s the only error. The timestamps are every few minutes EVERY DAY! 

I don’t have any plugins or tools with the names SourceGuardian or imagick. I’ve contacted HostGator about this issue a couple of times and each time, they can’t give me an answer. They tell me that I need to deactivate all plugins and reactivate one by one to see which one is causing the error. I did that and I was unable to rectify the issue; so I’m not sure if the plugins are the root cause. 

I’ve tried Googling for the answer, but to no avail. I’m hoping somebody might come across this post and identify my issue and be able to help me resolve it.

So, if you, internet stranger, had the same issue as I am, and you were able to solve it, would you be able to leave a comment to offer me some suggestions? I’d greatly appreciate it!

I don’t think this issue is causing any major issues with my website – but there might be but I’m not able to tell. The biggest issue is the amount of space the error logs are taking up on the server.

I have to log into my site using FTP and delete the text in the file every couple of days or else my inodes skyrocket and then I get an email from HostGator scolding me for taking up more space on the server than what I’m allocated… UGH! 

Hopefully I get this fixed soon! And if you’re having the same issue, hopefully somebody can come along and help us out! 

-TID

theinspiringdad.com

By The Inspiring Dad

A husband and dad wanting to inspire you!

5 thoughts on “PHP Warning: PHP Startup Errors on WordPress”
  1. I don’t know if you’re still seeing this issue, but I encountered something similar trying to upgrade my HostGator-based site to PHP 7. The .htaccess file had these lines after selecting PHP 7.2, which broke the site:

    # END WordPress
    # Use PHP 5.3
    # Use PHP53 as default
    AddHandler application/x-httpd-php53 .php

    suPHP_ConfigPath /opt/php53/lib

    # php — BEGIN cPanel-generated handler, do not edit
    # Set the ?~@~\ea-php72?~@~] package as the default ?~@~\PHP?~@~] programming language.

    AddHandler application/x-httpd-ea-php72 .php .php7 .phtml

    # php — END cPanel-generated handler, do not edit

    Commenting out that first part:

    #AddHandler application/x-httpd-php53 .php
    #
    # suPHP_ConfigPath /opt/php53/lib
    #

    solved the issue.

  2. I do not mean to unnecessarily resurrect a long-dead thread, but did you solve this yet?

    I just had a similar error right after asking Hostgator to upgrade me from php 7.1 to 7.2. This also completely broke my site. Anyway, I worked with their tech support and he fixed it. I asked what he did and he said he needed to add code to my .htaccess file. I checked the file, and this is the only code there:

    AddHandler application/x-httpd-ea-php72 .php7 .php .phtml

    Not sure if this is helpful or not, but which version of php are you running and what is in your .htaccess file?

    1. So, a few more notes about my previous comment…


      tl;dr…some of your php modules are not compatible with your current php version, and this is something that Hostgator needs to fix for you.

      That AddHandler line above is supposed to be located between a bracketed section that says:

      IfModule mod_suphp.c

      I looked up mod_suphp.c and it is an Apache module for executing PHP scripts with the permissions of their owners. So this is something that is part of the Hostgator server setup, not something that is part of WordPress. You can read more here: https://www.suphp.org/Home.html

      So it appears that the code they added to my .htaccess file simply forces my website to use the php version of my choice (in this case 7.2), and it runs using my permissions.

      I already know imagick is a php module that lets users manipulate uploaded graphics through a web browser. So it is a server tool that WordPress might use on images in you media library, but the module itself is part of the Hostgator server setup, not a WordPress module.

      SourceGuradian appears to be a php source protection system. Again, this appears to be something Hostgator is supposed to maintain, not a WordPress module. More info here: https://www.sourceguardian.com/

      The two lines in your error log indicating Module and PHP were compiled with different APIs tells me that some of your php module versions (which Hostgator is responsible for maintaining as far as I know) are not compatible with your current version of php. That’s just an educated guess.

      So you can find out your current php version, along with the versions of all active php modules, by using your cPanel File Manager to add a file to your website’s home directory called phpinfo.php which contains the code phpinfo(). Ask Aunt Google how to write it properly. This might help: https://www.php.net/manual/en/function.phpinfo.php

      Then just use your browser to browse to yourdomain.com/phpinfo.php

      Your phpinfo.php page will tell you lots of info about how php is set up on your server. Use Aunt Google to see if your current version of imagick is compatible with your current version of php, for example.

      You may need to get back on with Hostgator support chat to have them update your php to the version of your choice and ensure all modules are compatible.

      I hope this helps someone out there, it did for me.

Leave Your Thoughts Here: