0

I'm trying to run a PHP script from command line but I get an error telling me the system is looking for PHP in C:\php7\ but PHP is actually in C:\wamp64\bin\php\php7.2.4

Warning: PHP Startup: Unable to load dynamic library 'bz2' (tried: C:\php7\ext\bz2) (The specified module cannot be found.), C:\php7\ext\php_bz2.dll (The specified module cannot be found.)) in Unknown on line 0

I get the same warning for EVERY module

I've changed the path as directed here (Adding directory to PATH Environment Variable in Windows) but it seems to just keep looking for it in the other directory.

I've restarted all processes, the problem persists. I've rebooted, the problem persists. Any ideas?

Additionally, when I type PATH into command line, the correct path C:\wamp64\bin\php\php7.2.4 is returned in the list of paths and C:\php7 is not

John Doesoph
  • 13
  • 1
  • 6

1 Answers1

0

The solution was inside the php.ini file.

I changed extension_dir ="c:/php7/ext/" to extension_dir ="c:/wamp64/bin/php/php7.2.4/ext/"

John Doesoph
  • 13
  • 1
  • 6