Why won't php_oauth.dll module work on Windows

2020-03-31 09:24发布

问题:

I am struggeling for days to install OAuth module of PHP to apache, but it simply doesn't want to work. I have tried many combinations, but I just can't get it to work:

  1. XAMPP

    • XAMPP doesn't include oauth by default. Therefore, I have downloaded the module from PEAR websote, placed it in the ext folder, placed it into php.ini. However, when I try to start apache it says that oauth and PHP are compiled with different APIs!?. I tried with older versions too, but with the same result
  2. Manual Installation of Apache & PHP

    • I also tried to install both Apache and PHP separately. They install successfully, however apache gives an error when I am trying to start it saying that the php5apach2_2.dll cannot be loaded into server. Some way I managed to fix that and start pache. However, without any error and with php.ini and httpd.conf configured the OAuth module doesn't load and it doesn't appear in phpinfo().
  3. Microsoft IIS

    • Ultimately I installed IIS and got it to work up until the last problem in the previous trial: won't show up in phpinfo() nor work in PHP scripts.

I got it to work in minutes on Ubuntu Linux on a VM, but it is really a pain to work on a VM as a web developer.

My OS is Windows 7 x64.

The files I used to install:

  • php_oauth-1.2.3-5.5-ts-vc9-x 86.zip
  • php_oauth-1.2.2-5.4-ts-vc9-x86.zip
  • php_oauth-1.2.2-5.3-ts-vc9-x86.zip
  • php_oauth-1.1.1-dev-5.3-vc9-x86.zip
  • php-5.3.21.tar.gz
  • php-5.4.11-nts-Win32-VC9-x86.zip
  • php-5.3.21-src.zip
  • php-5.5.0alpha1.tar.bz2
  • Apache2.2.zip
  • and many others...

Does anyone have a clue why is this happening ?

Thanks!

回答1:

I think the problem that you're running into is that your OAuth DLL's are 32bit (x86) whereas your OS is x64. I'm dealing with a similar problem, looking for the OAuth DLL that is both x64 and for PHP 5.4.

I did however find a x64 DLL that works for PHP 5.3. It's available here: http://www.mediafire.com/php-win64-extensions. Just make sure to get the file named php_oauth-1.2.2-5.3-VC9-x64.zip as the other OAuth DLL is not thread safe (nts).

If you are fine using PHP 5.3 then that DLL should work for you.



标签: php apache oauth