php_ssh2.dll and PHP 5.5.4 on IIS 7.5 - php

I am trying to get php_ssh2.dll working on my IIS 7.5 server.
I have PHP 5.5.4 installed and running (NTS VC11 x64).
I downloaded php_ssh2.dll from here: http://windows.php.net/downloads/pecl/releases/ssh2/0.12/php_ssh2-0.12-5.5-nts-vc11-x64.zip
I placed the extension and the pdb file in the ext folder of my PHP install and enabled it in IIS.
The problem is when I restart IIS, I get the following in my error log:
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\5.5.4\ext\php_ssh2.dll' - %1 is not a valid Win32 application. in Unknown on line 0
I also have PHP 5.3 installed with php_ssh2.dll (not the same as linked above) and it works fine.
I do have libssh and openssl installed, as well as Visual C++ 2012 x64.
Is there some other step I'm missing?
Minor update, I tried doing everything above with the x86 builds instead and had the same results. PHP itself runs fine, but I cannot utilize the php_ssh2.dll

It appears the issue is that the 5.5x builds of the php_ssh2.dll lack the libssh2.dll, per this bug report: http://www.phplt.com/2013/09/17/17/php_ssh2-0-12-5-5-nts-vc11-x86-zip-missing-file/
Is this something I can build or acquire elsewhere?

What are you trying to do with php_ssh2.dll? Maybe phpseclib, a pure PHP SSH2 implementation, would work better for you?

Related

How do I fix "PHP Warning: PHP Startup: Unable to load dynamic library 'mongodb' "

I am trying to install and set up mongodb with a laravel application for the first time. I read that I have to install the extension and libraries but after I do that I get the above error when I try to execute a php command in the terminal.
I am running windows 10 x64 and PHP 7.3.1.
First of all I installed the mongodb from the official mongodb site
I got the latest mongodb dll from https://pecl.php.net/package/mongodb/1.6.0/windows
I extracted the dll into the c:/xampp/php/ext folder according to the instructions and restarted the server.
I also included the extension = php_mongodb.dll in the php.ini file
This is what I get...
I found a similar post on here PHP unable to load dynamic library (mongo.so) that could have solved my problem but that solution is for users on mac and I am on windows.
I'm answering my own question here. Turns out my xampp version was x86 and so x64 version of the dll would obviously not work... Solution was to just use x86 version of the dll instead.

sql server 2014 and xamp php 7.0

I have updated four files names given below in php/ext folder of xampp
I also updated these updated lines in php.ini
extension=php_pdo_sqlsrv_7_nts_x64.dll
extension=php_pdo_sqlsrv_7_ts_x64.dll
extension=php_sqlsrv_7_nts_x64.dll
extension=php_sqlsrv_7_ts_x64.dll
but when I try to run php artisan migrate it gives me this error
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_pdo_sqlsrv_7_nts_x64.dll' - %1 is not a valid Win32 application.
in Unknown on line 0
what could be the possible problem?
Am I doing something wrong
I downloaded files from https://www.microsoft.com/en-us/download/details.aspx?id=20098
Actually I came to knew that x64 or x86 is version of php which can be obtained from phpinfo(). so my php was x86 and I was using x64 files and also my php was thread enables so I did not need nts files

OCI8 with PHP7 - module not found

I'm currently setting up a Windows 10 Pro x64 machine to work with Apache, PHP and its oci8 extension.
I successfully managed to get oci8 working on OSX 10.11 and Windows 2012 Server before, so I thought I knew what to do. But this was 32bit – now it's 64.
The software now installed is:
Apache 2.4.18 x64
PHP 7.0.3 TS x64
Oracle Instant Client x64 (instantclient-basic-windows.x64-12.1.0.2.0)
oci8 2.1.0 TS x64
I don't get it to work. The error message is:
Warning: PHP Startup: Unable to load dynamic library
'ext\php_oci8_12c.dll' - Das angegebene Modul wurde nicht gefunden. (Module not found.)
in Unknown on line 0
Extension 'oci8' not present.
I installed the Oracle Instant Client by writing its directory into the PATH variable and copied the php_oci8_12c.dll file to the PHP ext dir and uncommented the corresponding line in the php.ini. Shouldn't that be enough?
I've read many postings here on Stackoverflow and other websites about similar problems, things I've tried:
Moving all DLLs to C:\Windows\system32
Include the PHP extension dir in the PATH variable
Re-checked that every component is 64bit
Created ORACLE_HOME and ORACLE_BASE variables (which shouldn't be necessary)
If I change the php_oci8_12c.dll x64 to the 32bit one, I get a different error message:
Warning: PHP Startup: Unable to load dynamic library 'ext\php_oci8_12c.dll' - %1 ist keine zulässige Win32-Anwendung. (%1 is not a valid Win32 program.)
in Unknown on line 0
Extension 'oci8' not present.
Any ideas what's wrong with all that?
Thank You!
To sum it all up,
One more thing... NTS assumes that PHP does not run as Apache module,
is that correct? Are you using FastCGI? – Álvaro González
was the way to go. If anyone's having troubles with the same, here are the exact steps I took:
PHP 7.0.3 VC14 x64 Thread Safe from windows.php.net/download/
Apache 2.4.18 x64 from apachehaus.com/cgi-bin/download.plx
Oracle Instant Client 12.1.0.2.0 x64 from oracle.com/technetwork/topics/winx64soft-089540.html
(Get the current Thread Safe oci8 DLL from pecl.php.net/package/oci8, but PHP comes with a version of it - worked with either for me)
Install PHP as an Apache module. Unzip the Instant Client and move it to your desired location. Add this location to your PATH system variable. Restart your machine and it should show up under 'PATH' in your phpinfo().
Then I had to make the PHP extension_dir an absolute path. So no 'ext', but 'C:/Program Files/php-7.0.3/ext'. With only 'ext' set to the extension_dir I could connect to a remote Oracle DB via 'php.exe filename.php'. But Apache would throw me an error in error.log that it cannot find the DLL.
No DLL copying is needed if you choose to keep the oci DLL that comes with PHP. No more environment variables than PATH have to be changed/created.
At least in my case :-)

Issue Running Imagick module (PHP 5.3.5, WAMP server 2.1e)

I have installed Wamp server 2.1e-32bit and ImageMagick-6.8.9-7-Q16-x86-dll in Windows Server 2008 R2-x64. After completed my installation process and run wamp server, i get a error message and Imagick not working
The error msg is:
"PHP Warning: PHP Startup: imagick: Unable to initialize module
Module compiled with build ID=API20090626,TS,VC9
PHP compiled with build ID=API20090626,TS,VC6
These options need to match in Unknown on line 0"
How to resolve the problem?
Try the 64-bit DLL since you are running on Windows Server 2008 R2-x64 as recommended by the doc.
UPDATE:
If you don't already have the php_imagick.dll extension, you can download it from here. In your case, you will pick the php 5.3 Thread Safe (TS) x86 version. The caveat here is I am unsure if this will work with the latest imagemagick Q16 DLL.
Copy the php_imagick.dll file to your PHP ext folder, and update your php.ini to include extension=php_imagick.dll. Then restart your WAMP server.
Run phpinfo() to ensure the imagick library is loaded properly.

php_mcrypt extension for windows server 2008 R2

I found lots of articles about this problem, however none of them helped me.
Here is a I list of what I 've already tried:
uncomment the semicolon on php.ini
add the dependence file (libmcrypt.dll) on php folder, windows and
windows/system32
I 've restarted the IIS Server after each attempt
I cannot use this method, it was installed with a zip file.
On IIS Manager the extension is shown as enabled but checking the php error log I found this message multiple times:
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\v5.3\ext\php_mcrypt.dll' - %1 is not a valid Win32 application. in Unknown on line 0
Here is a the screenshot of phpinfo()
I have Windows Server 2008 R2 64bit with IIS 7.5 and PHP 5.3.10. Maybe the file (php_mcrytp.dll) is not the good one, where can I download it? On php site I cannot find the php_mcrytp.dll file under ext folder.
Thank you
If you downloaded PHP for Windows from php.net and are running the FastCGI version of PHP (as you should with PHP 5.3.x and IIS), mcrypt library is already compiled statically in the PHP engine. You don't need to install any extra DLL.
If you see the mcrypt section in phpinfo's output then it means mcrypt is already enabled (otherwise the mcrypt section would be missing).
And that's also the reason there is no mcrypt DLL.

Categories