Trouble installing composer for PHP 7 on windows to get PHPmailer

167 Views Asked by At

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?

1

There are 1 best solutions below

1
On

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