Tiny Core Linux
Tiny Core Extensions => TCE Talk => Topic started by: bonbob on November 10, 2018, 08:36:29 AM
-
Is it possible add an Sync support to php7 extension pack?
read more about Sync: http://php.net/manual/en/book.sync.php (http://php.net/manual/en/book.sync.php)
-
This is not part of the standard PHP source distribution. I have compiled it as a separate extension for 9.x 64-bit (you didn't specify version or arch). It loads on my test system, but I do not have any PHP code to test it. Can you supply some test cases?
-
I'll test it, but now i run 32-bit version TinyCore on my server.
-
The php7-pecl-sync.tcz extension for both 32-bit and 64-bit is in the repository now. I would still like to see some use/test cases.
-
I have installed extension for 32-bit version, restart php7-fpm server but extension not appear:
PHP Fatal error: Uncaught Error: Class 'SyncEvent' not found in...
-
Is this when PHP starts, or when you try to use one of the sync functions? Can you post the rest of the message? If it's a PHP script, can you post that too?
-
It appeares when i run script with Simple Example from php.net
<?php
// In a web application:
$event = new SyncEvent("GetAppReport");
$event->fire();
-
Using this:
<?php
// In a web application:
$event = new SyncEvent("GetAppReport");
$event->fire();
var_dump($event);
I get this:
object(SyncEvent)#1 (0) { }
You did remember to add the extension to your php.ini file? It won't load automagically, because I wasn't clever enough at the time I cobbled the tcz together to include an /usr/local/etc/php7/extensions/sync.ini file with it. Maybe I'll remember if I rebuild it for PHP 7.3.
-
You did remember to add the extension to your php.ini file? It won't load automagically
Yep! I added extension=sync.so to php.ini and sync support has appeared. Thanks!