Differenze

Queste sono le differenze tra la revisione selezionata e la versione corrente della pagina.

howto:installation [2008/08/23 20:49] (versione corrente)
gchiesa created
Linea 1: Linea 1:
 +====== Installation ======
 +MFCobol extension is compatible with PECL extension system ( http://pecl.php.net). 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:
 +<code>
 +$ tar xzf mfcobol_0.103.0b.tar.gz
 +$ cd MFCobol
 +$ phpize
 +$ ./configure
 +$ make
 +$ sudo make install
 +</code>
 +\\
 +\\
 +Now your extension is installed in php extensions dir. To test extension create a **test.php** file with this code:
 +<code php>
 +<?php
 +
 +$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";
 +?>
 +</code>
 +\\
 +\\
 +And type:
 +\\
 +<code>
 +$ php -q test.php
 +</code>
 +
howto/installation.txt · Ultima modifica: 2008/08/23 20:49 da gchiesa