unable to download composer for xampp version 7.2.0 - php

Greeting developers, I want to learn laravel framework for my project. For that i follow some instruction in google to install it . i should have composer to install it. i try to download composer but there have some errors.the error is
The PHP exe file you specified did not run correctly:
C:\xampp\php\php.exe
The php.ini used by your command-line PHP is: C:\xampp\php\php.ini
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_mysql.dll' (tried: C:\xampp\php\ext\php_mysql.dll (The specified module could not be found.
), C:\xampp\php\ext\php_php_mysql.dll.dll (The specified module could not be found.
)) in Unknown on line 0
i try to resolve it. i check the php.ini file all looking good only. Is that because of i am using xampp server 7.2.0. I am really need a solution.

Looks like you made a mistake on your php.ini somewhere, this route:
C:\xampp\php\ext\php_php_mysql.dll.dll
... doesnt look at all correct. "php_php" ".dll.dll"

Related

How to fix PHP Warning: PHP Startup: Unable to load dynamic library 'xxx/xxx/yaf.so'?

[26-Nov-2021 21:49:17 Asia/Shanghai] PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php/php5.6.40/lib/php/extensions/no-debug-non-zts-20131226/yaf.so' - dlopen(/Applications/MAMP/bin/php/php5.6.40/lib/php/extensions/no-debug-non-zts-20131226/yaf.so, 0x0009): tried: '/Applications/MAMP/bin/php/php5.6.40/lib/php/extensions/no-debug-non-zts-20131226/yaf.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/yaf.so' (no such file) in Unknown on line 0
You are loading the incorrect version for your PHP Version.
if this is Yet Another Framework
You can only use this on the version of PHP is created for.
for example if your PHP Version is 5.3
You would need a yaf.so to match PHP 5.3
Looking on there GIT this is a 5.2 build, so your PHP Version needs to match this.
Personally i would ditch the 5.3 you are running and install 7.0.
5.3 is very dated, pointless developing anything based on this.
When you have the right version, Place this inside your ext folder in PHP.
Edit your PHP.ini file
add in:
extension=yaf.so
Ensure your extension_dir is configured correctly too:
extension_dir = "ext"
your yaf should be in the same folder as the extension dir, just ensure extension is built for the PHP version you are using, they are not cross compatible

Trouble installing composer for PHP 7 on windows to get PHPmailer

I want to add phpmail to my php Server. The server is a windows machine. I searched for it and found out that the best way to install it is with composer. I'm having trouble getting composer to install due to php.ini issues.
I am getting the following error:
*The PHP exe file you specified did not run correctly:
C:\php\php.exe
The php.ini used by your command-line PHP is: C:\Windows\php.ini
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 'c:\php\ext\pdo_odbc' - The specified module could not be found.
in Unknown on line 0*
I tried searching the net for pdo_odbc but am not sure what I'm looking for. where can I get the missing dll?
I finally got composer to install. I had to first, rename the ODBC DLL from PHP_pdo_odbc.dll to pdo_odbc.dll. Then I got a message about SSL not being enabled. I first had to enable it in php.ini. Again I had to rename the DLL for SSL from PHP_openssl.dll to openssl.dll. Then Composer installed. Why did PHP install with the DLL's named differently than composer was expecting? Or is this a composer issue or the fact that it's PHP on windows? From there I installed PHPmailer and sent my first piece of mail. This is so much more complicated than coding in .Net

error to install composer because of php file

Greeting developers, I want to learn laravel framework for my project. For that i follow some instruction in google to install it . i should have composer to install it. i try to download composer but there have some errors.the error is:
The PHP exe file you specified did not run correctly:
C:\xampp\php\php.exe
The php.ini used by your command-line PHP is:
C:\xampp\php\php.ini
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_mysql.dll' (tried: C:\xampp\php\ext\php_mysql.dll (The specified module could not be found.
), C:\xampp\php\ext\php_php_mysql.dll.dll (The specified module could not be found.
)) in Unknown on line 0
i try to resolve it. i check the php.ini file all looking good only. Is that because of i am using xampp server 7.2.0. I am really need a solution.
Turning the comment by ArtisticPhoenix into an answer.:
I would say the opposite, you need to remove it (comment it out with ;php_mysql.dll) from the php.ini. Because its been deprecated and "removed" in PHP7. Also just looking at what you posted C:\xampp\php\ext\php_php_mysql.dll.dll php_php_mysql.dll.dll ? seems weird. Double you fun, 2 php_ and dll extensions... lol
ArtisticPhoenix Sep 29 '18 at 7:54
I tested it successful.

PHP error when creating a new symfony project using composer

My problem is when I create a new Symfony 3.4 project with Composer.
I will enter the following command:
composer create-project symfony/website-skeleton projectName
When composer begins to create the project it will give me the following warnings:
PHP Warning: PHP Startup: Unable to load dynamic library 'php_openssl' (tried: C:\php\ext\php_openssl (The specified module could not be found.
), C:\php\ext\php_php_openssl.dll (The specified module could not be found.
)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'php_openssl' (tried: C:\php\ext\php_openssl (The specified module could not be found.
), C:\php\ext\php_php_openssl.dll (The specified module could not be found.
)) in Unknown on line 0
[Composer\Exception\NoSslException]
The openssl extension is required for SSL/TLS protection but is not available. If you can not enable the openssl extension, you can disable this error, at your own risk, by setting the 'disable-tls' option to true.
From my understanding, SSL is encryption for websites. At a judgment, I think the problem is composer cannot download Symfony securely.By telling me to try disabling TLS I think means trying to download Symfony insecurely since TLS is another form of encryption.
I have never had this problem with Composer before, I can not think of anything I have changed for this problem to occur.
If anyone has come across this problem or knows of any solutions that would be greatly appreciated because I cannot work on existing projects because of this.
EDIT:
The file path it is looking down is incorrect, it should check down "C:\wamp\bin\php\php7.2.1\ext" and not "C:\php\ext\" as this file path does not exist. I am unsure how to adjust this.
Go to that location and edit the file named: php.ini
Uncomment the line extension=php_openssl.dll by removing the semicolon at the beginning.
Restart your server
Locate your php.ini and adjust extension_dir according to your needs. You can find more info here.

yaml xampp warning: Unable to load dynamic library 'C:\xampp\php\ext\php_yaml.dll'

I installed the recent versions of xampp for windows and yaml on my PC with windows 8.1 64bit.
The versions were
xampp-win32-7.0.9-1-VC14-installer.exe
php_yaml-2.0.0rc8-7.0-ts-vc14-x86.zip
I put the line of extension=php_yaml.dll to the end of php.ini file.
I copied php_yaml.dll to C:/xampp/php/ext folder.
I copied yaml.dll to C:/xampp/apache/bin folder.
phpinfo(); command displayed that yaml was enabled.
But bad warning still appeared on command prompt when typing php command:
$ php
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_yaml.dll' - The spec
ified module could not be found.
in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_yaml.dll' - The specified
module could not be found.
in Unknown on line 0
See it on screenshots:
How to fix it?
Add ;C:\xampp\apache\bin to PATH Windows environment variable.
I fixed mine by downloading the correct version of yaml. The yaml Version has to match the installed PHP version. Make sure that you match the thread-safe and non-thread-safe option with your PHP aswell.
How to check if your PHP is thread-safe

Categories