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.
Related
I am trying to get memcahe enabled on my Phpinfo().
Hi everyone, I am a newbie when its comes to working with memcache. So I have been trying to get memcache enabled on my php, but I have had very little luck.
According to my phpinfo() my php build version is API320190902,TS,VC15 and entails that I have to enable php_memcache.dll which is of the same VC (i.e VC15).
I have done that, by placing the php_memcache.dll file in my php/ext folder and enabling the extension in my php.ini by stating "extension=php_memcache.dll". But despite doing all this, I can't seem to get the memcache enabled, and my phpinfo() does not show the desired memcached section.
Additionally my Apache log states
PHP Warning: PHP Startup: Unable to load dynamic library
'php_memcache.dll' (tried: C:\xampp\php\ext\php_memcache.dll (The
specified module could not be found.)"
Can someone kindly help me figure out where I am missing it, or not doing right?
By the way, I tested this on Xampp and the .dll file was downloaded from the link https://github.com/nono303/PHP7-memcache-dll
Attached are screen shots of my Apache logs, php.ini, php/ext and phpinfo().
There are common things that are often encountered in PHP and Memcache(D) related issues:
Do you need the MEMCACHED or the MEMCACHE extension?
Is the MEMCACHED server already running? (in your case, that's not the problem yet)
Is the installed PHP extension x64 and Threadsafe compatible (as your system requires by looking at your phpinfo).
Personally, I use another PHP extension which works perfectly under PHP7 and PHP8:
memcached 3.2.0 for Windows
https://pecl.php.net/package/memcached/3.2.0/windows
Note: in addition to the usual DLL extension that you will copy to php/ext/ (and enable in your php.ini), you will also need to copy libmemcached.dll and libhashkit.dll to a directory belonging to your system path.
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 getting warning php startup:unable to load dynamic library 'C:/wamp/bin/php/php5.5.12/ext/php_intl.dll'-%1 is not a valid Win32 application
how to sole this.
That is due to invalid dll file.
first you need to find
Architecture - 32 bit ot 64 bit
compiler version - VC9 or VC11
Thread safe or Non thread safe
this can be find by open phpinfo or echoing phpinfo() in any php file.
then search for Compiler,Architecture and Thread Safety
then go to http://windows.php.net/download/ and download right Releases.
replace needed file then restart web server
I'm using Ubuntu 12.04 LTS and needed PHP 5.4 so I'm using Ondřej Surý's (php5-oldstable) package.
Both phpinfo and the CLI show that JSON is enabled:
#php -i | grep -i json
json
json support => enabled
json version => 1.2.1
My application mostly works. But periodically (approx one page refresh in ten) there is a PHP error. This only happens intermittently.
PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525+lfs/json.so'
- /usr/lib/php5/20100525+lfs/json.so: cannot open shared object file:
No such file or directory "json.so"
How do I fix this?
I think that possible culprit (as I have answered in email) is that you are loading json extension somewhere from the configuration file.
The JSON extension is compiled in the core for PHP 5.4, so you should not load it by hand.
Please check that you don’t have:
json.ini somewhere in the /etc/php5/{mods-available} left over from previous PHP 5.5 installation
you are not loading JSON extension from the mentioned script, e.g. no dl(json.so).
Make sure you have stopped and started Apache2 (same applies to php5-fpm) when changing major versions. The symptoms might indicate that there was some stuck Apache2 thread with previous PHP from package loaded (that would be PHP 5.5 with json-c based JSON extension in this case).
Since you're saying that the json extension is loaded in phpinfo()'s output you could be dealing with a bug. Have you checked if the module file is actually there in the filesystem?
You have the following options:
Compile PHP 5.4 from source with Apache 2.4
Upgrade to the same repo's stable version which will give you PHP 5.5 + Apache 2.4.
Submit a bug with the Ondrej in Ubuntu's PPAs and wait for it to be resolved.
For more information check the debphp site.
Submitting a bug is a must, since if it is a real one it must be fixed for all users.
You could firstly go with option 2 if you don't conflict with the Migration guidelines like backward compatibility, deprecated functions, etc.. SO check it and decide.
It also strongly varies depending on the machine you have to do this with. If it is a critical production server, you may not want to compile of change versions on it. Go file the bug and see what the package maintainers have to say about this.
Also please write a reply here when your problem is resolved. I am quite curious as to what it is and hopefully was. :D
One point that doesn't diagnose or solve the issue (and seems to refer to PHP 5.5), but might help with tracing its root cause:
This Debian bug report and Phil Sturgeon's blog explain that some Linux distributions have chosen to replace the official PHP implementation of ext/json with the drop-in compatible pecl-json-c. The rationale was that Douglas Crockford's implementation contains a non-free clause in the license ("The Software shall be used for Good, not Evil"). See also this blog post.