Debian Codegraph @

php/README

raw
1 This is a standalone PHP extension created using CodeGen_PECL 1.1.3
2
3 HACKING
4 =======
5
6 There are two ways to modify an extension created using CodeGen_PECL:
7
8 1) you can modify the generated code as with any other PHP extension
9
10 2) you can add custom code to the CodeGen_PECL XML source and re-run pecl-gen
11
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.
19
20
21 BUILDING ON UNIX etc.
22 =====================
23
24 To compile your new extension, you will have to execute the following steps:
25
26 1. $ ./phpize
27 2. $ ./configure [--with-libsixel=...]
28 3. $ make
29 4. $ make test
30 5. $ [sudo] make install
31
32
33
34 BUILDING ON WINDOWS
35 ===================
36
37 The extension provides the VisualStudio V6 project file
38
39 sixel.dsp
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_sixel.dll"
43
44 After successfull compilation you have to copy the newly
45 created "sixel.dll" to the PHP
46 extension directory (default: C:\PHP\extensions).
47
48
49 TESTING
50 =======
51
52 You can now load the extension using a php.ini directive
53
54 extension="sixel.[so|dll]"
55
56 or load it at runtime using the dl() function
57
58 dl("sixel.[so|dll]");
59
60 The extension should now be available, you can test this
61 using the extension_loaded() function:
62
63 if (extension_loaded("sixel"))
64 echo "sixel loaded :)";
65 else
66 echo "something is wrong :(";
67
68 The extension will also add its own block to the output
69 of phpinfo();
70