Getting a warning "PHP Startup: Unable to load dynamic library" - php

I have setup memcache to work on windows and downloaded the php_memcache.dll file. But now whenever i start my wamp server it shown me a warning as:
PHP Startup: Unable to load dynamic library
"C:/wamp/bin/php/php5.4.12/ext/php_memcache.dll" - %1 is not a valid Win32 application.
What does this warning means.? How can i correct it.
I am working with Windows 7(64bit).

If you know the visual C (VC) version used for building your PHP, be sure to use the same version for the php_memcache.dll (its usually in the name of the archive you get from php.net - i.e. php_blah_blah_VC9_.zip)
No need to build it yourself, you can check the net for build with the same C and the same PHP version.

You may have an issue with your a copy of php_memcache.dll. Try utilizing this file: http://www.sendspace.com/file/uq6srb

Related

'c:/wamp64/bin/php/php7.0.10/ext/php_oci8_12c.dll' - %1 is not a valid win32 application

In order to access an remote Oracle database from php, I had to activate the extension php_oci8_12c. But when I do, it does not appear in the phpinfo().
On the other hand, I get in the php logs the error message:
[13-Jan-2017 08:39:48 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp64/bin/php/php7.0.10/ext/php_oci8_12c.dll' - %1 is not a Valid win32 application
I use php 5.6.25 and wampserver 3.0.6 (64 bit). How can I resolve this?
Well, I faced this error too and managed to fix it.
Before downloading every kind Oracle Client Version just take a look at your http://localhost/?phpinfo settings at Configure Command section.
This will tell, which version of Oracle was used to build your WAMP server.
The image above show this two lines:
"--with-pdo-oci=c:\php-sdk\oracle\x64\instantclient_12_1\sdk,shared"
"--with-oci8-12c=c:\php-sdk\oracle\x64\instantclient_12_1\sdk,shared"
Obviously tell us that InstantClient used is 64 bits.
There are two versions of InstantClient 12.1 x64: 12.1.0.2.0 and 12.1.0.1.0
I tested with 12.1.0.2.0 version and failed.
After that, I tested with old one, 12.1.0.1.0 version and worked.
Download from Instant Client for Microsoft Windows (x64) and extract the files below to "c:\oracle":
instantclient-basic-windows.x64-12.1.0.2.0.zip
instantclient-sqlplus-windows.x64-12.1.0.2.0.zip
instantclient-sdk-windows.x64-12.1.0.2.0.zip
This will create the following folder "C:\Oracle\instantclient_12_1".
Using "Windows Command Prompt" (WIN+R CMD) go to folder above and execute SQLPLUS:
sqlplus [user]/[pass]#[host]:[port]/[service]
You must be able to connect.
Finally, add the "C:\Oracle\instantclient_12_1" folder to the PATH enviroment variable, placing it on the leftmost place.
Close your WAMP server.
Yes close it, because the Enviroment Variable is only read at launch time.
So restarting the services may fail, leading you to a wrong result.
After restart, your PHPINFO would show the OCI8 and PDO_OCI loaded.
I hope it helps!

PHP to print to a server side printer

I am trying to use PHP to print to a server side printer. I have found similar example code that mostly all use the same API’s functions in order to do this task. When I ran it on my server to test the code it was saying “PHP Fatal error: Call to undefined function printer_open()”. So I found at least three different versions of the php_printer.DLL’s for this printer function and tried them all separately . I did some more research and looking into the apache server error log found this warning
PHP Warning: PHP Startup: Unable to load dynamic library 'ext\php_printer.dll' - The specified module could not be found.\r\n in Unknown on line 0
From this found some Bing search results that said that the reason it is not loading when apache starts up is because it is depend on other libraries. If this is true I have not as yet been able to find which library DLL’s these are and where to get them. This is what I need help with first to basically know if it is not depended then why is the PHP warning being thrown or what library’s do I need.
Thanks for any help
zac
I am running a wampserver2.2
Apache 2.4.2
PHP 5.4.3
OS : windows 7 64 bit
Added to the php.ini file
extension=php_printer.dll
and no errors in the php log
also I did restarted the server each time I change the php.ini file or when I put a new DLL in the *ext* directory
I even put the path to the wamp DLL’s “...\ext\” in the environment variables for windows, as a shot in the dark .
Example code
<?php
/* get the sample text */
$lipsum = "test print";//file_get_contents('lipsum.txt');
phpinfo();
/* open a connection to the printer */
$printer = printer_open("Microsoft XPS Document Writer");
/* write the text to the print job */
printer_write($printer, $lipsum);
/* close the connection */
printer_close($printer);
?>
3/19/2015 edited
I found this site along with a slightly different error message from the php error log.
basically the below link said the error happened because the PHP_printer.dll is complied with a different visual studio c++ version and therefore need to be recompiled. it gives the steps for the most part I still am tring to get it to work
https://community.apachefriends.org/f/viewtopic.php?t=53348&p=204590
Php error:
[18-Mar-2015 22:55:56 UTC] PHP Warning: PHP Startup: printer: Unable
to initialize module Module compiled with module API=20121212 PHP
compiled with module API=20100525 These options need to match in
Unknown on line 0
In case you couldn't found a solution yet....
First of all check in phpinfo() that in the version of wmap server you are using thread safety is enabled or not. Just ctrl+F in the phpinfo() for "thread safety".
Probably thread safety is enabled in the version you are using. Then you have to download the ts(thread safe) version of the php_printer.dll which you can find here....
http://windows.php.net/downloads/pecl/snaps/printer/0.1.0-dev/
download specific file according to your system requirement (OS and others) and copy it in the extension directory of the wamp. Then just enable the extension in the php.ini file like
extension=php_printer.dll
just add this line in the ini file if already not there and there will be no ; at the beginning.
Hope it helps ...

connect to mysql database with php issue

I'm going to expand my local project (that used mysql database and php ) to web.
i upload all file and changed all addresses to my server.
but my app wont work and i get the error like this in server Error log:
[10-Feb-2014 04:06:38 America/New_York] PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20100525/magickwand.so' - /usr/local/lib/php/extensions/no-debug-non-zts-20100525/magickwand.so: cannot open shared object file: No such file or directory in Unknown on line 0
my app is load some list of goods. then it can be shown detail and edit.
there is no image.
what is this problem and how I can solve it?
You don't have ImageMagick installed at your server.
In order to use the MagickWand For PHP module's functions, you need to install ImageMagick version 6.3.5, or greater, and the MagickWand for PHP extension source code / DLL. For more detail please see here http://www.magickwand.org/

PHP 'Unable to load dynamic library... procedure not found'

This is my first day with Zend Framework with appServ and i used NetBeans IDE, but i got this error.
PHP Startup: Unable to load dynamic library
'G:/PROGRA~2/AppServ\php5\ext\php_exif.dll' - The specified procedure
could not be found.
I am surprised cause this file already exists when i serached on google i found that i can solve this by change the order of extensions in php.ini and put the ;extension=php_exif.dll at the ends of other. but the error still.
help me plz;
You must load php_mbstring.dll before the php_exif.dll.

Connecting to MSSQL-Server 2008 under Zend server

Hi I'm currently trying to connect to MSSQL-Server-2008 using php on a Zend (web) server.
I've tried out a few things now but always end up getting:
PHP Warning: PHP Startup: Unable to load dynamic library 'E:\Zend\ZendServer\lib\phpext\php_pdo_sqlsrv_53_ts_vc9.dll' - The required module was not found
(sry if the error message sounds a bit strange I translated it manually into english)
First step I did was to download:
Microsoft SQL Server 2008 R2 Native Client
2nd step was that I downloaded:
SQLSRV20.EXE and extracted the files into the phpext directory.
3rd step was that I tried to turn on:
pdo_sqlsrv_53_nts_vc9
and / or
pdo_sqlsrv_53_ts_vc9
And restarted php.
Regardless of what I did I received the above error message.
Thus every time I try to connect to the mssql server I get an error message:
*PHP Fatal error: Call to undefined function sqlsrv_connect()*
Are there any additional steps needed?
(PHP Version I use is: 5.3.9 with a very new version of the zend server).
thanks
In the Zend server itself there are SQL drivers install them along it with general installation.Once the installation is done turn on these extensions sqlsrv,pdo_sqlsrv in the php console.I don't know the exact reason but those extensions which come with SQLSRV20.EXE are not compatible and those cannot be loaded.
Regards,
Sri

Categories