I a running a local development environment on my MBP using osx yosemite, php 5.5.14, apache 2.4 mysql (sometimes) and a few things installed via brew.
I tried to run a CMS locally and ran into an issue where it stated i needed mcrypt; so i tried to install it and was promptly tole mcrypt was already installed.
Did a little research, tried to reinstall it and now I'm faced with this error when running php -v. Also this has stopped m dev enviroment from showing me my site and all it says now is 'it works!'
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/local/Cellar/php55-mcrypt/5.5.21/mcrypt.so' -
dlopen(/usr/local/Cellar/php55-mcrypt/5.5.21/mcrypt.so, 9): image not
found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library
'/usr/local/Cellar/php55-mcrypt/5.5.21/mcrypt.so' -
dlopen(/usr/local/Cellar/php55-mcrypt/5.5.21/mcrypt.so, 9):
image not found in Unknown on line 0
PHP 5.5.21 (cli) (built: Feb 12 2015 20:17:17)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
Any help would be very appreciated and thanks in advance.
Make sure that you're loading the mcrypt.so extension in your php.ini file. Also, you may need to run brew install mcrypt php55-mcrypt to get the PHP extension.
Find the location of your ini with:
php -i | grep php.ini
Edit the file and add extension=mcrypt.so to the file, save and restart Apache.
Related
We have a requirement that needs to downgrade PHP from 8.1 to 7.1 in our Ubuntu 18 server.
sudo update-alternatives --set php /usr/bin/php7.1
After the downgrade, we're seeing PHP Startup error everytime we check php -v
Below is the exact error text:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/propro.so' - /usr/lib/php/20160303/propro.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/raphf.so' - /usr/lib/php/20160303/raphf.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/http.so' - /usr/lib/php/20160303/http.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP 7.1.33-47+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Jun 27 2022 08:15:45) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.1.33-47+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
The missing libraries are really not found in the said directory as I checked.
/usr/lib/php/20160303
We have tried reinstalling as suggested from other forum with same error.
sudo apt-get install --reinstall `dpkg -l | grep 'ii php7.1' | awk '{ printf($2" "); next}'`
It works for them but not in ours.
I hope I can get help here. Thanks in advance.
By the way, I'm not a Linux and PHP developer. Just starting getting into it.
--reinstall will only reinstall the things that are installed, but it looks like you actually removed a number of modules. The propro, raphf, and http modules are not standard and are not installed by default. If you don't actually need/use them, you can just disable them so that they don't try to load:
phpdismod propro raphf http
However, if your app requires these modules, you'll need to explicitly add them:
apt install php7.1-propro php7.1-raphf php7.1-http
I am trying to run a yii project which I copied from server. The project is running fine on live server.
I installed wamp for that purpose, and using composer installed all packages. The project is using advanced yii template, when I goto http://localhost/nz-tool.nztours.de/backend/web/ to run backend index page. I get the following error
Invalid Configuration – yii\base\InvalidConfigException MemCache
requires PHP memcache extension to be loaded.
Btw I am new to yii and php, so I maybe missing some configuration. Upon googling I found out that php_memcached.dll dll is missing. I copied and put it in the right folder C:\wamp64\bin\php\php7.4.26\ext and updated php.ini, even tried changing php versions. But still memCached dll is not loading.
When I run php --version, it complains of missing php_memCached.dll file.
Warning: PHP Startup: Unable to load dynamic library 'php_memcached.dll' (tried: c:/wamp64/bin/php/php7.4.26/ext/php_memcached.dll (The specified module could not be found.), c:/wamp64/bin/php/php7.4.26/ext/php_php_memcached.dll.dll (The specified module could not be found.)) in Unknown on line 0
PHP 7.4.26 (cli) (built: Nov 16 2021 18:15:31) ( ZTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
I also followed this guide to install memcache service.
Additional info:
I have tried xamp and still same issue.
Please check if you copied the memcached DLL file to the correct location.
Your PHP warning says something about
c:/wamp64/bin/php/php7.4.26/ext/php_php_memcached.dll.dll
and looked for
c:/wamp64/bin/php/php7.4.26/ext/php_memcached.dll
and in php.ini file, these configurations need to be set
extension=php_memcache.dll
[Memcache]
memcache.allow_failover = 1
memcache.max_failover_attempts=20
memcache.chunk_size =8192
memcache.default_port = 11211
I am trying to setup php memcached extension on mac OS High Sierra. I am running php 7.2
Output of php -v:
PHP 7.2.6 (cli) (built: May 25 2018 06:18:43) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.6, Copyright (c) 1999-2018, by Zend Technologies
I installed memcached via pecl without any error:
pecl install memcached
It is enabled in php.ini file:
extension="memcached.so"
When I run <?php echo phpinfo();?> on my Apache server. I can see session configured:
session.save_handler memcached memcached
My symfony application gives me still this error:
(1/1) ClassNotFoundException
Attempted to load class "Memcached" from the global namespace.
Did you forget a "use" statement?
EDIT:
My apache is running a different version of php (PHP Version 7.1.16) I don't know why but I think this cannot be a problem.
In info file I can see in the CORE section that php extension dir is "/usr/local/lib/php/pecl/20170718". When I open that directory there is memcached.so file. The path is correct.
EDIT 2:
In my apache logs I see warning:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/pecl/20170718/memcached.so' - dlopen(/usr/local/lib/php/pecl/20170718/memcached.so, 9): Symbol not found: _zend_empty_string\n Referenced from: /usr/local/lib/php/pecl/20170718/memcached.so\n Expected in: flat namespace\n in /usr/local/lib/php/pecl/20170718/memcached.so in Unknown on line 0
So. Apache and SLI php version use diferent php.ini files.
For examle on my Debian 9 it use /etc/php/7.2/apache2/php.ini and /etc/php/7.2/cli/php.ini
I believe your problem is that you are using a different version of PHP.
Just try comands below:
$sudo a2dismod php7.1
$sudo a2enmod php7.2
$sudo service apache2 restart
If you still get same Error try create info.php in your www root dir thich conteint next code:
<?php
phpinfo();
And check Memcache are loaded.
I have running Xampp with PHP5.5 on Fedora from Apache Friend, with default settings what the installer package do on Linux.
When I install FFMPEG successfully and try to load from php.ini it always says:
*
11-Oct-2013 14:05:51 Europe/Berlin] PHP Warning: PHP Startup: ffmpeg: Unable to initialize module
Module compiled with module API=20060613
PHP compiled with module API=20121212
These options need to match
in Unknown on line 0
*
The only thing which is confusing me is that when I did phpize even that I already installed xampp server which means I have PHP running. FFMPEG phpize did not work and I had to install php-devel. Does that mean that FFMPEG is configured with PHP, other than the installed with XAMPP? I am not sure what is happening. Whatever I do I always receive this error message in php_error_log file.
It is amazing :) that I just run below command to see what version of PHP is, I have and below are the results which are shocking one because I am in a feeling that I have PHP 5.5 installed and running from XAMMP.
[root#localhost ~]# php -v
PHP 5.2.6 (cli) (built: May 8 2008 08:53:44)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
How can I get this covered that if I simple install XAMPP server on linux and want to install and configure FFMPEG along with?
My guess would be that the versions of php and the module you installed do not match. So run make sure both packages are installed from the same source and are both current.
EDIT: According to the XAMPP site, Fedora is not supported, they specify Ubuntu, SuSE, RedHat, Mandrake and Debian. So I would make sure you do not use the php package provided by Fedora. Or (if you have the liberty), choose a different OS.
I am runnning 64-bit Windows 7 with Apache 2.2, PHP 5.4.4 VC9. I have downloaded and installed ImageMagick 6.6.4 and successfully tested it from the command prompt. I have restarted my computer. I have tried many different extension files and keep getting the following error in my Apache logs.
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\PHP\\ext\\php_imagick_ts.dll' - The specified procedure could not be found.\r\n in Unknown on line 0
I have my extension_dir set to C:\PHP\ext. And I of course have added the line extension=php_imagick_ts.dll modified according to which file I am trying.
I have Imagick working on Win7 x64 with PHP 5.4 (only tested commandline, but Apache should work) using the beta libraries as compiled and hosted here: http://www.peewit.fr/imagick/
I installed ImageMagick via the ImageMagick-6.8.0-7-Q16-windows-dll.exe file on the ImageMagick downloads page.
C:\>php -v
PHP 5.4.0 (cli) (built: Feb 29 2012 19:24:02)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
C:\>php -m
[PHP Modules]
...
imagick
...
I haven't actually tested using this extension yet, but I'm fairly confident that this will work, given that all of the other .dlls I tried resulted in php.exe crashing when I tried simply running php -v!
The only thing that ended up working for me was to load php 5.3. Began working immediately.