Symfony serve looks for PHP libraries at the wrong place

277 views Asked by At

I had previously multiple installations of PHP on my computer. I deleted all of them and reinstalled php from the official source which is now found at C:\\php.

The symfony serve command (ran from PhpStorm console) looks for missing modules in the wrong directory. (I don't even have xampp anymore, but even if I copy the files to the location it tries, it doesn't work) Xampp folder is not in my Path env variable either.

Warning: PHP Startup: Unable to load dynamic library 'php_ftp.dll' (tried: C:\xampp\php\ext\php_ftp.dll (The specified procedure could not be found.), C:\xampp\php\ext\php_php_ftp.dll.
dll (The specified module could not be found.)) in Unknown on line 0

Any ideas on this?

2

There are 2 answers

0
Rápli András On BEST ANSWER

First problem turns out to be that PhpStorm does not see my PHP installations on C: for some kind of weird permission error. (PATH was correct).

The compiled Windows version of PHP downloaded from php.net defaults the extension folder to C:/php, which had to be overriden using php.ini's extension_dir="D:/php/ext" directive.

1
Indra On

run symfony local:php:refresh to fetch available PHP version of your systems. local:php:list for list locally available PHP versions