Imagick appears installed, but class is not found - php

I'm trying to use Imagick in my php script on my website.
The host says that it is pre-installed and indeed when I view phpinfo() it shows that imagick 3.1.2 is installed. But when I try to use it in the script it says
Fatal error: Class 'Imagick' not found in
What should I do, to be able to use ImageMagick?
Btw, I don't have admin privileges, so can't really install anything.

Related

Running PHP in ubuntu terminal not working anymore

I was trying a PHP script in the terminal yesterday but it didn't work. Not thinking the script could have errors i reinstalled php7.0-cli and when installing it asked something about how i want to do something, i can´t remember what it asked for exactly. Anyhow i pressed the use local something option and after that i´m not finding my mysqli when trying to run the PHP file in terminal.
I´m getting a error like this:
Fatal error: Uncaught Error: Class 'mysqli' not found in /var/www/mysite/system/library/db/mysqli.php:7
I have tried reinstalling the PHP extensions and i have tried to uncomment the extensions from my php.ini file.

PHP imagick searches for modules/coders in wrong path

I've installed ImageMagick, PHP Imagick, Ghostscript on my Windows Server. Everything works fine by cmd prompt and by php exec() function. But it doesn't work via Imagick Class.
This part of code:
$im = new Imagick();
$im->setFormat('PNG');
$im->readImageBlob($this->config->item('system_path')."ftp/MAKRO-INFO/x1.png");
returns ImagickException:
Fatal error: Uncaught exception 'ImagickException' with message 'unable to load module `C:\Windows\system32\config\systemprofile\.magick\IM_MOD_RL_PNG_.dll': An unknown error occurred # error/module.c/OpenModule/1282'
I am very surprised why is Imagick searching for modules in windows/system32/ directory. Of course it doesn't work when access to this path is denied.
My question is, where/how can I change this path (configuration file, registry or enviroment variables)?
This is my phpinfo. As you can see, no modules have been loaded (0 supported formats).
and PATHs:
Found the solution. There was a collision between ImageMagick version and PHP imagick version.
I used these versions:
ImageMagick-6.8.0-3-Q16
php_imagick-3.2.0RC1-5.4-nts-vc9-x86

Image Magick on OpenSUSE: Fatal error: Class 'Imagick' not found

To be short:
OpenSUSE 13.1, php5, apache2, ImageMagick-6.8.6.9-2.28.1.x86_64.
When I call class Imagick I got respond:
Fatal error: Class 'Imagick' not found...
I've googled for the solution but nothing helped. All soultions were for some other Linux distribution, none for OpenSUSE.
I've tried to find this imagick.so on my computer, but without any result. Seems that it doesn't exists although ImageMagick is installed with tons of .so files. And there's no .so from ImageMagick in php5/extensions.
Please help!

Fatal error: Class 'ZipArchive' not found while only download as zip from online

i have create zip achiever. i got
Fatal error: Class 'ZipArchive' not found
error while only accessing download zip file on online.but in local host it's works fine. my local host version is 5.5.11 ,but my online server version 5.4.33, i am battling with this, anyone can give me some ideas..
Thanks Advanced
For the ZipArchive class to be present.
You need php's zip extension installed and enabled.
See this link http://php.net/manual/en/zip.installation.php
PHP needs to have the zip extension installed to use ZipArchive class.
Folow the Link to Install

ImageMagick failed in XAMPP

I had installed ImageMagick in XAMPP 1.8.1 come with PHP 5.4.7. I want to have thumb generate in JPG while uploading PDF file. I follow this guide (http://www.elxsy.com/2009/07/installing-imagemagick-on-windows-and-using-with-php-imagick/) to installing the dll and test run the script, but end up I get below error:
Fatal error: Class 'imagick' not found in C:\...
What's wrong come with this installation?
SOLUTION:
I just got it to work by installed ImageMagick 6.8.0. I use the package here: http://valokuva.org/?p=197
set the path in environment variable
First go to the system properties and click on environment variables and give the path of imagemagick library path in PATH variable.
C:\ImageMagick

Categories