Closed Haravikk closed 7 years ago
What do you mean by "class is not available". does it simply say "Class 'Weakref' not found" ?
Are you sure you check phpinfo() under the same conditions in which you try to use weakref ? If the extension is loaded then Weakref should be available.
Ack, I'm just an idiot; I only loaded the module under fpm but I do a lot of my testing via command line, me being the fool I am viewed PHP info through a browser (fpm) not realising it's the command line setup that was the problem.
Anyway, I've got it loading just fine now, apologies for the waste of time!
aha! Nice to hear there is no real problem!
So I was excited to see that WeakRef is now available to install for php 7, but it's been so long since I actually installed WeakRef I'm not sure if I'm missing a step.
I installed WeakRef via
pecl
as it seemed the easiest way, and addedextension=weakref.so
in a file under/etc/php/7.0/fpm/conf.d
, which seemed the neatest place to put it.When I look in
phpinfo()
I can verify that Weakref is loaded, but the class is not available for use. Are there any additional requirements that I may be missing?