-
Notifications
You must be signed in to change notification settings - Fork 14
/
INSTALL
55 lines (35 loc) · 1.42 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
This is a standalone PHP extension created using CodeGen_PECL 1.1.3dev
HACKING
=======
There are two ways to modify an extension created using CodeGen_PECL:
1) you can modify the generated code as with any other PHP extension
2) you can add custom code to the CodeGen_PECL XML source and re-run pecl-gen
The 2nd approach may look a bit complicated but you have be aware that any
manual changes to the generated code will be lost if you ever change the
XML specs and re-run PECL-Gen. All changes done before have to be applied
to the newly generated code again.
Adding code snippets to the XML source itself on the other hand may be a
bit more complicated but this way your custom code will always be in the
generated code no matter how often you rerun CodeGen_PECL.
BUILDING ON UNIX etc.
=====================
To compile your new extension, you will have to execute the following steps:
1. $ ./phpize
2. $ ./configure [--with-uuid=...]
3. $ make
4. $ make test
5. $ [sudo] make install
TESTING
=======
You can now load the extension using a php.ini directive
extension="uuid.[so|dll]"
or load it at runtime using the dl() function
dl("uuid.[so|dll]");
The extension should now be available, you can test this
using the extension_loaded() function:
if (extension_loaded("uuid"))
echo "uuid loaded :)";
else
echo "something is wrong :(";
The extension will also add its own block to the output
of phpinfo();