Discussion in 'Installation/Configuration' started by colin, Feb 24, 2008.

  1. colin

    colin New Member


    I am trying to get PHP-Mcrypt installed on Centos 5 the only file i could find is libmcrypt. is this right or is there other files i need to download?
    I thort there was a how to that covered this but cannot find it. Any help would be appreciated

    Apache/2.2.3 (CentOS)
    PHP 5.1.6
    Last edited: Feb 24, 2008
  2. topdog

    topdog Active Member

    You can do this using yum and all dependencies will be resolved.

    Use the rpmforge repo
    rpm -Uhv
    yum install libmcrypt
  3. topdog

    topdog Active Member

  4. colin

    colin New Member

    Thanks for the reply Topdog. I am using virtualmin to administer the server and according to this software it is installed but not enabled (needs dynamic loading:confused: :confused: :confused: ) I have tried adding to php.ini but still nothing shows up in phpinfo(). I have restarted apache and even done a reboot. What am i doing wrong??

  5. topdog

    topdog Active Member

    You need this instead
  6. colin

    colin New Member

    ok changed that and restarted but still nothing. When i get back to the server i will uninstall the package and reinstall. Should the code below also update the php.ini file or do i have to do that bit myself?

    rpm -Uhv
    yum install libmcrypt
  7. topdog

    topdog Active Member

    That just installs the library you need to install the php extension which you can get from the site i linked.

    If you install the rpm you do not need to modify anything as the rpm installs a file in /etc/php.d which loads the extension.
  8. colin

    colin New Member

    Yhanks Topdog

  9. tedyu

    tedyu New Member

    I installed mysql and mcrypt:
    [[email protected] lib]$ cat /etc/php.d/
    dbase.ini mhash.ini mysql.ini pdo_mysql.ini
    mcrypt.ini mysqli.ini pdo.ini pdo_sqlite.ini

    But I still see:

    [Sun Apr 12 12:07:37 2009] [error] [client] PHP Fatal error: Call to undefined function mysql_pconnect() in /home/wr_webroot/framework/Webroot/DAO/Dispatcher.php on line 43

    Any idea ?
  10. topdog

    topdog Active Member

    Did you restart apache ?
  11. tedyu

    tedyu New Member

    Yes I did.

  12. falko

    falko Super Moderator ISPConfig Developer

    You can create the following PHP file...
    ... and call it in a browser. Do you see MySQL enabled there?
  13. tedyu

    tedyu New Member

    I restarted Apache.
    First I saw:
    PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20060613/' - /usr/local/lib/php/extensions/no-debug-non-zts-20060613/ cannot open shared object file: No such file or directory in Unknown on line 0

    So I symlinked /usr/lib/php/modules/ to /usr/local/lib/php/extensions/no-debug-non-zts-20060613
    But then I saw:
    PHP Warning: PHP Startup: mcrypt: Unable to initialize module\nModule compiled with module API=20050922, debug=0, thread-safety=0\nPHP compiled with module API=20060613, debug=0, thread-safety=0\nThese options need to match\n in Unknown on line 0

    How do I install 20060613 mcrypt ?
  14. topdog

    topdog Active Member

    It looks like your installed mcrypt was built from source as well as rpm and one is linked to a different php version

Share This Page