Repository navigation
Windows - Unable to Load Library #68
Description
Activity
As I recall, for a strange reason a php version major than 5.4 was causing issues on x86 (32 bits builds). The problem is only present on windows, since linux and macosx 32bits builds work fine with newer versions of PHP. This issue will serve as a note, since I almost forgot all the proper details of the problem.
I tried to debug the library to see where was the problem by deactivating a lot of code on wxPHP, but the problem seems to be strangely related to the linkage of the wxWidgets library. Maybe linking wxPHP to wxWidgets dynamically instead of statically would work, but I haven't tried that.
For now if you have 64bit capable CPU I would advise to try that or else try building wxWidgets in shared mode:
nmake -f makefile.vc BUILD=release SHARED=1Also the config.w32 file shipped with wxphp may need some adjustments, but, I'm not sure since I haven't tried to build in shared mode.
Just in case, static build (what we are using in wxPHP) links all wxWidgets code inside the php_wxwidgets.dll while a shared/dynamic build produces wxwidgets DLL files which need to be placed on the PHP executables directory for php_wxwidgets.dll to find.
Well strange story. I've tried building the exact same solution with the exact same settings on a different Windows 7 computer and I was able to run the sample code no problem . . .
Aside from being on a different computer the only thing I can think being different between the 2 is that on one computer I'm running as an administrator user and the other just as a regular user (Windows Login . . .) The one running with Administrator privileges doesn't work while the one running as a regular non-admin user does work. Which doesn't make any sence. Note that at no point in time do I run the command prompt (where I start php from) with "Run As Administrator".
I hope this new information can help you. I know it only confuses me. I will try compiling PHP with x64 instead of x86 to see if that makes a difference.
Mmm, then it sounds like a windows strange issue... thanks for reporting your findings.
I have been trying to get wxPHP to work so that I may experiement with it.
I have read and followed all the instructions located whithin README_MSW.txt as well as followed the steps located here : https://github.com/wxphp/wxphp/wiki/Building-on-windows to the letter.
I have successfully been able to build the extension without compilation errors. However when I try to load the extention I get the following error :
PHP Warning: PHP Startup: Unable to load dynamic library 'ext\php_wxwidgets.dll' - Invalid access to memory location.
in Unknown on line 0
This leads me to believe that php_wxwidgets.dll is looking for the installation of wxwidets but without a more descriptive error message I am at a lost of finding a solution. I have tried to download the extension dll from pecl : http://pecl.php.net/package/wxwidgets/3.0.0.2/windows I however get the exact same error message . . . .
PHP Version : 5.6.2 Thread Safe x86
wxWidgets Version : 3.0.0.2 x86