2

When I follow this documentation to "Integrating IvoryCKEditorBundle to Create a WYSIWYG Editor" in my app, I get the following error:

[Symfony\Component\Debug\Exception\ClassNotFoundException] Attempted to load class "ZipArchive" from the global namespace.  Did you forget a "use" statement?

This happens at the step 4. I really have no idea about what could triggers this error. Due to my OS configuration? PHP Version? Symfony config? Etc?

jmd_dk
  • 12,125
  • 9
  • 63
  • 94
  • Possibly a composer autoload configuration issue: https://stackoverflow.com/questions/44946911/symfony3-classnotfoundexception-after-bundle-creation/44948820#44948820 – Cerad Oct 25 '17 at 19:49
  • 3
    Possibly missing a PHP `zip` extension. `sudo apt-get install php7.0-zip` – malcolm Oct 25 '17 at 20:26
  • 1
    Possible duplicate of [Fatal error: Class 'ZipArchive' not found in](https://stackoverflow.com/questions/3872555/fatal-error-class-ziparchive-not-found-in) – Łukasz D. Tulikowski Oct 25 '17 at 21:38
  • I Try to edit from @jmd_dk edit but it doesn't work. I'm sorry I'm noob on stackOverflow. For my part, php7.0-zip wasn't installed on my ubuntu, thank you very much, it's resolved now. – Clément MARTZLOFF Oct 26 '17 at 09:41

2 Answers2

3

I encountered the same issue today and tried the solution proposed in the comments by Malcom (thanks, Malcom - it worked!):

sudo apt-get install php7.0-zip

Ian
  • 3,806
  • 2
  • 20
  • 23
startstek
  • 31
  • 1
2

please note that you can also change the php version, for 5.6 use sudo apt-get install php5.6-zip