Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: PHP Warning |
|
Author |
|
Zero Fer
Joined: 09 Apr 2020 Posts: 2 Location: São Paulo - Brazil
|
Posted: Thu 09 Apr '20 22:09 Post subject: PHP Warning |
|
|
I have two notebooks one with Windows 10 Home and the other with Windows 10 Pro.
I have both running Apache (Apache Lounge 2.4.43) + PHP (PHP 7.4.4) - BOTH 64 bit.
PHP is running perfectly only on the Home version, with all the desired extensions, the same does not happen with the Pro version system.
In the Pro version, they only carry a few extensions.
In this Pro version, it only loads some extensions, while others like curl, intl and sodium never load, and the same message is always displayed in the Apache log:
PHP Warning: PHP Startup: Unable to load dynamic library 'curl' (tried: D:\\php7-64\\php\\ext\\curl (The specified module could not be found.), D:\\php7-64\\php\\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 'intl' (tried: D:\\php7-64\\php\\ext\\intl (The specified module could not be found.), D:\\php7-64\\php\\ext\\php_intl.dll (The specified module could not be found.)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'sodium' (tried: D:\\php7-64\\php\\ext\\sodium (The specified module could not be found.), D:\\php7-64\\php\\ext\\php_sodium.dll (The specified module could not be found.)) in Unknown on line 0
For other extensions everything is normal.
In the notebook with Windows 10 Home, as I said, everything is normal.
This is only happening in the note with Windows 10 Pro, since the settings are identical.
I don't know how to resolve this; that's why I'm using you.
Does it have something to do with Windows 10 Pro?
There is nothing about it on the web. |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Fri 10 Apr '20 1:06 Post subject: |
|
|
I've seen this problem over on the Xampp forum.
I know you are running php as a module (php7_apache2_4.dll) because of this.
Basically, Apache cannot find a dll for the dependency (curl, sodium, etc.) because it doesn't know where to find it so tell it;
<IfModule php7_module>
# PHP core [1]
Loadfile D:\\php7-64\\php\\php7.dll
# for curl
Loadfile D:\\php7-64\\php\\libcurl.dll
# International (php_intl)
Loadfile D:\\php7-64\\php\\icui18n.dll
# Note: may need other icu*.dlls, don't know)
# Sodium
Loadfile D:\\php7-64\\php\\libsodium.dll
# SQLite3
Loadfile D:\\php7-64\\php\\libsqlite3.dll
</IfModule>
Maybe win10 home has php in the system path and pro doesn't. That's really the easiest way to fix but I personally do like putting php in the path.
[1] May or may not need to load the core in this manner but I doubt it would hurt. |
|
Back to top |
|
Zero Fer
Joined: 09 Apr 2020 Posts: 2 Location: São Paulo - Brazil
|
Posted: Mon 13 Apr '20 19:37 Post subject: PHP Warning |
|
|
"Problem" solved. It was enough to reference the folders: D:\php7-64, D:\php7-64\php and D: php7-64\php\ ext in the PATH environment variable.
I had forgotten this provision. |
|
Back to top |
|
Otomatic
Joined: 01 Sep 2011 Posts: 205 Location: Paris, France, EU
|
Posted: Thu 16 Apr '20 12:34 Post subject: |
|
|
Hi,
With Wampserver, I have a totally different approach.
I don't use the PATH environment variable which I have absolutely no control over. It can be modified, altered, by any application. Moreover, if you change the PHP version, you have to think about changing this environment variable and it is not a simple matter if it has been modified by another software.
In the httpd.conf file, before loading the php5 or ph7 module, there is :
Code: | PHPIniDir "${APACHE_DIR}/bin"
LoadModule php7_module "${INSTALL_DIR}/bin/php/php7.4.5/php7apache2_4.dll" |
and, in Apache's bin directory, I put symbolic links on the necessary dlls as well as on the php.ini of the PHP version used. For example, for PHP 7.4.5 noted above, there is :
Code: | 16/04/2020 12:07 <SYMLINK> icudt65.dll [E:/wamp64/bin/php/php7.4.5/icudt65.dll]
16/04/2020 12:07 <SYMLINK> icuin65.dll [E:/wamp64/bin/php/php7.4.5/icuin65.dll]
16/04/2020 12:07 <SYMLINK> icuio65.dll [E:/wamp64/bin/php/php7.4.5/icuio65.dll]
16/04/2020 12:07 <SYMLINK> icuuc65.dll [E:/wamp64/bin/php/php7.4.5/icuuc65.dll]
16/04/2020 12:07 <SYMLINK> libpq.dll [E:/wamp64/bin/php/php7.4.5/libpq.dll]
16/04/2020 12:07 <SYMLINK> libsasl.dll [E:/wamp64/bin/php/php7.4.5/libsasl.dll]
16/04/2020 12:07 <SYMLINK> libsodium.dll [E:/wamp64/bin/php/php7.4.5/libsodium.dll]
16/04/2020 12:07 <SYMLINK> libsqlite3.dll [E:/wamp64/bin/php/php7.4.5/libsqlite3.dll]
16/04/2020 12:07 <SYMLINK> libssh2.dll [E:/wamp64/bin/php/php7.4.5/libssh2.dll]
16/04/2020 12:07 <SYMLINK> php.ini [E:/wamp64/bin/php/php7.4.5/phpForApache.ini]
16/04/2020 12:07 <SYMLINK> php7ts.dll [E:/wamp64/bin/php/php7.4.5/php7ts.dll]
|
and it's automatically changed if you change the PHP version. |
|
Back to top |
|
alexhalesjames
Joined: 21 Sep 2020 Posts: 1 Location: landon
|
Posted: Sun 27 Sep '20 15:58 Post subject: |
|
|
Text removed, is a spam post |
|
Back to top |
|
|
|
|
|
|