Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:25849 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56448 invoked by uid 1010); 28 Sep 2006 07:45:23 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 56432 invoked from network); 28 Sep 2006 07:45:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Sep 2006 07:45:23 -0000 Received: from [127.0.0.1] ([127.0.0.1:25652]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id FD/A5-30481-29D7B154 for ; Thu, 28 Sep 2006 03:45:22 -0400 X-Host-Fingerprint: 212.77.172.62 unknown Received: from [212.77.172.62] ([212.77.172.62:7668] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 57/D8-08641-D099A154 for ; Wed, 27 Sep 2006 11:30:23 -0400 Message-ID: <57.D8.08641.D099A154@pb1.pair.com> To: internals@lists.php.net Date: Wed, 27 Sep 2006 17:30:13 +0200 User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 212.77.172.62 Subject: [PHP Guru question]: run php script from within pecl extension From: Roland.Schwingel@onevision.com (Roland Schwingel) Hi... For several reasons I need to call a php script every x minutes. I need that on several platforms so I started to write a pecl extension that implements something like a cron service. I am running my php 5.1.5 always together with apache 2.2.3. So I made a small pecl that spawns a thread using apache apr functions. In this thread I want to call a php script, so I do this whenever the time to execute the script is reached: TSRMLS_FETCH(); zend_file_handle zfd; zfd.type = ZEND_HANDLE_FILENAME; zfd.filename = zfd.free_filename = 0; zfd.opened_path = NULL; php_execute_script(&zfd TSRMLS_CC); Obviously I miss something in initing php, because php crashes in main/streams/streams.c function php_stream_locate_url_wrapper() when I call php_execute_script() because the variable 'wrapper_hash' inited at the very beginning in that function appears to become a bad value. So I hope someone here can help me or give me some pointers to get help... Thanks in advance, Roland