I've been making a lot of console apps in PHP, but now I'm wanting to try making an actual Windows program.
Since WinBinder is pretty much the extension to do this, I went ahead and downloaded it. I put the DLL in the extension folder and added its entry to the php.ini file.
But when I try to run a simple test (php -r "echo 'Test';") I get the following error:
Warning: PHP Startup: winbinder: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
in Unknown on line 0
I really have no idea what this means, nor what to do about it. Any help resolving this error, or advice for a different extension, would be much appreciated.
You can find Winbinder for PHP 5.4 here: https://github.com/stefan-loewe/WinBinder
There is no thing prevent you from developing desktop application using PHP.
Related
I want to install mailparser extension.
I downloaded php_malparse.dll ( put it to php/ext folder).
Also added : extension=php_mailparse.dll to php.ini
But it doesn't work, and php_info() doesn't show it too.
In logs I get:
PHP Warning: PHP Startup: Unable to load dynamic library 'E:\xampp\php\ext\php_mailparse.dll' - %1 \xef\xbf\xbd\xef\xbf\xbd \xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd \xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd Win32.\r\n in Unknown on line 0
I need help, how can I solve this problem?
Thanks!
It's difficult to say what's going on here. Typically the message Unable to load dynamic library means the library (in this case on Windows the .dll file) is not correctly formatted and the OS was unable to map it into memory or PHP was not able to use it.
Some possible reasons include:
The extension was not compiled for the same architecture as the target PHP build (e.g. the PHP is x86-64 but the library is x86)
The extension was not compiled using the same runtime version; PHP is pretty strict about this (e.g. PHP5 is built with vc11 on Windows, PHP7 is built with vc14, ETC.)
The extension was not compiled against the same version of the PHP API or extension API used by your PHP build; typically PHP will show a more-detailed error message when this is the case (it's strange that your error message contains a bunch of non-printing characters though...)
To double-check all this, view a dump of phpinfo() to see what kind of PHP you have. Look for the PHP API and extension versions as well as the system architecture and whether thread safety is enabled. Then return to where you downloaded the php_mailparse.dll extension library and make sure the extension aligns with your PHP build. Here are some official instructions for this process for Windows PHP extensions.
I found official builds of this module here. There are a lot of different choices to pick from. Pay attention to ts (i.e. Thread-safe) vs nts (i.e. Non-thread-safe), x86 vs x64 (i.e. the architecture) and vc11 vs vc14 (i.e. the runtime version). You may have to experiment until you find one that works for your PHP build.
It might also be worth checking out the official install instructions for the mailparse extension. Note especially that the mbstring module has to be loaded first for it to work.
I load an API into dll file from a software coding in C# to my web app in PHP.
I follow the install process with the extension everything seems ok
but my dll doesn't appear in my phpinfo().
Into my PHP ERROR LOG i've got this : PHP Warning: PHP Startup:Unable to load dynamic library
'c:/wamp64/bin/php/php5.6.25/ext/php_theapi.dll'
I would like to know how we check if the dll is compatible with PHP. And in Second time someone can post a method for get the entry point for the dll.
PS: I have IIS istalled and i am on MS server R8
Someone get a idea ?
I am currently running PHP 5.4.12 and cannot find a compatible php_win32service.dll to download. All the ones that I have seen seem to be for PHP 5.2/5.3?
When trying to use the dll made for these versions, I get the following error message:
PHP Warning: PHP Startup: Unable to load dynamic library 'ext\php_win32service.dll' - The specified module could not be found.
It is worth pointing out that I have put the dll in the correct place along with the other extensions!
Please can somebody give me any advice on where to go from here?
Thanks in advance.
Joe
Versions for PHP 5.3, 5.4 and 5.5 can be found at
http://windows.php.net/downloads/pecl/releases/win32service/0.1.0/
This is also a good source for many other Windows PHP extensions:
http://windows.php.net/downloads/pecl/releases/
Complete builds of PHP for Windows with other extensions are regularly published at
http://www.apachelounge.com/viewforum.php?f=6
I've been trying to install a php spell checker in my version of wamp and it's just not happening.
I've uncommented lines of the php ini, reinstalled wamp with an updated version of php and basically no luck.
At present I get the line.
PHP Warning: PHP Startup: Invalid library (maybe not a PHP library) 'php_pspell.dll' in Unknown on line 0
So looks like I've got the wrong version of pspell in my extensions.
Can someone give me a really easy to follow way to add this in.
I've been trying to get Enchant to work as well.
All to no avail - can someone help.
Thanks
Richard
Seems there haven't been much movement around, right?
Anyway, not sure if you're still looking for a solution here, but I have more or less the same problem. There doesn't seems to be a solution for pspell for PHP 5.3+, but enchant does seem to work.
I have a system that uses pspell for spell checking, and there doesn't seem to be any available version of that file that runs with any version of PHP running in wamp above 5.3 (I think it has to do with the VC version used to compile the system).
Now, regarding the problem you have with enchant, I managed to make it work in wamp just by un commenting the line in php.ini
As there are no indications from your input of what could be wrong, here you have a couple of things you could do to troubleshoot:
After enabling the enchant extension and restarting wamp, create a php file that has only the instruction phpinfo(); on it, and access it through a browser. Search for the string 'enchant' there. that will give you an indication if the extension was loaded or not
If the extension was not loaded, try to run, from a command box, the following line: <%path_to_your_php_exe%>/php.exe -c <%path_to_your_php_ini%>/php.ini -v
When there's a problem with any of the extension you'll get that either as a message in the command line or in a pop up, something that does not happen in wamp (It does happen if you start apache from the command line).
I hope this helps. Good luck.
I have downloaded a dynamic library from the location: http://downloads.php.net/pierre/.
The specific file I downloaded is: php_http-5.3-nts-svn20091125-vc6-x86.zip.
I have copied the file (php_http.dll) into the folder: C:\wamp\bin\php\php5.3.0\ext.
In php.ini, I added the line: extension=php_http.dll.
But I am getting the warning consisting of message: "PHP Startup: Unable to load dynamic library".
Do I need to do anything else to have this module enabled?
Maybe it's for a version other than your PHP's?
There are several "attributes" that must be in agreement in both the php core and the extension module. You can find all those values for the php core in the output of phpinfo()
the API version (e.g. 20090626 for the current 5.3.3 version)
is it a thread-safe (ts) or a non-thread-safe (nts) build <- this one's apparently your problem.
is it a debug build
did the compiler used to build a) the core and b) the module produce compatible code?
An extension module dll can also have additional dependencies that may or may not be fulfilled, e.g. another .dll is referenced but not present. Amongst other tools you can use ProcMon to monitor which .dlls are looked for and which are un-/successfully loaded.
For anyone that has tried the above "answers" without success, do this. Get the official Windows files from here. Make sure to (1) use the right version for your php and (2) use the right threading. Use NTS (not thread safe) if you are using fact cgi, and use thread safe if you have loaded php as an apache module.
http://windows.php.net/downloads/pecl/releases/http/
To verify it worked, look at the phpinfo() output and ensure there is a http section.