I just installed xampp and I cannot get php to work
When I type php at the command line i get
PHP Warning: PHP Startup: Unable to load dynamic library 'curl'
(tried: C:\xampp\php\ext\curl (The specified module could not be
found.), C:\xampp\php\ext\php_curl.dll (%1 is not a valid Win32
application.)) in Unknown on line 0
The file php_curl.dll is at C:\xampp\php\ext\php_curl.dll
I was thinking when it says (%1 is not a valid Win32 application.)) means php_curl.dll is corrupt. I tried to reinstall xampp still did not work
Related
I build up a new development Windows with:
Windows 10 Prof. -
Apache 2.4.54 -
PHP 8.1.7
The problem is that PHP could not load the extension (it does not matter which one I activate).
Configuration in php.ini
extension_dir = "ext"
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
extension=curl
extension=mbstring
extension=openssl
In the apache Log throw the following message:
PHP Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: ext\\curl (The specified module could not be found), ext\\php_curl.dll (The specified module could not be found)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'mbstring' (tried: ext\\mbstring (The specified module could not be found), ext\\php_mbstring.dll (The specified module could not be found)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'openssl' (tried: ext\\openssl (The specified module could not be found), ext\\php_openssl.dll (The specified module could not be found)) in Unknown on line 0
The installation paths are: c:\Webserver\Apache24
c:\Webserver\php
At first I thought of a permission problem, so I open the hole directory of "Webserver" to "everyone" with "full access", but this does not solve the problem.
Looks like I found the problem. After I added the path of the PHP folder to the Windows environment variables and restart windows, the error message was gone.
I have PHP 8 installed and have put all the dll to their respective paths
php_zmq.dll file in C:\xampp\php\ext
libzmq.dll file in C:\xampp\php
And I also added the extension=php_zmq.dll in php.ini, but still got the error in php cli
PHP Warning: PHP Startup: Unable to load dynamic library
'php_zmq.dll' (tried: C:\xampp\php\ext\php_zmq.dll (%1 is not a valid
Win32 application), C:\xampp\php\ext\php_php_zmq.dll.dll (The
specified module could not be found)) in Unknown on line 0
Do you have any idea how to fix this ?,
Is there any stable version for PHP Binding ZeroMQ
I am using WAMP with PHP 7.2.4. I need to use PHP's ZipArchive, for which I need the zip.so (php_zip.dll) extension.
I've read it is somehow included in PHP's core since 5.6.x (I believe), so I tried to simply add
extension=php.so
or
extension=php_zip.dll
to php.ini file (tried both lines, also tried both php.ini and phpForApache.ini). It didn't work, so I've downloaded php_zip.dll file (5.6 NTS x64) from here: https://pecl.php.net/package/zip/1.12.4/windows , copied it to /wamp64/bin/php7.2.4/ext/ and repeated the process, with the same results.
When I look into PHP error log, this is what I get:
[03-Mar-2020 07:15:04 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'zip.so' (tried: c:/wamp64/bin/php/php7.2.4/ext/zip.so (The specified module could not be found.), c:/wamp64/bin/php/php7.2.4/ext/php_zip.so.dll (The specified module could not be found.)) in Unknown on line 0
[03-Mar-2020 07:15:04 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'php_zip.dll' (tried: c:/wamp64/bin/php/php7.2.4/ext/php_zip.dll (The specified module could not be found.), c:/wamp64/bin/php/php7.2.4/ext/php_php_zip.dll.dll (The specified module could not be found.)) in Unknown on line 0
I get the first or second line, depending on whether I tried to load php.so, or php_zip.dll extension. Notice the path near the end of those lines: .../ext/php_php_zip.dll.dll. Because of this I also tried to load simply extension=zip, but no luck.
How can I get it to work?
I keep getting this error when I try to run cUrl:
Call to undefined function curl_init()
So I try to install it with these lines:
extension_dir = "C:\PHP7\ext"
extension=curl
But it never shows up in my phpinfo();
Here is from the Apache error log:
PHP Startup: Unable to load dynamic library 'curl' (tried: C:\\PHP7\\ext\\curl (The specified module could not be found.), C:\\PHP7\\ext\\php_curl.dll (The specified procedure could not be found.)) in Unknown on line 0
And I've also tried the absolute path to curl (extension=C:\PHP7\ext\php_curl.dll)
If:
Your settings look correct.
You're trying to load the right DLL for your PHP installation and not e.g. some random one you found in Google).
Curl works just fine from command-line PHP.
But you get this when running PHP as Apache module:
PHP Startup: Unable to load dynamic library 'curl' (tried: C:\...\ext\curl (The specified module could not be found.), C:\...\ext\php_curl.dll (The specified procedure could not be found.)) in Unknown on line 0
Then there's a chance that it gets fixed if you upgrade Apache to the latest build. (I've had that same problem myself.)
That was my problem too. I decided to upgrade my apache to Apache version 2.4.41
Link to binary if you install manually: https://www.apachelounge.com/download/
My php version is 7.3.9
good luck
Im trying to add the printer extension to laravel. But I don't know how to do this while using Laravel. It says that I have to add the php_printer.dll to php.ini. But I use Laravel. Does anyone know how I can add this extension to Laravel?
Link:
http://php.net/manual/fa/book.printer.php
Update:
I added the extension in the ext map but now it says that it can not be found
I get the following error:
PHP Warning: PHP Startup: Unable to load dynamic library 'php_printer.dll' (tried: C:\xampp\php\ext\php_printer.dll (The specified module could not be found.), C:\xampp\php\ext\php_php_printer.dll.dll (The specified module could not be found.)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'php_printer.dll' (tried: C:\xampp\php\ext\php_printer.dll (The specified module could not be found.), C:\xampp\php\ext\php_php_printer.dll.dll (The specified module could not be found.)) in Unknown on line 0
Laravel development server started: http://127.0.0.1:8000
[Wed Sep 5 14:37:23 2018] PHP Warning: PHP Startup: Unable to load dynamic library 'php_printer.dll' (tried: C:\xampp\php\ext\php_printer.dll (The specified module could not be found.), C:\xampp\php\ext\php_php_printer.dll.dll (The specified module could not be found.)) in Unknown on line 0
Lets first get the terms right.
The extension you are adding isn't a laravel extension. It is a PHP extension. Laravel is a framework that is written in PHP.
You can not just add the directive into the php.ini file and expect it to work. You also need to install the files. In this case you need to get them from PECL.
The question of how to install is already asked and answereed here installing php_printer on wamp server
If you are using XAMPP, open it up and click on apache->config, you can find php.ini there.