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
Related
My PHP Version 7.2.1 and Architecture is x86 and System is Windows 10 64 bit so I have downloaded chilkat-9.5.0-php-7.2-nts-win32 from https://www.chilkatsoft.com/php.asp#winDownloads
and extension DLL file added into my C:/xampp/php/ext such as "C:/xampp/php/ext/chilkat_9_5_0.dll" and updated my php.ini as well
But PHP is throwing startup warning and chilkat extension is not working for me could you please guide me where is i am wrong.
My php.ini
extension_dir="C:\xampp\php\ext"
extension=chilkat_9_5_0
PHP Error
PHP Warning: PHP Startup: Unable to load dynamic library 'chilkat_9_5_0' (tried: C:\xampp\php\ext\chilkat_9_5_0 (The specified module could not be found.
), C:\xampp\php\ext\php_chilkat_9_5_0.dll (The specified module could not be found.
)) in Unknown on line 0
well first of all you need to find if your PHP is NTS (None Thread Safe) or TS (Thread Safe) by phpinfo()
as you can see thread safety is enabled which means that PHP is TS
and my PHP version is 7.2.34 x64 which means that i have to download
chilkat PHP 7.2.* (thread-safe) x64
after installation place chilkat_9_5_0.dll in (C:\xampp\php\ext)
if you are using xamp my default require() is at (C:\xampp\php\pear)
so move chilkat_9_5_0.php to (C:\xampp\php\pear)
in the php.ini search for dynamic extension and below add ( extension=chilkat_9_5_0.dll ) with the .dll
restart XAMP and test it with the given test.php file in the downloads and it should work
I have a problem with pthreads in PHP.
When I start apache I see error like this:
php.exe - Entry point not found
The procedure entry point was not found _zend_hash_update##12 in library D:\xampp\php\ext\php_pthreads.dll
When I execute script in CMD I have a warning:
PHP Warning: PHP Startup: Unable to load dynamic library 'php_pthreads.dll' (tried: D:\xampp\php\ext\php_pthreads.dll
I copied pthreadVC2.dll to:
C:/windows/system32
D:/xampp/php
D:/xampp/apache/bin
And I copied last file php_pthreads.dll to:
D:/xampp/ext
I added to php.ini line with:
extension=php_pthreads.dll
My config:
XAMPP on Windows 10
PHP Version 7.3.0
Compiler: MSVC15 (Visual C++ 2017)
Architecture: x86
Thread Safety is enabled
Thread API is Windows Threads
php_threads 3.1.6 x86 downloaded from https://windows.php.net/downloads/pecl/releases/pthreads/3.1.6/
I tried in php 7.2.x and i had the same problem but other apache startup error message.
Maybe someone can help me.
My problem was solved!
My advices:
Downgrade to 7.2.x version PHP on xampp (because pthreads 3.2.0 is compltible with php 7.2)
Download and install php_pthreads-3.2.0 (which is compiled MSVC 15 the same as
PHP. Link: https://github.com/krakjoe/pthreads/releases)
Delete pthreadVC2.dll from apache/bin (because it isn't needed)
Make copy php.ini and save copy as php-cli.ini
From php.ini remove line with extension=php_pthreads.dll (this line must be exist in php-cli.ini)
Try in CMD command: php --ini and check Loaded Configuration File. That must be set as php-cli.ini. And also try command: php -i and find pthreads in result.
I have manually installed Apache and PHP on my server and it has to connect to the sql server 2012 for DB. My configurations are as below:
Apache 2.4.23 VC11 x64 installed on E:\
PHP 7.0.12 VC14 x64 installed on e:\
I have installed the srv dlls from the microsoft website.( SQLSRV40.exe). Also I have installed the msodbcsql dll and the sql native client (both 64bit) , but while I run these two .exe it gets installed on to the default path which is c:\
I have enabled the php_errors and I could see that php is working fine with the phpinfo() but on the phpinfo() i dont see the sql.dll files being picked up. More over the php_error file throws the error:
"[01-Nov-2016 12:14:58 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'E:/php/ext/php_sqlsrv_7_ts_x64.dll' - The specified module could not be found.
in Unknown on line 0
[01-Nov-2016 12:14:59 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'E:/php/ext/php_sqlsrv_7_ts_x64.dll' - The specified module could not be found.
in Unknown on line 0"
Am not able to figure out what went wrong, Could some one help me out, please
You can simply move the .dll files from C:\ to E:\php\ext\ (copy & paste).
Alternatively you can alter the path in the php.ini file which should also be in E:\php.
It might be helpful if you search for all files containing the text php_sqlsrv_7_ts_x64 then you know where they are actually loaded.
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 :-)
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?