1 This is a standalone PHP extension created using CodeGen_PECL 1.1.2
6 There are two ways to modify an extension created using CodeGen_PECL:
8 1) you can modify the generated code as with any other PHP extension
10 2) you can add custom code to the CodeGen_PECL XML source and re-run pecl-gen
12 The 2nd approach may look a bit complicated but you have be aware that any
13 manual changes to the generated code will be lost if you ever change the
14 XML specs and re-run PECL-Gen. All changes done before have to be applied
15 to the newly generated code again.
16 Adding code snippets to the XML source itself on the other hand may be a
17 bit more complicated but this way your custom code will always be in the
18 generated code no matter how often you rerun CodeGen_PECL.
24 To compile your new extension, you will have to execute the following steps:
27 2. $ ./configure [--enable--phpCairo]
30 5. $ [sudo] make install
37 The extension provides the VisualStudio V6 project file
40 To compile the extension you open this file using VisualStudio,
41 select the apropriate configuration for your installation
42 (either "Release_TS" or "Debug_TS") and create "php_phpCairo.dll"
44 After successfull compilation you have to copy the newly
45 created "phpCairo.dll" to the PHP
46 extension directory (default: C:\PHP\extensions).
52 You can now load the extension using a php.ini directive
54 extension="phpCairo.[so|dll]"
56 or load it at runtime using the dl() function
58 dl("phpCairo.[so|dll]");
60 The extension should now be available, you can test this
61 using the extension_loaded() function:
63 if (extension_loaded("phpCairo"))
64 echo "phpCairo loaded :)";
66 echo "something is wrong :(";
68 The extension will also add its own block to the output