Results 1 to 3 of 3

Thread: PHP/Call to undefined function mcrypt_module_open()

  1. #1
    Join Date
    Jan 2008
    Beans
    2

    Smile PHP/Call to undefined function mcrypt_module_open()

    Hello All,

    I just installed a fresh copy of Ubuntu Server 7.10 as a LAMP. But whenever I try to run my PHP code I get the following error: -

    Fatal error: Call to undefined function mcrypt_module_open() in /home/ndd/pass1.php on line 5

    When I run <? phpinfo(); ?> it shows that "mcrypt" is enabled but its failing to run any of mcrypt functions.

    I have following PHP packages installed: -

    ndd@hyperion:/home/ndd# dpkg --get-selections | grep php
    libapache2-mod-php5 install
    php-pear install
    php5 install
    php5-cli install
    php5-common install
    php5-curl install
    php5-dev install
    php5-mcrypt install
    php5-mhash install
    php5-mysql install
    phpmyadmin install
    ndd@hyperion:/home/ndd#

    Can anyone please help me how to solve this problem...

    Cheers,
    /N
    Last edited by BongoLand; February 16th, 2008 at 03:52 AM. Reason: Forgot to add package details

  2. #2

    Re: PHP/Call to undefined function mcrypt_module_open()


  3. #3
    Join Date
    Jan 2008
    Beans
    2

    Thumbs down Re: PHP/Call to undefined function mcrypt_module_open()

    Genius Dude...

    You solved ma problem within minute... You should be proud man...

    Found out that "mcrypt.so" was loaded only in apache (/etc/php5/apache2/php.ini) and not in CLI (/etc/php5/cli/php.ini). So just had to add extension=mcrypt.so with the module directory extension_dir="/usr/lib/php5/20060613+lfs/mcrypt.so".

    Once again thanks for the reply...

    Cheers,
    /N

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •