Can't install "Composer Dependency Manager for PHP" - composer-php

root#rushan-PC:~# curl -sS https://getcomposer.org/installer | php
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/gd.so' - /usr/lib/php5/20090626/gd.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/php5/20090626/mcrypt.so' - /usr/lib/php5/20090626/mcrypt.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/php5/20090626/mysql.so' - /usr/lib/php5/20090626/mysql.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/php5/20090626/mysqli.so' - /usr/lib/php5/20090626/mysqli.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Module 'PDO' already loaded in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/pdo_mysql.so' - /usr/lib/php5/20090626/pdo_mysql.so: cannot open shared object file: No such file or directory in Unknown on line 0
#!/usr/bin/env php
Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:
The suhosin.executor.include.whitelist setting is incorrect.
Add the following to the end of your `php.ini` or suhosin.ini (Example path [for Debian]: /etc/php5/cli/conf.d/suhosin.ini):
suhosin.executor.include.whitelist = phar
The php.ini used by your command-line PHP is: /etc/php5/cli/php.ini
If you can not modify the ini file, you can also run `php -d option=value` to modify ini values on the fly. You can use -d multiple times.
Terminal gives me this error. Before that, I installed php packages, there was some error
"Unable to correct problems, you have delayed (held) broken packages." But I can install it with aptitude, instead of apt-get. Perhaps, this dynamic libraries errors because of Held packages? Or something...Please, I need some help there:(. Sorry, I'm just a beginner in Linux and programming. And sorry for my English, cuz I'm from Uzbekistan :(

According to information in your error, you should edit your php.ini file (/etc/php5/cli/php.ini) and add the following line at the end
suhosin.executor.include.whitelist = phar

You should edit your php.ini file (/etc/php5/cli/php.ini) and add the following line before the END: keywords.
suhosin.executor.include.whitelist = phar

Related

Imagick extension installation issue xampp

I am trying to install Imagick extension on windows 10 with PHP version 8.0.3 but getting below error
PHP Warning: PHP Startup: Unable to load dynamic library
'php_imagick.dll' (tried: D:\xampp\php\ext\php_imagick.dll (The
specified module could not be found),
D:\xampp\php\ext\php_php_imagick.dll.dll (The specified module could
not be found)) in Unknown on line 0
Windows : 10 X64
PHP version : 8.0.3
Steps to reproduce:
I have added imagick.dll file in xampp\php\ext directory
Added CORE_RL_.dll and IM_MOD_RL_.dll in xampp\php folder.
Added extension=php_imagick.dll in xampp\php\php.ini file
Restarted xammp
Getting below error on webpage
enter image description here
In the PHP error log below error is logged.
PHP Warning: PHP Startup: Unable to load dynamic library 'php_imagick.dll'
First download this: https://windows.php.net/downloads/pecl/releases/imagick/3.7.0/php_imagick-3.7.0-8.0-ts-vs16-x64.zip
Extract from php_imagick-….zip the php_imagick.dll file, and save it to the ext directory of your PHP installation
Extract from php_imagick-….zip all the other DLL files and save them to the PHP root directory (where you have php.exe)
Add this line to your php.ini file:
extension=php_imagick.dll
Restart the Apache/NGINX Windows service (if applicable)

Unable to load dynamic library 'blackfire'

I create a post today because I have a problem with the blackfire installation.
I read all documentation and install this extension but I have an error message in my command consol.
I did add BlackFire but when I want to config the extension, this message appair :
Warning: PHP Startup: Unable to load dynamic library 'blackfire' (tried: D:/Programmes/WAMP/bin/php/php7.3.12/ext/blackfire (The specified module was not found.), D:/Programmes/WAMP/bin/php/php7.3.12/ext/php_blackfire.dll (The specified module was not found.)) in Unknown on line 0[enter image description here]
I'm sure as a good path and I don't understand why I have this message..
If you can help me,
Thanks in advance and good development !

Unable to install composer in xampp php 7.3.9 in windows 10

Iam unable to install composer in my windows system with Xampp installed with PHP version 7.3.9
Please find the error message.
"A setting in your php.ini could be causing the problem: Either the 'extension_dir' value is incorrect or the dll does not exist."
Program Output:
PHP Warning: PHP Startup: Unable to load dynamic library 'php_pdo.dll' (tried: C:\xampp\php\ext\php_pdo.dll (%1 is not a valid Win32 application.), C:\xampp\php\ext\php_php_pdo.dll.dll (The specified module could not be found.)) in Unknown on line 0
PHP Warning: Module 'pdo_sqlite' already loaded in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'php_pdo_sqlsrv_73_ts_x86.dll' (tried: C:\xampp\php\ext\php_pdo_sqlsrv_73_ts_x86.dll (%1 is not a valid Win32 application.), C:\xampp\php\ext\php_php_pdo_sqlsrv_73_ts_x86.dll.dll (The specified module could not be found.)) in Unknown on line 0
PHP Warning: Module 'openssl' already loaded in Unknown on line 0
Please See the Inline comments for errors and Warnings
1A setting in your php.ini could be causing the problem: Either the 'extension_dir' value is incorrect or the dll does not exist.
Answer: Checked the extension_dir(extension_dir="C:\xampp\php\ext"). Path was correct So I checked for the below warnings.
Program Output: PHP Warning: PHP Startup: Unable to load dynamic library 'php_pdo.dll' (tried: C:\xampp\php\ext\php_pdo.dll (%1 is not a valid Win32 application.),
Answer: Commented ;extension=php_pdo.dll
C:\xampp\php\ext\php_php_pdo.dll.dll (The specified module could not be found.)) in Unknown on line 0 PHP Warning: Module 'pdo_sqlite' already loaded in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'php_pdo_sqlsrv_73_ts_x86.dll' (tried: C:\xampp\php\ext\php_pdo_sqlsrv_73_ts_x86.dll (%1 is not a valid Win32 application.),
Answer: Removed these extensions which I have used for connecting to the SQL server
C:\xampp\php\ext\php_php_pdo_sqlsrv_73_ts_x86.dll.dll (The specified module could not be found.)) in Unknown on line 0 PHP
Answer: Removed these extensions which I have used for connecting to the SQL server
Warning: Module 'openssl' already loaded in Unknown on line 0
Answer: Openssl was loaded twice, Comment one in php.ini file
Also please check that the composer is already installed in your program files
Thanks
Vysakh

Why does Phalcon 2 raise "undefined symbol: php_pdo_get_dbh_ce in Unknown on line 0" warning?

When I installed Phalcon 2.0.13 according to the https://docs.phalconphp.com/en/latest/reference/install.html description and I wanted to launch my test script then I got the following error (literally it is just a warning but it causes Phalcon not to be loaded which causes errors):
{
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/phalcon.so' - /usr/lib/php/20131226/phalcon.so: undefined symbol: php_pdo_get_dbh_ce in Unknown on line 0
}
What is this symptom cased by and how could I get rid of it?
After struggling a lot, I managed to solve the problem. The {extension=phalcon.so} line should be put NOT in php.ini. Much rather, you should create a /etc/php/5.6/cli/conf.d/30-phalcon.ini file containing {extension=phalcon.so}.
The reason is that this way you can guarantee that the processing order of the ini files is appropriate.
If you want to use Phantom not just in cli but in apache module as well then copy the ini file in the corresponding directory too.
(The directory names can be different in your system.)

Enable PHPUnit with Laravel / Homestead on PhpStorm 2016.1 to

I am working on vagrant / homestead, and have a box configured.
I could enable Xdebug in PhpStorm!
Now, I want to enable PHPUnit, but I can't do it...
I followed several tutorials:
https://blog.mayflower.de/5274-Run-your-tests-with-PHPStorm-on-your-vagrant-box.html
https://confluence.jetbrains.com/display/PhpStorm/Running+PHPUnit+tests+over+SSH+on+a+remote+server+with+PhpStorm
Here are my settings:
Here is the message I receive when running PhpUnit with Code Coverage
vagrant:///Users/julien/Homestead/usr/bin/php -dxdebug.coverage_enable=1 /home/vagrant/.phpstorm_helpers/phpunit.php --coverage-clover /home/vagrant/.phpstorm_helpers/coverage/Laravel_PhpUnit.coverage -- configuration /home/vagrant/Code/vendor/autoload.php /Users/julien/Documents/Proyectos/laravel/tests/functional
Testing started at 11:12 AM ...
bash: line 0: cd: /Users/julien/Documents/Proyectos/laravel/tests/functional: No such file or directory
PHP Fatal error: Uncaught UnexpectedValueException: Cannot create phar '/home/vagrant/Code/vendor/bin', file extension (or combination) not recognised or the directory does not exist in /home/vagrant/.phpstorm_helpers/phpunit.php:181
Stack trace:
Fatal error: Uncaught UnexpectedValueException: Cannot create phar '/home/vagrant/Code/vendor/bin', file extension (or combination) not recognised or the directory does not exist in /home/vagrant/.phpstorm_helpers/phpunit.php on line 181#0 /home/vagrant/.phpstorm_helpers/phpunit.php(181): Phar- >__construct('/home/vagrant/C...')
#1 /home/vagrant/.phpstorm_helpers/phpunit.php(250): IDE_PHPUnit_Loader::init()
#2 {main}
UnexpectedValueException: Cannot create phar '/home/vagrant/Code/vendor/bin', file extension (or combination) not recognised or the directory does not exist in /home/vagrant/.phpstorm_helpers/phpunit.php on line 181
thrown in /home/vagrant/.phpstorm_helpers/phpunit.php on line 181
Call Stack:
0.0006 442920 1. {main}() /home/vagrant/.phpstorm_helpers/phpunit.php:0
0.0006 442920 2. IDE_PHPUnit_Loader::init() /home/vagrant/.phpstorm_helpers/phpunit.php:250
0.0006 451168 3. Phar->__construct() /home/vagrant/.phpstorm_helpers/phpunit.php:181
Process finished with exit code 255
Setting up vagrant with PhpStorm and PHPUnit can be a little bit daunting as it is really not that straight forward... From your console output I'd say that your interpreter setting is not correct since it executes PHP on your local machine.
The way that always worked for me was setting up vagrant as SFTP Deployment Configuration and use that configuration as PHP interpreter. As you are already using Homesteasd, these tutorials might shed some more light onto the setup:
Setting up PhpStorm with Vagrant on a Laravel Homestead box
Setting up Laravel with PHPUnit on Vagrant in PhpStorm
Here are the essential parts:

Resources