PHP8 extension could not be loaded (all) - php

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.

Related

Xampp Unable to load dynamic library 'php_pthreads.dll'

After downloading the latest version of pthread, coping php_pthreads.dll file into C:\xampp\php\ext folder and pthreadVC2.dll to C:\xampp\php folder and restarting apache, when i try to use composer update command i get this error:
PS C:\xampp\htdocs\xxx_pro> composer update
PHP Warning: PHP Startup: Unable to load dynamic library 'php_pthreads.dll' (tried: C:\xampp\php\ext\php_pthreads.dll (The specified module could not be found), C:\xampp\php\ext\php_php_pthre
ads.dll.dll (The specified module could not be found)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'php_pthreads.dll' (tried: C:\xampp\php\ext\php_pthreads.dll (The specified module could not be found), C:\xampp\php\ext\php_php_pthreads.d
ll.dll (The specified module could not be found)) in Unknown on line 0
here the name of php_pthreads file isn't php_php_pthreads.dll.dll and i'm interested why this file name is wrong on output
i also added "ext-pthreads": "*" to composer.json

Install php extension on wampserver 3

I would like to install the php_bolt extension in php in order to encode my souces.
I have placed my php_bolt.dll file in the php extensions folder.
In my php.ini file I add the line extension=php_bolt.dll.
the extension is still not loaded. And I do not know why.
In command line I have the following error
PHP Startup: Unable to load dynamic library 'php_bolt.dll' (tried: G: /wamp64/bin/php/php7.2.25/ext/php_bolt.dll
(The specified module could not be found.), G:/wamp64/bin/php/php7.2.25/ext/php_php_bolt.dll.dll
(The specified module could not be found.)) in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library 'intl' error

I am trying to execute command "composer install" command. But getting this error:
PHP Warning: PHP Startup: Unable to load dynamic library 'intl' (tried: ./ext/intl (The specified module could not be found.), ./ext/php_intl.dll (The specified module could not be found.)) in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'intl' (tried: ./ext/intl (The specified module could not be found.), ./ext/php_intl.dll (The specified module could not be found.)) in Unknown on line 0
PHP Warning: Module 'pdo_mysql' already loaded in Unknown on line 0
Warning: Module 'pdo_mysql' already loaded in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'intl' (tried: ./ext/intl (The specified module could not be found.), ./ext/php_intl.dll (The specified module could not be found.)) in Unknown on line 0
PHP Warning: Module 'pdo_mysql' already loaded in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'intl' (tried: ./ext/intl (The specified module could not be found.), ./ext/php_intl.dll (The specified module could not be found.)) in Unknown on line 0
Warning: Module 'pdo_mysql' already loaded in Unknown on line 0
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested PHP extension ext-intl * is missing from your system. Install or enable PHP's intl extension.
this is my php ini file. I removed ";" from " extension=intl" but still it giving me error
;extension=bz2
extension=curl
extension=fileinfo
extension=gd2
;extension=gettext
;extension=gmp
extension=intl
;extension=imap
;extension=interbase
;extension=ldap
extension=mbstring
;extension=exif ; Must be after mbstring as it depends on it
;extension=mysqli
;extension=oci8_12c ; Use with Oracle Database 12c Instant Client
;extension=odbc
extension=openssl
;extension=pdo_firebird
;extension=pdo_mysql
;extension=pdo_oci
;extension=pdo_odbc
;extension=pdo_pgsql
;extension=pdo_sqlite
;extension=pgsql
;extension=shmop
Simple copy your icu*63.dll or icu*68.dll (for PHP 8) files from your php directory to apache24/bin
It works for Apache + PHP 8.0.0 x64 + intl
if you use PHP v7.3.2 it has a reported bug in this link regarding loading dynamic library intl.
I had similar problems migrating from php7.4 to php8.1 on a Windows server. The solution was to add the path to php8 directory AND to php8 ext directory in the PATH environnement variable.

PHP Warning: PHP Startup: Unable to load dynamic library 'bz2'

Warning: PHP Startup: Unable to load dynamic library 'gd2' (tried:
E:\phpXampp\php\ext\gd2 (The specified module could not be found.),
E:\phpXampp\php\ext\php_gd2.dll (The specified module could not be
found.)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to
load dynamic library 'gettext' (tried: E:\phpXampp\php\ext\gettext
(The specified module could not be found.),
E:\phpXampp\php\ext\php_gettext.dl l (The specified module could not
be found.)) in Unknown on line 0
I have this problem installing laravel. Actual link is
E:\XAMPPL\php\ext\gettext while it show E:\phpXampp\php\ext\gettext in warning.
How to change the path?
Go to you php installation folder - I'm guessing this is E:\XAMPPL\php\. Open and edit the php.ini file there.
Look for the line containing extension_dir. This is used by php to locate your extensions. Edit this line to:
extension_dir = "E:\XAMPPL\php\ext"
This should solve the problem.
Alternatively, you could just edit it to:
extension_dir = "ext"
They both refer to the same path.
I uninstalled composer and then installed latest composer setup and restarted my PC. And it Worked.

Laravel print to printer

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.

Categories