Jump to content
  • Advertisement
Sign in to follow this  
BeanDog

[web] PHP4 & mcrypt -- no errors, but not loaded

This topic is 4507 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've just set up PHP4 and Apache 1.3 on a test server (to imitate our live web host). In php.ini, I uncommented out the "extension=php_mcrypt.dll" line. Apache started up fine. Now the problem: phpinfo() shows nothing about mcrypt actually being loaded, and I get undefined function errors whenever I try to use it. [Edit] I can't get Apache/PHP not to start up, no matter what I do to php.ini. I searched the entire hard drive for files named php.ini. There is only one. I erased the entire content of the file, and PHP still works without complaint. I deleted the php.ini file itself, and Apache still starts and parses PHP files fine. Just no extensions. WTF? I'm using Windows 2000 Server with Apache 1.3 and PHP 4 (latest versions of each). Anybody know what I could do to better diagnose the issue, or fix it? [Edited by - BeanDog on June 15, 2006 2:02:25 PM]

Share this post


Link to post
Share on other sites
Advertisement
First of all, are you sure the php.ini file you are editing is the one that is loaded by PHP? You can check this with phpinfo(), it contains a 'Configuration File Path' in the first table.

Secondly, what is the variable 'extension_dir' in your php.ini set to? Try changing this value to an absolute path pointing your PHP '/extensions' dir (the dir that contains 'php_mcrypt.dll').

Try loading some other extension, like GD or bz2, and using one of it's functions. If you get errors with these too it's safe to assume the 'extension_dir' setting is not correct.

Share this post


Link to post
Share on other sites
php.ini is by no means mandatory. In its absence, all defaults are used (unless overridden by web server settings).

If you run phpinfo() it will tell you the location of the php.ini it is using - BUT THAT MAY NOT EXIST. This is legal and relatively common.

Mark

Share this post


Link to post
Share on other sites
Also, make sure PHP is compiled with mycrypt. If the mcrypt bindings are not in the binary (or in a separately loadable module) then switching the mcrypt directive on will do nothing, aside from maybe a complaint in an errorlog somewhere.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!