Hello,
I've followed the Laravel Valet docs, and the PHP and MySQL steps worked great. But when i type valet install i get those error messages:
PHP Warning: Module 'zip' already loaded in Unknown on line 0
PHP Warning: Module 'zip' already loaded in Unknown on line 0
PHP Parse error: syntax error, unexpected 'zip' (T_STRING), expecting ')' in Command line code on line 2
Password:
PHP Warning: Module 'zip' already loaded in Unknown on line 0
PHP Warning: Module 'zip' already loaded in Unknown on line 0
PHP Parse error: syntax error, unexpected 'zip' (T_STRING), expecting ')' in Command line code on line 2
PHP Warning: Module 'zip' already loaded in Unknown on line 0
Warning: Module 'zip' already loaded in Unknown on line 0
Could not open input file:
Warning: Module 'zip' already loaded in Unknown on line 0
Parse error: syntax error, unexpected 'zip' (T_STRING), expecting ')' in Command line code on line 2/cli/valet.php
Is there maybe a package installed with homebrew that i have to remove?.
I'm not sure what to do :(..
Observations:
My OS is Mac OS Catalina, the installed PHP Version from brew is 7.4, and my PHP CLI version is 7.3.11. And in my /usr/local/etc/php folder i only have the 4.3 folder.
Edit: And in my /usr/bin Folder are those three files: php, phpize, and php-config.
I tryed to delete the /usr/bin/php file (But i created a backup of that file), and now if i type php --ini i get this error:
php --ini
PHP Warning: Module 'zip' already loaded in Unknown on line 0
Warning: Module 'zip' already loaded in Unknown on line 0
Configuration File (php.ini) Path: /usr/local/etc/php/7.4
Loaded Configuration File: /usr/local/etc/php/7.4/php.ini
Scan for additional .ini files in: /usr/local/etc/php/7.4/conf.d
Additional .ini files parsed: /usr/local/etc/php/7.4/conf.d/ext-opcache.ini,
/usr/local/etc/php/7.4/conf.d/php-memory-limits.ini
And php -v says:
php -v
PHP Warning: Module 'zip' already loaded in Unknown on line 0
Warning: Module 'zip' already loaded in Unknown on line 0
PHP 7.4.5 (cli) (built: Apr 18 2020 03:17:54) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.5, Copyright (c), by Zend Technologies
And its fixed! @drbyte :blush:
Removing extension="zip.so" from /usr/local/etc/php/7.4/php.ini was the solution.
You'll probably want to figure out why the extension was already loaded, since normally "the" place it's loaded is from php.ini, and thus you'll run into the same problem again if you switch PHP versions.
Nevertheless, I'm glad you've found some sort of solution for your unique case.
Please click "Close" below to close the issue.
Most helpful comment
And its fixed! @drbyte :blush:
Removing
extension="zip.so"from/usr/local/etc/php/7.4/php.iniwas the solution.