iissmart Posted March 25, 2007 Share Posted March 25, 2007 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? Quote Link to comment https://forums.phpfreaks.com/topic/44201-enabling-mcrypt-in-php-on-windows-server-2003/ Share on other sites More sharing options...
wildteen88 Posted March 25, 2007 Share Posted March 25, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/44201-enabling-mcrypt-in-php-on-windows-server-2003/#findComment-214776 Share on other sites More sharing options...
iissmart Posted March 25, 2007 Author Share Posted March 25, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/44201-enabling-mcrypt-in-php-on-windows-server-2003/#findComment-214820 Share on other sites More sharing options...
wildteen88 Posted March 25, 2007 Share Posted March 25, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/44201-enabling-mcrypt-in-php-on-windows-server-2003/#findComment-214839 Share on other sites More sharing options...
iissmart Posted March 25, 2007 Author Share Posted March 25, 2007 Nope, I used the zipped binaries and manually copied it to C:\php. php_mcrypt.dll is in the extensions folder, and came with the version of php that I downloaded. How do I add the php folder to the windows path? Quote Link to comment https://forums.phpfreaks.com/topic/44201-enabling-mcrypt-in-php-on-windows-server-2003/#findComment-214849 Share on other sites More sharing options...
wildteen88 Posted March 25, 2007 Share Posted March 25, 2007 To add the php folder to the path read this post of mine here Quote Link to comment https://forums.phpfreaks.com/topic/44201-enabling-mcrypt-in-php-on-windows-server-2003/#findComment-214909 Share on other sites More sharing options...
iissmart Posted March 26, 2007 Author Share Posted March 26, 2007 I followed the directions in your other post, rebooted the server, but phpmyadmin still can't load mcrypt, and nothing shows up in my phpinfo. Quote Link to comment https://forums.phpfreaks.com/topic/44201-enabling-mcrypt-in-php-on-windows-server-2003/#findComment-215067 Share on other sites More sharing options...
wildteen88 Posted March 26, 2007 Share Posted March 26, 2007 Edit your php.ini and turn a setting called "display_start_errors" to on. Save the php.ini and restart Apache. What startup errors do you get. Quote Link to comment https://forums.phpfreaks.com/topic/44201-enabling-mcrypt-in-php-on-windows-server-2003/#findComment-215455 Share on other sites More sharing options...
iissmart Posted March 26, 2007 Author Share Posted March 26, 2007 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? Quote Link to comment https://forums.phpfreaks.com/topic/44201-enabling-mcrypt-in-php-on-windows-server-2003/#findComment-215676 Share on other sites More sharing options...
wildteen88 Posted March 27, 2007 Share Posted March 27, 2007 It should be logging them to Apache's error.log file which should be located in the logs folder inside the Apache installation folder. Quote Link to comment https://forums.phpfreaks.com/topic/44201-enabling-mcrypt-in-php-on-windows-server-2003/#findComment-216203 Share on other sites More sharing options...
iissmart Posted March 27, 2007 Author Share Posted March 27, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/44201-enabling-mcrypt-in-php-on-windows-server-2003/#findComment-216211 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.