centos6.2 64 php-fpm start error - imagick

error message:
/usr/local/php/sbin/php-fpm start
/usr/local/php/sbin/php-fpm: symbol lookup error: /usr/local/php/lib/php/extensions/no-debug-non-zts-20100525/imagick.so: undefined symbol: MagickWandGenesis

This would appear that your Imagick installation is fubar'd. I'd recommend try to re-install this piece of software.
You can download the Imagick here -> http://pecl.php.net/package/imagick
1) Untar the file
2) /path/to/phpize
3) ./configure \
--with-php-config=/path/to/php-config \
--with-imagick
4) make && make install
5) You may need to add extension=imagick.so to your php.ini but it sounds like you may already have this.
If this does not work for you, you can simply remove the extension=imagick.so from your php.ini and PHP-FPM should start up without any troubles. You just won't have Imagick support until you fix it.

Related

Call to undefined function CodeIgniter\locale_set_default() - Xampp

I'm trying to set up Codeigniter4 with Xampp but when calling the public address http://localhost/projectfolder/public/index.php as stated in the README.md file of the CodeIgniter4 framework, the next error appears:
<br />
<b>Fatal error</b>: Uncaught Error: Call to undefined function CodeIgniter\locale_set_default() in
C:\xampp\htdocs\codeigniter4\system\CodeIgniter.php:184
Stack trace:
#0 C:\xampp\htdocs\codeigniter4\system\bootstrap.php(181): CodeIgniter\CodeIgniter->initialize()
#1 C:\xampp\htdocs\codeigniter4\public\index.php(36): require('C:\\xampp\\htdocs...')
#2 {main}
thrown in <b>C:\xampp\htdocs\codeigniter4\system\CodeIgniter.php</b> on line <b>184</b><br />
I've tried this solution but it didn't work for me.
Does anybody know how to solve it?
The root of the issue is that you have a missing PHP extension.
In particular:
intl
Keep in mind that this is clearly stated in the frameworks' repository README.md file.
Server Requirements
PHP version 7.4 or higher is required, with the following extensions
installed:
intl
libcurl if you plan to use the HTTP\CURLRequest library
mbstring
Additionally, make sure that the following extensions are enabled in
your PHP:
json (enabled by default - don't turn it off)
xml (enabled by default - don't turn it off)
mysqlnd
In addition, it's also pointed out here:
Bug: Missing function locale_set_default(...) #3171
Please install intl extension - this is a required component.
I found my temporary solution in here, without updating de PHP Version in Xampp.
Go to C:\xampp\htdocs\projectfolder\system\CodeIgniter.php - line 184 and change the next line.
Before:
locale_set_default($this->config->defaultLocale ?? 'en');
After:
if( function_exists('locale_set_default' ) ) :
locale_set_default($this->config->defaultLocale ?? 'en');
endif;
Once I updated Xampp to the 7.4 version (download here), I just needed to enable the extension=intl in the xampp\php\php.ini file. As it is explained here, you just have to uncomment the line from ;extension=intl to extension=intl.
Then you can leave the C:\xampp\htdocs\projectfolder\system\CodeIgniter.php - line 184 as it was in the beginning.
locale_set_default($this->config->defaultLocale ?? 'en');
Install it via linux
sudo apt-get install php-intl
or for a PHP Version
sudo apt install php7.4-intl
if you are on xampp (windows) update the php.ini
php.ini path = C:\xampp\php\php.ini
;extension=intl
to
extension=intl

Switch icu4c version (Homebrew)

When running composer commands I get an error and it seems I have to change the icu4c version. (At the moment I need a composer command to re(install) - composer global require weprovide/valet-plus) However, when I try to change it using the steps below I get errors.
Error when running composer command (globally):
dyld: Library not loaded: /usr/local/opt/openldap/lib/libldap-2.4.2.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
[2] 12103 abort composer global require weprovide/valet-plus
Steps taken to change icu4c version:
$ cd $(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
$ git checkout 2a369a82c7f5b3b2ab2704ff0796635514aae955
$ brew reinstall ./icu4c.rb
Error when reinstall icu4c.rb:
Error: Failed to load cask: ./icu4c.rb
Cask 'icu4c' is unreadable: wrong constant name #<Class:0x00007fba9a59e168>
Warning: Treating ./icu4c.rb as a formula.
==> Downloading https://ghcr.io/v2/homebrew/core/icu4c/manifests/67.1
##O#- #
curl: (22) The requested URL returned error: 404
Error: Failed to download resource "icu4c_bottle_manifest"
Download failed: https://ghcr.io/v2/homebrew/core/icu4c/manifests/67.1
Anyone who knows how to tackle this? I guess version 67.1 is needed for everything to work. Please let me know if you know anything that might be helpful, thanks in advance!

Wordnet::Similarity installation issue

When I install Wordnet::Similarity on mac, the following error occur:
usr/local/bin/perl "-Iblib/arch" "-Iblib/lib" build/Depthfiles.PL blib/lib/WordNet/synsetdepths.dat
Generating default depth files.
Can't load '/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/Digest/SHA1/SHA1.bundle' for module Digest::SHA1: dlopen(/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/Digest/SHA1/SHA1.bundle, 1): no suitable image found. Did find:
/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level/auto/Digest/SHA1/SHA1.bundle: mach-o, but wrong architecture at /usr/local/lib/perl5/5.8.8/darwin-2level/DynaLoader.pm line 230.
at blib/lib/WordNet/Tools.pm line 76
Compilation failed in require at blib/lib/WordNet/Tools.pm line 76.
My attempt was to enter to the downloaded package directory from terminal and type:
perl Makefile.PL
make
make test
sudo make install
I made sure to have installed all prerequisite http://search.cpan.org/dist/WordNet-Similarity/doc/install.pod#Prerequisites. I suspect that this may be due to mac processor version with Perl interface. Any suggestion on how to fix this?
Install libdigest-sha-perl in Ubuntu 14.04 has solved this issue.
Download link:http://packages.ubuntu.com/trusty/amd64/perl/libdigest-sha-perl

Error -60005 when install Cocos2d-iPhone v3 RC4

When I try to install Cocos2d-iphone 3.0.0 RC4, I got an error: (run without sudo)
Error -60005 occurred while executing script with privileges.
So, I try to show its package content and use terminal to do: cd ...Cocos2D Installer 3.0.0.app/Contents/MacOS
I try this command: (with sudo)
sudo ./Cocos2D\ Installer\ 3.0.0
It works but I got log with some errors:
[1m>>> Installing Cocos2D-v3.0.0 files (B[m
[1m>>> Installing Cocos2D-v3.0.0 templates (B[m
[4m[1mCocos2D Template Installer (Cocos2D-v3.0.0)(B[m
Error: [31m✖︎(B[m Script cannot be executed as root.
In order for it to work properly, please execute the script again without 'sudo'.
If you want to know more about how to use this script execute '/Users/viethung/Downloads/Cocos2D-v3.0.0/install.sh --help'.
[1m>>> Building/Installing Cocos2D-v3.0.0 documentation, this may take a minute.... (B[m
appledoc version: 2.2 (build 963)
Generation step 4/5 failed: GBDocSetInstallGenerator failed generating output, aborting!
Documentation set was installed, but couldn't reload documentation within Xcode.
Xcode got an error: No documentation set present at specified path.
[1m>>> Cocos2D-v3.0.0 installation complete! (B[m
Are there any way is better than this way?
I have same problem.
I think you installed old cocos2d-iphone and it caused this problem.
You should remove old cocos2d-iphone first. I removed:
~/Library/Developer/Xcode/cocos2d v3.x
And install again. It works for me.
Hope it works for you :)

PHPUnit instllation broken since Mountain Lion upgrade

I upgraded my Mac from Lion to Mountain Lion a few months ago.
I previously had PHPUnit working with my Zend Framework 1.11 without issue but had not used it much.
I now have Zend Framewoprk 2 running on a Quick Start website but I simply cannot gwet PHPUnit to work.
I've searched numerous questions related to this on Stackoverflow and tried reinstalls and path changes to php.ini without success.
I have also checked that my PEAR install is working fine, which it is but the error is the same when I try "phpunit --version"
PHP Warning: require(/usr/lib/php/PHPUnit/Autoload.php): failed to open stream: No such file or directory in /usr/bin/phpunit on line 43
Warning: require(/usr/lib/php/PHPUnit/Autoload.php): failed to open stream: No such file or directory in /usr/bin/phpunit on line 43
PHP Fatal error: require(): Failed opening required '/usr/lib/php/PHPUnit/Autoload.php' (include_path='.:/Users/johnadmin/pear/share/pear/PEAR:/Users/johnadmin/pear/share/pear:/usr/bin/phpunit:/Users/johnadmin/pear/share/pear/PHPUnit:/usr/bin/phpunit:/Users/johnadmin/pear/bin/pear') in /usr/bin/phpunit on line 43
Fatal error: require(): Failed opening required '/usr/lib/php/PHPUnit/Autoload.php' (include_path='.:/Users/johnadmin/pear/share/pear/PEAR:/Users/johnadmin/pear/share/pear:/usr/bin/phpunit:/Users/johnadmin/pear/share/pear/PHPUnit:/usr/bin/phpunit:/Users/johnadmin/pear/bin/pear') in /usr/bin/phpunit on line 43
Attempts to reinstall phpunit results in me been told phpunit is already installed and its version current.
$ sudo pear install phpunit/PHPUnit
phpunit/PHPUnit is already installed and is the same as the released version 3.7.10
install failed
Trying to uninstall fails as phpunit is a dependancy in other items/applications.
Is there anyway I can fix this or completely remove it and reinstall fresh?
include_path in my php.ini is:
include_path=".:/Users/johnadmin/pear/share/pear/PEAR:/Users/johnadmin/pear/share/pear:/usr/bin/phpunit:/Users/johnadmin/pear/share/pear/PHPUnit:/usr/bin/phpunit:/Users/johnadmin/pear/bin/pear"
Additional info in case its relevant:
> which phpunit
/usr/bin/phpunit
> which pear
/Users/johnadmin/pear/bin/pear
> which php
/usr/bin/php
Autoload.php is located in
/Users/johnadmin/pear/share/pear/PHPUnit
Additionally, the folder '/usr/lib/php/' exists but the PHPUnit directory is not under that, it is under /Users/johnadmin/pear/share/pear/PHPUnit
bash_profile content/paths
PATH=$PATH:/usr/local/Cellar/imagick/3.0.1:/usr/local/sbin:/Users/johnadmin/pear/share/pear:$
##
# Your previous /Users/johnadmin/.bash_profile file was backed up as /Users/johnadmin/.bash_$
##
# MacPorts Installer addition on 2012-04-17_at_08:37:29: adding an appropriate PATH variable$
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
##
# Your previous /Users/johnadmin/.bash_profile file was backed up as /Users/johnadmin/.bash_$
##
# MacPorts Installer addition on 2012-10-09_at_16:09:32: adding an appropriate PATH variable$
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
##
# Your previous /Users/johnadmin/.bash_profile file was backed up as /Users/johnadmin/.bash_$
##
# MacPorts Installer addition on 2012-12-06_at_13:40:25: adding an appropriate PATH variable$
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
At my wits end as I do not know what else to check frankly and any help would be a big help. Ta
John
Nevermind after hours of trying various solutions I found that creating a simlink to the PHPUnit folder worked.
Command I used was
sudo ln -s /Users/johnadmin/pear/share/pear/PHPUnit /usr/lib/php/PHPUnit
Seriously, this helped me a lot:
Install Composer (http://getcomposer.org)
composer require phpunit/phpunit 3.7.*
composer update
Three simple steps to pull PHPUnit source, and binary to your project.

Resources