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

Issue with Homebrew php70-timecop #40

Open
RopoMen opened this issue Jun 4, 2018 · 3 comments
Open

Issue with Homebrew php70-timecop #40

RopoMen opened this issue Jun 4, 2018 · 3 comments

Comments

@RopoMen
Copy link

RopoMen commented Jun 4, 2018

Hi,

I have been able to install php70-timecop sometime ago, but currently it is giving error.

brew install homebrew/php/php70-timecop        

Updating Homebrew...
Error: homebrew/php was deprecated. This tap is now empty as all its formulae were migrated.
@JoeHopping
Copy link

Hi,

Was this issue ever figured out? I'm having the same issue.

@loilo
Copy link

loilo commented Mar 9, 2020

The whole PHP/Homebrew story changed a while ago. Extensions are no longer available via Homebrew but should be installed via PECL:

pecl install timecop-1.2.10

Afterwards I had to adjust my php.ini because the extension was automatically inserted there, but with an incorrect path.

The correct path to the timecop.so should be printed at the end of the above PECL install command. Mine looked like this:

[...]

Build process completed successfully
Installing '/usr/local/Cellar/[email protected]/7.2.22_1/pecl/20170718/timecop.so'
install ok: channel://pecl.php.net/timecop-1.2.10
Extension timecop enabled in php.ini

So I had to open my php.ini and replace

extension="timecop.so"

with

extension="/usr/local/Cellar/[email protected]/7.2.22_1/pecl/20170718/timecop.so"

Hope this helps.

@metaxenology
Copy link

metaxenology commented Feb 27, 2024

@loilo
Tried with above on MacOS with M1 chip but it fails, with the following error:

/private/tmp/pear/temp/timecop/php_timecop.h:183:32: note: expanded from macro 'call_php_method_with_0_params'
        _call_php_method_with_0_params(obj, ce, method_name, retval TSRMLS_CC)
                                      ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make: *** [timecop_php7.lo] Error 1
ERROR: `make' failed```




Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants