0

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?

RCDAWebmaster
  • 319
  • 5
  • 17
  • This is a server config question rather than a coding question, and has nothing to do with PHPMailer specifically (all scripts would fail), so I suggest moving this Q to Server Fault. It sounds like your PHP installation is not complete. You can either install the ODBC extension DLL, or disable it in your php.ini. – Synchro Oct 24 '18 at 20:13

1 Answers1

0

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

RCDAWebmaster
  • 319
  • 5
  • 17
  • This has *nothing* to do with composer, or coding in PHP. It's how PHP itself is installed & configured on Windows, which is very much a second-rate experience compared with using it on Linux. – Synchro Oct 25 '18 at 15:35