LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 12-28-2010, 09:01 AM   #1
tibberous
Member
 
Registered: Oct 2004
Posts: 56

Rep: Reputation: 15
Question PHP from command line gives a warning


Whenever I try and use php from the command line, I get this message:

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/imagick.so' - /usr/lib64/php/modules/imagick.so: cannot open shared object file: No such file or directory in Unknown on line 0

The problem isn't the missing module, it is the warming message itself -- it is breaking scripts that rely on the output.

I tried shutting off errors, changed my error reporting to:

error_reporting = E_ALL & ~E_NOTICE | E_CORE_WARNING | E_COMPILE_WARNING

And:

display_startup_errors = Off

Doesn't seem to matter though - it is almost like it isn't using the php.ini file at all.

Any ideas? I'm using CentOS.
 
Old 12-28-2010, 09:38 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,384

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
I'm really sorry to dodge the root cause, but why not just install the module? It'd be a quick way to a quiet life, and not all problems deserve being fixed in terms of time spent etc.
 
Old 12-28-2010, 10:04 AM   #3
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,906

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
I agree with acid, that you should add the missing php extension
If you don't want to do so, then use:
Code:
display_errors = Off
to suppress the warning

Regards
 
Old 12-28-2010, 10:14 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,539

Rep: Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506
# yum install php-pecl-imagick.x86_64

The package 'php-pecl-imagick' is in the EPEL repo :
https://fedoraproject.org/wiki/EPEL

https://fedoraproject.org/wiki/EPEL/FAQ#howtouse

..

Last edited by knudfl; 12-28-2010 at 10:15 AM.
 
1 members found this post helpful.
Old 12-28-2010, 07:09 PM   #5
tibberous
Member
 
Registered: Oct 2004
Posts: 56

Original Poster
Rep: Reputation: 15
Thanks guys! I got it, even though I'm not 100% sure what I did!

I just:

yum install ImageMagick

yum install ImageMagick-devel

yum install php-pear

yum install gcc

pecl install imagick
 
Old 01-27-2012, 10:29 AM   #6
thirdshiftguy
LQ Newbie
 
Registered: Jan 2012
Posts: 10

Rep: Reputation: Disabled
how

acid_kewpie, how does one 'install the module'?
 
Old 01-27-2012, 01:13 PM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,384

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
just install imagemagick on your system, via yum, apt etc.. Please don't drag up dead threads in future though, thanks.
 
Old 01-27-2012, 01:20 PM   #8
thirdshiftguy
LQ Newbie
 
Registered: Jan 2012
Posts: 10

Rep: Reputation: Disabled
I have installed it. I am an inquisitive lad; asking questions is part of learning. So now that we are having this conversation, any suggestions?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache PHP != Command Line PHP? wh33t Linux - Server 3 10-23-2007 09:21 PM
PHP from command line prabhatsoni Linux - Software 0 08-16-2007 11:37 AM
LXer: Command-line PHP? Yes, you can! LXer Syndicated Linux News 0 03-14-2007 08:01 AM
PHP on the command line? kev000 Linux - General 4 11-28-2006 03:16 PM
php from command line odious1 Linux - Software 4 05-03-2004 12:31 AM


All times are GMT -5. The time now is 01:42 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration