Jump to content

Recommended Posts

I'm trying to enable mcrypt in PHP so I can use cookies for phpmyadmin. From all of the directions I have found, all I need to do is remove the ; from php.ini for the line "extension=php_mcrypt.dll", and put libmcrypt.dll in the system32 folder. I have done both of those, as well as restarting Apache, yet my phpinfo has nothing referencing mcrypt, and phpmyadmin says that it "cannot load the mcrypt extension. Check your php configuration". What am I doing wrong?

check that php is using the php.ini you are modifying.

 

Simply run the phpinfo() function and then load it in your site or localhost and look for the line that starts with Configuration File (php.ini) Path

 

To the right of that it will state the full path to the php.ini PHP is using. Is that correct? If it has this C:/WINDOWS then php cannot find a php.ini file so it is using the default settings.

 

Either move the php.ini to the WINDOWS folder or add your php folder to the windows path (recommended).

 

As a side note, make sure you have setup the extension_dir directive correctly to point to your PHP extension folder.

Here is my phpinfo: http://iissmarter.rootservers.org/phpinfo.php

 

I can confirm it is using the php.ini file that I edited. I can also confirm it is looking in the right place for the extensions, since I had to enable php_mysql.dll at one point, and that was quite easy.

Have you added your php folder to the windows path? I would recommend you to add php to the path. This will then allow PHP to access itself, as well as removing the requirement of moving files from the PHP folder around the file system.

 

PHP should come with the necessary libraries for mcrypt.

 

Did you use the PHP installer when installing PHP? If you did then download the zipped binaries instead. The zipped binaries has more extensions/libraries.

I'm having some trouble. As of right now I'm just restarting the Apache2 service to restart apache, and when I have display_startup_errors set to On the apache service fails to start. No errors appear though, but according to the .ini file, they are being logged somewhere, but I can't figure out where it is logging the errors to. Do you know the default location it logs its errors to?

Found it:

 

PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_mcrypt.dll' - Access is denied.\r\n in Unknown on line 0

PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\\php\\ext\\php_pdo_mysql.dll' - The specified module could not be found.\r\n in Unknown on line 0

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.