• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..05-Dec-2015-

examples/H05-Dec-2015-1,202766

tests/H05-Dec-2015-1,2241,138

.gitignoreH A D05-Dec-2015178 1716

CREDITSH A D05-Dec-201510 32

LICENSEH A D05-Dec-20151 KiB2016

READMEH A D05-Dec-20152 KiB7447

config.m4H A D05-Dec-20153 KiB9985

config.w32H A D05-Dec-2015506 2416

mecab.dspH A D05-Dec-20154.4 KiB11393

mecab5.cH A D05-Dec-2015104.9 KiB3,7142,110

mecab7.cH A D05-Dec-201592.7 KiB3,3421,814

package.phpH A D05-Dec-20152.8 KiB9075

package.xmlH A D05-Dec-201518.7 KiB248247

php_mecab.hH A D05-Dec-20154.2 KiB203127

php_mecab_compat5.hH A D05-Dec-20154.7 KiB145125

php_mecab_compat7.hH A D05-Dec-20152.8 KiB8164

README

1This is a standalone PHP extension created using CodeGen_PECL 1.0.0
2
3HACKING
4=======
5
6There are two ways to modify an extension created using CodeGen_PECL:
7
81) you can modify the generated code as with any other PHP extension
9
102) you can add custom code to the CodeGen_PECL XML source and re-run pecl-gen
11
12The 2nd approach may look a bit complicated but you have be aware that any
13manual changes to the generated code will be lost if you ever change the
14XML specs and re-run PECL-Gen. All changes done before have to be applied
15to the newly generated code again.
16Adding code snippets to the XML source itself on the other hand may be a
17bit more complicated but this way your custom code will always be in the
18generated code no matter how often you rerun CodeGen_PECL.
19
20
21BUILDING ON UNIX etc.
22=====================
23
24To compile your new extension, you will have to execute the following steps:
25
261.  $ ./phpize
272.  $ ./configure [--with-mecab]
283.  $ make
29[4. $ make test ] # NOTE: this doesn't work right now *)
305.  $ [sudo] make install
31
32*) this is a general problem with "make test" and standalone extensions
33   (that is being worked on) so please don't blame CodeGen_PECL for this
34
35
36
37BUILDING ON WINDOWS
38===================
39
40The extension provides the VisualStudio V6 project file
41
42  mecab.dsp
43To compile the extension you open this file using VisualStudio,
44select the apropriate configuration for your installation
45(either "Release_TS" or "Debug_TS") and create "php_mecab.dll"
46
47After successfull compilation you have to copy the newly
48created "php_mecab.dll" to the PHP
49extension directory (default: C:\PHP\extensions).
50
51
52TESTING
53=======
54
55You can now load the extension using a php.ini directive
56
57  extension="php_mecab.[so|dll]"
58
59or load it at runtime using the dl() function
60
61  dl("php_mecab.[so|dll]");
62
63The extension should now be available, you can test this
64using the extension_loaded() function:
65
66  if (extension_loaded(mecab))
67    echo "mecab loaded :)";
68  else
69    echo "something is wrong :(";
70
71The extension will also add its own block to the output
72of phpinfo();
73
74