Static array & PHP CLI

From: Date: Mon, 25 Jun 2012 15:13:31 +0000
Subject: Static array & PHP CLI
Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-9541@lists.php.net to get a copy of this message
Hi, I try to write a PHP extension to improve performance on some part of the PHP framework named Photon[1]. Photon is a application server which run behind mongrel2 web server[2], so i use PHP CLI only, and never PHP CGI. One of the basic class of this framework is the configuration container, which contains a static associative array, and accesors. I have attached the class implemented in PHP. So, i have successively create : - a extension - a class into a namespace - add a zval into this class But i failed to create / use a PHP assoc array into this class. Most of the time is crash when the process is killed. I thinks i have some error near persistent or not memory allocation, because array_init call zend_hash_init with persitant = 0 Does this concept exist in PHP CLI, or is for PHP CGI only ? This is my first experience with a PHP extension. Does someone have good paper about writing PECL ? I have read this one http://devzone.zend.com/303/extension-writing-part-i-introduction-to-php-and-zend/ If someone can share code about persistent array manipulation into a PECL, i will be very happy ;) Thanks, William MARTIN [1] http://www.photon-project.com/ [2] http://www.mongrel2.org/

Attachment: [application/x-httpd-php] config.php
« previous php.pecl.dev (#9541) next »