<p>I've just upgraded PHP 7.0 on a standard Ubuntu Server 16.04 LTS distro from non-thread safe to thread safe (using Michel Phillipe Luca's instructions here: <a href="http://php.net/manual/de/pthreads.installation.php" rel="nofollow noreferrer">http://php.net/manual/de/pthreads.installation.php</a>).</p>

<p>I had a CLI method set up which was working perfectly fine, but after installing the thread-safe version of PHP (with no changes to the code), when I try to run <code>./craft/app/etc/console/yiic plugin method</code> I get the following error:</p>

<pre><code>Fatal error: Uncaught Error: Class 'Craft\ErrorHandler' not found in /var/www/asmar/subdomains/site/craft/app/framework/YiiBase.php:213
Stack trace:
#0 /var/www/asmar/subdomains/site/craft/app/framework/base/CModule.php(393): YiiBase::createComponent(Array)
#1 /var/www/asmar/subdomains/site/craft/app/etc/console/ConsoleApp.php(220): CModule-&gt;getComponent('errorHandler', true)
#2 /var/www/asmar/subdomains/site/craft/app/framework/base/CApplication.php(468): Craft\ConsoleApp-&gt;getComponent('errorHandler')
#3 /var/www/asmar/subdomains/site/craft/app/framework/base/CApplication.php(749): CApplication-&gt;getErrorHandler()
#4 [internal function]: CApplication-&gt;handleException(Object(Error))
#5 {main}
  thrown in /var/www/asmar/subdomains/site/craft/app/framework/YiiBase.php on line 213
</code></pre>

<p>Any ideas how I may squash this?</p>

CC BY-SA 3.0
2017-01-14T19:14:41.633Z
Attempting to fully remove PHP & reinstall from scratch... I'm suspecting I have out of date packages or configs that are interfering with namespacing. Will update on results. Thanks for looking anyways!
Jonny Asmar
CC BY-SA 3.0
2017-01-14T20:09:54.520Z
This didn't seem to work..
Jonny Asmar
CC BY-SA 3.0
2018-04-19T23:52:45.497Z
Also looking for an answer to this.
Anna_MediaGirl
CC BY-SA 3.0
2018-04-21T02:00:21.343Z
Sorry guys -- I have yet to find a solution to this :(
Jonny Asmar
CC BY-SA 3.0
2018-03-22T17:11:49.653Z
I have the same problem. @Jonny Asmar did you ever solved this?
SoHo
<php><yiic><cli>
Class 'Craft\ErrorHandler' not found in YiiBase.php after new Thread-Safe PHP install
# Class 'Craft\ErrorHandler' not found in YiiBase.php after new Thread-Safe PHP install

(Asked by: username_0 on 2017-01-14)

I've just upgraded PHP 7.0 on a standard Ubuntu Server 16.04 LTS distro from non-thread safe to thread safe (using Michel Phillipe Luca's instructions here: http://php.net/manual/de/pthreads.installation.php).
I had a CLI method set up which was working perfectly fine, but after installing the thread-safe version of PHP (with no changes to the code), when I try to run ./craft/app/etc/console/yiic plugin method I get the following error:
Fatal error: Uncaught Error: Class 'Craft\ErrorHandler' not found in /var/www/asmar/subdomains/site/craft/app/framework/YiiBase.php:213
Stack trace:
#0 /var/www/asmar/subdomains/site/craft/app/framework/base/CModule.php(393): YiiBase::createComponent(Array)
#1 /var/www/asmar/subdomains/site/craft/app/etc/console/ConsoleApp.php(220): CModule->getComponent('errorHandler', true)
#2 /var/www/asmar/subdomains/site/craft/app/framework/base/CApplication.php(468): Craft\ConsoleApp->getComponent('errorHandler')
#3 /var/www/asmar/subdomains/site/craft/app/framework/base/CApplication.php(749): CApplication->getErrorHandler()
#4 [internal function]: CApplication->handleException(Object(Error))
#5 {main}
  thrown in /var/www/asmar/subdomains/site/craft/app/framework/YiiBase.php on line 213

Any ideas how I may squash this?

**Tags:** php, yiic, cli

> **Comments:**
> **username_0**: Attempting to fully remove PHP & reinstall from scratch... I'm suspecting I have out of date packages or configs that are interfering with namespacing. Will update on results. Thanks for looking anyways!  
> **username_0**: This didn't seem to work..  
> **username_2**: I have the same problem. @username_0 did you ever solved this?  
> **username_1**: Also looking for an answer to this.  
> **username_0**: Sorry guys -- I have yet to find a solution to this :(  

---

## 0 answers

