LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   mcrypt extension error while using phpMyAdmin on Slackware 12.2 (https://www.linuxquestions.org/questions/slackware-14/mcrypt-extension-error-while-using-phpmyadmin-on-slackware-12-2-a-692117/)

dizzi 12-21-2008 05:56 PM

mcrypt extension error while using phpMyAdmin on Slackware 12.2
 
I have just installed phpMyAdmin 3.1.1 on Slackware 12.2 and noticed this error message when it is started:

"Cannot load mcrypt extension. Please check your PHP configuration"

Evidently, The the extension was not compiled in the PHP version used on Slack.

1. Is there a version available for download with the extension built-in?
2. Is there a way to supress the error message?
3. Can the required extensions(s) be built separately and configured for
use with the current php version? If so I would appreciate a
guide.

Regards

mRgOBLIN 12-22-2008 06:52 AM

there is a slackbuild for mcrypt at slackbuilds.org http://slackbuilds.org/repository/12...ies/libmcrypt/ build that and install it then you will likely have to rebuild php.

dizzi 12-22-2008 10:44 AM

Thanks mRgOBLIN. I have already done so along with building and installing mcrypt. However errors are being generated while attempting to re-build PHP. I have created a thread relating to this issue which can be found there http://www.linuxquestions.org/questi...k-12.2-692250/.

Regards

dizzi 12-23-2008 08:46 AM

Ok I have managed to solve this issue have presented the methodology below:

1. Download libmcrypt-2.5.8.tar.bz2 and mcrypt-2.6.8.tar.gz from http://sourceforge.net/project/showf...group_id=87941

2. Download SlackBuilds for these sources at http://slackbuilds.org/repository/12...ies/libmcrypt/ &
http://www.mnspace.net/slackbuilds/slack12.1/ respectively. The Slack 12.1 edition of the second Slackbuild works fine but
it needs to be updated to reflect the new mcrypt version as follwows: "VERSION=2.6.8".

Note: The latter SlackBuild site above can be a bit slow and even fails to load at times. Another one can be
found there http://repository.slacky.eu/slackwar...ypt/2.6.7/src/. However, I did not test this SlackBuild.


3. Build libmcrypt-2.5.8.tar.bz2 (./libmcrypt.SlackBuild) and install the resultant package then do the same for mcrypt-2.6.8.tar.gz.

4. Copy the "php" and "alpine" source directories from the Slackware installation media and place them in the "/tmp"
directory. I placed the contents of my "php" source directory in "/tmp/build", however the "alpine" directory needs to be in placed directly in temp "/tmp" (giving /tmp/alpine).

5. Edit "php.SlackBuild" (located in the "php" sources) by adding "--with-mcrypt=shared,/usr/bin \" (without the quotes)
in the list of "configure" prefixes. I placed mine just before before "--build=$ARCH-slackware-linux".

6. Open a virtual terminal, change directory to your php sources "/tmp/build/" in my case, change to root and run
"./php.SlackBuild". At some point during the initial alpine build, you may be asked to whether you wish to continue.
Select "y" to proceed. On a 1.83 Centrino Duo, the duration of the build was about 20 minutes. At the end of a
successful process, there should be "alpine-2", "imapd-2" and "php-5.2.8" packages in the "/tmp" directory.
Confirm that there is a "mcrypt.so" module in "/tmp/package-php/usr/lib/php/extensions"

7. Stop the Apache server (apachectl stop) remove your previous php package and install the newly built version.

8. Edit "/etc/httpd/php.ini" by adding "extension=mcrypt.so" in the list of "Dynamic Extensions".

9. Restart the Apache server (apachectl start).

10. Open phpMyAdmin. The "Cannot load mcrypt extension. Please check your PHP configuration" error message should no
longer be displayed.

Regards

TCke 12-27-2008 06:20 AM

It seems there is a link somewhere to Xorg packages while building php,
if you get an error about libXpm(.a|.so) you need to install the packages in the x folder of your slackware media.

After that you can start php.SlackBuild again.

Regards,

TCke

ibacsoft 01-19-2009 05:41 PM

I recompiled php without alpine, it complained with an error and couldn`t make the package, but I went to the php-5.2.5 source tree, cd to ext/mcrypt and compiled it, and then copied the mcrypt.so file to /usr/lib/php/extensions, and the error message in phpMyAdmin disappeared. My question is: why canīt you use on Slackware a simple solution like Ubuntu, Red Hat or Debian Linux, where you can install only the php5-mcrypt extension or an rpm package, restart apache and that's all?


All times are GMT -5. The time now is 03:43 PM.