Method 1: Use the ext_skel tool that comes with the PHP source package. ~ /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 will have to execute the following steps: 1. $ cd .. 2. $ vi ext/sample11/config. m43. $. /buildconf4. $. /configure -- [with | enable]-sample115. $ make 6. $. /php-f ext/sample11/sample11.php7. $ vi ext/sample11/sample11.c8. $ make Repeat steps 3-6 until you are satisfied with ext/sample11/config. m4 andstep 6 confirms that your module is compiled into PHP. then, start writingcode and repeat the last two steps as often as necessary. method 2: 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 () shocould be compatible with that of CodeGen_Element: docFooter () in/usr/local/services/php/lib/php/CodeGen/PECL/Element/Constant. php on line 341 Strict Standards: Declaration of CodeGen_PECL_Element_Resource: hCode () shocould be compatible with that of CodeGen_Element: h Code () in/usr/local/services/php/lib/php/CodeGen/PECL/Element/Resource. php on line 354 Strict Standards: Declaration of CodeGen_PECL_Element_Ini: docFooter () shocould be compatible with that of CodeGen_Element: docFooter () in/usr/local/services/php/lib/php/CodeGen/PECL/Element/Ini. php on line 443 Strict Standards: Declaration of CodeGen_PECL_Element_Logo: hCode () shocould be compatible with that CodeGen_Element: hCode () in/usr/local/services/php/lib/php/CodeGen/PECL/Element/Logo. php on line 259 Strict Standards: Declaration of CodeGen_PECL_Element_Method: setCode () shocould be compatible with that of CodeGen_PECL_Element_Function: setCode () in compliance on line 471 Strict Standards: Declaration of Compliance: HCode () shocould be compatible with that of CodeGen_Element: hCode () in/usr/local/services/php/lib/php/CodeGen/PECL/Element/Stream. php on line 239 Your extension has been created in directory. /sample12.See. /sample12/README and/or. /sample12/INSTALL for further instructions. note: The error "Strict Standards: Declaration of […] Shocould be compatible with that of […] In […]" PHP5.3.0 + requires that the subclass Declaration must be in the parent class. Modify php. ini directly. Error_reporting = E_ALL &~ The E_STRICT command above only provides the simplest command to generate PHP extensions. ext_skel and pecl-gen also support multiple parameters to generate more extensive extensions. Please refer to the relevant help documentation. ~ /Public_html/php-5.3.13/ext>./ext_skel -- help ~ /Public_html/php-5.3.13/ext> pecl-gen -- help