Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pecl install of sqlsrv & pdo_sqlsrv on MacOSC Catalina fails due to missing /usr/local/lib/php/pecl directory #1186

Closed
sbreakey opened this issue Sep 3, 2020 · 3 comments

Comments

@sbreakey
Copy link

sbreakey commented Sep 3, 2020

Client operating system

Mac OSX Catalina Version 10.15.6 (19G2021)

PHP version

% php -v
PHP 7.4.9 (cli) (built: Aug  7 2020 19:23:06) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

Problem description

Following the instructions for OSX installation in this repo, the sudo pecl install sqlsrv command claims to complete successfully but shows a couple warnings:

Build process completed successfully
Installing '/usr/local/Cellar/php/7.4.9/pecl/20190902/sqlsrv.so'

Warning: mkdir(): File exists in System.php on line 294

Warning: mkdir(): File exists in /usr/local/Cellar/php/7.4.9/share/php/pear/System.php on line 294
ERROR: failed to mkdir /usr/local/Cellar/php/7.4.9/pecl/20190902

/usr/local/Cellar/php/7.4.9/pecl is a symlnk:
lrwxr-xr-x 1 StephenB staff 23B Sep 2 21:07 pecl -> /usr/local/lib/php/pecl

However the pecl directory does not exist in /usr/local/lib/php/
I manually created it with sudo mkdir /usr/local/lib/php/pecl and re-ran sudo pecl install sqlsrv which now completes without warnings:

Build process completed successfully
Installing '/usr/local/Cellar/php/7.4.9/pecl/20190902/sqlsrv.so'
install ok: channel://pecl.php.net/sqlsrv-5.8.1
Extension sqlsrv enabled in php.ini

I'm no expert here, so it's entirely possible this is a quirk due to something I did incorrectly. Thought I'd raise it here in case it isn't.

@sbreakey sbreakey changed the title pecl install of sqlsrv & pdo_sqlsrv on MacOSC Catalina fails due to missing dirs pecl install of sqlsrv & pdo_sqlsrv on MacOSC Catalina fails due to missing /usr/local/lib/php/pecl directory Sep 3, 2020
@sbreakey
Copy link
Author

sbreakey commented Sep 3, 2020

Seems maybe this is a general thing with PECL and of no relevance here?
https://patriqueouimet.ca/tip/installing-php-and-pecl-extensions-on-macos

@yitam
Copy link
Contributor

yitam commented Sep 3, 2020

Thank you @sbreakey for reporting this.
It seems to be a common issue even though I haven't seen it myself.

I will add this to our FAQ.

@yitam
Copy link
Contributor

yitam commented Sep 15, 2020

Closing this issue now @sbreakey. Please feel free to reopen this if necessary.

@yitam yitam closed this as completed Sep 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants