Strumenti Utente

Strumenti Sito



MFCobol extension is compatible with PECL extension system ( So the compilation and installation process is really simple.
First, you must have phpize utility in your system. Tipically you can found it in package php5-dev (in most debian based systems).

To compile and install extension type into terminal:

$ tar xzf mfcobol_0.103.0b.tar.gz
$ cd MFCobol
$ phpize
$ ./configure
$ make
$ sudo make install

Now your extension is installed in php extensions dir. To test extension create a test.php file with this code:

$br = (php_sapi_name() == "cli")? "":"<br>";
if(!extension_loaded('mfcobol')) {
      dl('mfcobol.' . PHP_SHLIB_SUFFIX);
$module = 'mfcobol';
$functions = get_extension_funcs($module);
echo "Functions available in the test extension:$br\n";
foreach($functions as $func) {
      echo $func."$br\n";
echo "$br\n";
$function = 'confirm_' . $module . '_compiled';
if (extension_loaded($module)) {
      $str = $function($module);
} else {
      $str = "Module $module is not compiled into PHP";
echo "$str\n";

And type:

$ php -q test.php
howto/installation.txt · Ultima modifica: 2008/08/23 18:49 da gchiesa