Jump to content

[SOLVED] Extensions not working?


Recommended Posts

Howdy.  I have PHP 5.2.6 running under Windows 2003.  I wanted to be able to talk to MySQL so I added the php_mysqli extension.  It works great.  I now wanted to be able to manipulate images, so I added php_gd2 but whenever I do var_dump(gd_info()); I get "Fatal error: Call to undefined function gd_info()".  After fighting with it for awhile, I installed php_snmp and tried querying SNMP on my APC SmartUPS and that also returns undefined function when I use snmpget so apparently my PHP is ignoring my extensions.  Weird thing is, the mysqli works fine.  This is my php.ini's relevant section:

 

extension_dir = "d:\apps\php\ext"

 

extension=php_gd2.dll

;extension=php_mysqli.dll

;extension=php_mbstring.dll

extension=php_exif.dll

extension=php_snmp.dll

 

The folder specified in the _dir is accurate, that's where the DLLs are.  I remarked out the mysql stuff just to test something.

 

I've restarted IIS every time I made a change.  Heck, I even tried restarting the server itself to no avail.  Any ideas what I should be checking?  Thanks!

 

PS, I did phpinfo and it shows a mysqli section but no mention of gd2, exif, mbstring, or snmp. 

Link to comment
Share on other sites

When installing PHP extensions ensure they are of the same version as the version of PHP (php.exe) installed. Extensions for PHP5.2.5 (or lower) are not compatible with PHP5.2.6.

 

I recommend you to go to php.net and download the "PHP 5.2.6 zip package". Once downloaded, open the .zip and extract the files withiin the ext/ folder to wherever your PHP ext/ folder is to.

Link to comment
Share on other sites

Ahh, that was the problem.  I downloaded that 5.2.6 ZIP and it resolved my issues.  Well, sorta.  Once I overwrote the ext folder with the DLLs I downloaded, all of them started to work -except- mysqli, pretty much opposite of the old behavior heh.  I renamed the new mysqli dll to dll_new and copied back in the older one and then it worked.  Weird.  The mysqli API library version in phpinfo says "mysqlnd 5.0.1-beta - 070402 - $Revision: 321 $". 

 

Well, as long as it works that's good anyway hehe.  Thanks for the help!

Link to comment
Share on other sites

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.