PHP Extension Builder _php Tutorial

Source: Internet
Author: User
Tags pear
The first method: Use the PHP source package comes with the Ext_skel tool. ~/public_html/php-5.3.13/ext>./ext_skel--extname=sample11creating directory sample11creating basic files: Config.m4 config.w32. Svnignore sample11.c php_sample11.h CREDITS experimental TESTS/001.PHPT sample11.php [done]. To use your new extension, you'll have to execute the following steps:1. $ CD. 2. $ VI ext/sample11/config.m43. $./buildconf4. $./configure--[with|enable]-sample115. $ make6. $./php-f EXT/SAMPLE11/SAMPLE11.PHP7. $ VI ext/sample11/sample11.c8. $ make Repeat steps 3-6 until you be satisfied with EXT/SAMPLE11/CONFIG.M4 Andstep 6 confirms this your module is compile D into PHP. Then, start Writingcode and repeat the last two steps as often as necessary. The second method: Use Codegen_pecl. /usr/local/services/php/bin> sudo./pear Install codegen_pecldownloading codegen_pecl-1.1.3.tgz ... Starting to download codegen_pecl-1.1.3.tgz (102,640 bytes) ..... done:102,640 bytesinstall OK:--------- channel://pear.php.net/codegen_pecl-1.1.3/usr/local/services/php/bin> sudo ln-s/usr/local/services/php/bin/pecl-gen/usr/local/bin/~/public_html/ php-5.3.13/ext> Pecl-gen--extname=sample12 Strict standards:declaration of codegen_pecl_element_constant:: Docfooter () should is compatible with that of codegen_element::d ocfooter () in/usr/local/services/php/lib/php/codegen/ pecl/element/constant.php on line 341 Strict standards:declaration of Codegen_pecl_element_resource::hcode () should is C Ompatible with that of Codegen_element::hcode () in/usr/local/services/php/lib/php/codegen/pecl/element/resource.php On line 354 Strict standards:declaration of Codegen_pecl_element_ini::d Ocfooter () should is compatible with that of codeg En_element::d ocfooter () in/usr/local/services/php/lib/php/codegen/pecl/element/ini.php on line 443 Strict Standards: Declaration of Codegen_pecl_element_logo::hcode () should is compatible with that of Codegen_element::hcode () In/usr/loca l/services/php/lib/php/codegen/pecl/element/logo.php on line 259 Strict standards:declaration of Codegen_pecl_element_method::setcode () should be compatible with that of Codegen_pecl_el Ement_function::setcode () in www.2cto.com/usr/local/services/php/lib/php/CodeGen/PECL/Element/Method.php on line 471 Strict standards:declaration of Codegen_pecl_element_stream::hcode () should be compatible with that of codegen_elemen T::hcode () in/usr/local/services/php/lib/php/codegen/pecl/element/stream.php on line 239 Your extension have been Created in directory./sample12. See./sample12/readme and/or./sample12/install for further instructions. Note: Error "Strict standards:declaration of [...] should be compatible with that of [...] in [...] " Because php5.3.0+ requires that the subclass declaration must be declared in the parent class, modify the php.ini directly. error_reporting = e_all & ~e_strict above just gives the simplest commands for generating PHP extensions, Ext_skel and Pecl-gen also support a variety of parameters to generate richer extensions, please refer to the relevant Help documentation yourself. ~/public_html/php-5.3.13/ext>./ext_skel--help~/public_html/php-5.3.13/ext> Pecl-gen--help

http://www.bkjia.com/PHPjc/477772.html www.bkjia.com true http://www.bkjia.com/PHPjc/477772.html techarticle The first method: Use the PHP source package comes with the Ext_skel tool. ~/public_html/php-5.3.13/ext./ext_skel--extname=sample11 Creating directory sample11 Creating Basic FILES:CONFIG.M4 ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.