php lapack library

Discussion in 'General' started by Arianna, Nov 7, 2018.

  1. Arianna

    Arianna Member

    Dear support,

    a user on my ispconfig platform needs to use lapack libraries.
    I add them to the server following the instruction in but the php page responds: Fatal error: Class 'Lapack' not found in.....

    I installed the same libraries on my pc and everithing went well: what kind of configuration do I have to do?

  2. Jesse Norell

    Jesse Norell Well-Known Member

    I don't know from that link where the library will be installed, but find where the files went (eg. under /usr/local/.... ?) and make sure that directory is in php open_basedir (under the website's Options tab). You may/will also need to set php's include path include that.
  3. Arianna

    Arianna Member

    This is what I find with "locate lapack"

    The php_openbasedir id:

    and this is the php script I use to test:


    $a = array(
    array( 6.80, -6.05, -0.45, 8.32, -9.67 ),
    array(-2.11, -3.30, 2.58, 2.71, -5.14 ),
    array( 5.66, 5.36, -2.70, 4.35, -7.26 ),
    array( 5.97, -4.44, 0.27, -7.17, 6.08 ),
    array( 8.23, 1.08, 9.04, 2.14, -6.87 ),

    $b = array(
    array( 4.02, -1.56, 9.81 ),
    array( 6.19, 4.00, -4.09 ),
    array( -8.22, -8.67, -4.57 ),
    array( -7.57, 1.75, -8.61 ),
    array( -3.03, 2.86, 8.99 ),

    $result = Lapack::solveLinearEquation($a, $b);

    But still : Fatal error: Class 'Lapack' not found in /var/www/clients/client13/web18/web/uno.php on line 23
  4. Jesse Norell

    Jesse Norell Well-Known Member

    Ah, a .so is binary code which needs loaded via the ini, not included php code. Try adding extension=/usr/local/lib64/ to your php.ini then restart php (eg. php-fpm or whatever mode you use) and ignore/remove the set_include_path()/include() stuff.
  5. Arianna

    Arianna Member

    nothing changed and in phpinfo() it doesn't show up.
    mod_fcgid: stderr: PHP Fatal error: Class 'Lapack' not found in /var/www/clients/client13/web18/web/uno.php on line 21
  6. Jesse Norell

    Jesse Norell Well-Known Member

    You sure you added that to the correct php.ini? You should find the location in phpinfo() output to verify. Other than that I don't really know, I've not used that myself.

Share This Page