Having a little trouble here with Apache 2.2 & PHP 5.3 & MySQL 5.5, seems PHP sees the MySQL module, the relevant parts have been added or un-commented and the DLL file does exists in the c:\php\ folder, but when I go to set up Mantis and run the setup, I get the below error.
Any obvious issues people have experienced with this?
If need be I can add my php.ini or httpd.conf, but I don't see any more config to be added to them than I have shown in the attachment below.
Cheers in advance
KS
This should trow a little more light on the subject (from the Apache error.log):-
PHP Warning: PHP Startup: mysql: Unable to initialize module\nModule
compiled with build ID=API20090626,NTS,VC9\nPHP compiled with build
ID=API20090626,TS,VC9\nThese options need to match\n in Unknown on
line 0 PHP Warning: PHP Startup: mysqli: Unable to initialize
module\nModule compiled with build ID=API20090626,NTS,VC9\nPHP
compiled with build ID=API20090626,TS,VC9\nThese options need to
match\n in Unknown on line 0 [Wed Apr 24 11:07:21 2013] [notice]
Apache/2.2.22 (Win32) PHP/5.3.23 configured -- resuming normal
operations ...
I'm using:
PHP v5.3.23
Apche v2.2.22
MySQL v5.5.30
SORTED!
Not sure how or why, but when I first installed PHP I used this php-5.3.23-nts-Win32-VC9-x86.msi installer and was getting the above error. I downloaded this zip php-5.3.23-Win32-VC9-x86.zip and used the mysql.dll and mysqli.dll from the zips /ext folder and replaced the DLLs in the installed c:\php\ext folder. Then restarted Apache and - bingo! worked!
The sizes and dates of the DLLs from the zip are slightly different tothe ones in the MSI install, so there must be a slight variation.
Phew - and they say PHP is simple to use, give my JSP pages any day!
Related
Today I have migrated my XAMPP's internals to 64bit:
Apache (from 32bit 2.4.25 to 64bit 2.4.27)
PHP (from 32bit 7.1.4 to 64bit 7.1.9)
I have downloaded each extension used before in 32bit, installed, configured (copy&paste mostly with path changes if needed) and generally everything "works".
-> % php --version
PHP 7.1.9 (cli) (built: Aug 30 2017 18:34:46) ( ZTS MSVC14 (Visual C++ 2015) x64 )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
But somehow I get PHP Startup: Unable to load dynamic library errors even if there are valid DLLs (most of them bundled in downloaded PHP package). These are curl, intl, ldap and imagick (the last one is installed by me). Paths are correct in php.ini (many other extensions are loaded properly from the same directory). This is what I get in php_error_log every time when I access page through Apache:
[22-Sep-2017 15:52:47 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'D:\Bin\XAMPP\7.0.9\php\ext\php_curl.dll' - The specified module could not be found.
in Unknown on line 0
[22-Sep-2017 15:52:47 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'D:\Bin\XAMPP\7.0.9\php\ext\php_intl.dll' - The specified module could not be found.
in Unknown on line 0
[22-Sep-2017 15:52:47 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'D:\Bin\XAMPP\7.0.9\php\ext\php_ldap.dll' - The specified module could not be found.
in Unknown on line 0
[22-Sep-2017 15:52:47 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'D:\Bin\XAMPP\7.0.9\php\ext\php_imagick.dll' - The specified module could not be found.
in Unknown on line 0
In CLI everything is fine (it's the same php.ini as for Apache):
-> % php -i | grep -n3 curl
175:curl
178-cURL Information => 7.55.0
-> % php -i | grep -n3 ldap
347:ldap
349-LDAP Support => enabled
350-RCS Version => $Id: 0779387e5f88edc656159d12b9302a053e82cc79 $
-> % php -i | grep -n3 intl
330:intl
332-Internationalization support => enabled
333-version => 1.1.0
335-ICU Data version => 57.1
but in Apache I have Attempted to call function "curl_init" ... error :(
Any ideas?
I had the same problem on Windows 10 and solved it by adding the php home directory to the system (NOT user!) PATH environment and rebooting the system.
When Apache is installed as a service it is run as a system user which means it does not see your user environment variables.
it's basically 404'ing the dll's. either the user that apache runs as, doesn't have permissions to read the folder D:\Bin\XAMPP\7.0.9\php\ext\ , or the folder doesn't exist. as for why it works in cli but not in apache, they're probably reading different php.ini's , but it could also be that php-cli runs as a different user account. to check that, run php -r 'phpinfo();' | grep -i username in cli, and a page with <?php phpinfo(); and look for "Enviorment" > "User" in apache phpinfo(); , the pages will also tell you if they're loading the same php.ini file.
and nothing of this has anything to do with programming, so i say again, this should be on serverfault.com or something, not stackoverflow.com
Check if your DLL's are in proper version. There is quite often difference between x64 and x86 version, also between ZTS and NON TREAD SAFE. For some reason instead of nice error message of ddls being incompatible you will only get information: cannot load extension.
Well, this is weird but the root problem of this issue was... using Apache as service. I can't explain why, but when running Apache as service these extensions could not be loaded, but when running without service, using only "Start" from XAMPP control center, all is working fine with the same config and directory/file structure.
I realized that when I wanted to back to my previous working versions and I linked 32bit versions again (I use apache and php symlinks in XAMPP installation dir). cURL was not loaded, but it was working before migrating to 64bit. So I started digging and experiment with service and after unregistering it started working correctly. So I thought it could be the case with 64bit too... And it was.
Now I can start Apache properly. There is still minor issue because XAMPP control panel doesn't show Apache as running after clicking "Start", but processes are there and is working. But most important is everything is OK under the hood.
I had the same problem. All extensions loaded except these two: amqp and pdo_sqlite:
PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_sqlite' (tried: D:\\xampp74\\php\\ext\\pdo_sqlite (The specified module could not be found.), D:\\xampp74\\php\\ext\\php_pdo_sqlite.dll (The specified module could not be found.)) in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'amqp' (tried: D:\\xampp74\\php\\ext\\amqp (The specified module could not be found.), D:\\xampp74\\php\\ext\\php_amqp.dll (The specified module could not be found.)) in Unknown on line 0
One solution is so add the php path to your environmental variable PATH.
The real problem here is that although extension dlls live in xampp\php\ext, some extensions have additional files that are located in xampp\php. These additional dlls are the ones that can not be loaded if the php path is not added to your PATH.
If you do not want to add the PHP path to your PATH, the solution is to add the extra dll files to the xampp\apache\bin folder (copy, not move). In my case:
libsqlite3.dll for pdo_sqlite
rabbitmq.4.dll and rabbitmq.4.pdb for php_amqp
Or, if you start apache via a batch file, add the php path before starting apache:
SET PATH=%PATH%;d:\xampp74\php
In my apache error.log I have the following line:
PHP Warning: PHP Startup: Unable to load dynamic library 'ext\\php_curl.dll' - The specified procedure could not be found.\r\n in Unknown on line 0
However I have checked my PATH variable and the PHP directory is listed, the ext folder is set correctly and php_curl.dll exists in the folder.
I have reinstalled VC++ redistributes to ensure that there are no issues there.
During my checking I have found that all of the following DLLs are present when opening them from run (to test they can be found from the PATH variable):
ws2_32.dll
wldap32.dll
php7ts.dll
libeay32.dll
libssh2.dll
nghttp2.dll
ssleay32.dll
normaliz.dll
kernel32.dll
vcruntime140.dll
api-ms-win-crt-stdio-l1-1-0.dll
api-ms-win-crt-string-l1-1-0.dll
api-ms-win-crt-heap-l1-1-0.dll
api-ms-win-crt-convert-l1-1-0.dll
api-ms-win-crt-filesystem-l1-1-0.dll
api-ms-win-crt-runtime-l1-1-0.dll
api-ms-win-crt-utility-l1-1-0.dll
api-ms-win-crt-time-l1-1-0.dll
api-ms-win-crt-environment-l1-1-0.dll
I am unsure of what dependencies that php_curl could have, if you could provide any suggestions then this would be greatly appreciated.
More system info:
Compiler MSVC14 (Visual C++ 2015)
Architecture x64
Windows 7 platform
PHP version 7.1.4
Apache version 2.4
I have the same issue. I was not able to find the root cause for this error but I managed to find a fix. Simply copied php_curl.dll from previous version of php I used - 7.1.2 x86 Thread Save. Everything works fine for now.
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 can't believe this hasn't been asked before, but here goes:
I'm trying to install xdiff on Windows (64-bit) using WAMP and PHP version 5.3.
pecl.php.net doesn't offer a .dll file for this combination so I tried downloading the 5.3 x86 files and the 5.5 x64 versions, but neither worked. The x86 version generated the following warning in the apache logs:
[Thu Jun 05 15:55:47 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.13/ext/php_xdiff.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.13/ext/php_xdiff.dll' - %1 is not a valid Win32 application.
in Unknown on line 0
The x64 version generated this warning:
[Thu Jun 05 15:58:16 2014] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.13/ext/php_xdiff.dll' - The specified module could not be found.\r\n in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.13/ext/php_xdiff.dll' - The specified module could not be found.
in Unknown on line 0
At that point, I went back and read the readme file a little more closely and discovered the following line:
This extension requires libxdiff (http://www.xmailserver.org/xdiff-lib.html).
Okay, fair enough. Following the advice on this page I compiled libxdiff but then I got to the step that read
Once compiled you need to copy all the headers and libraries into the appropriate PHP library directories.
And I have no idea what the "appropriate PHP library directories" are nor what files I'm supposed to be copying, nor even if the missing libxdiff is the problem (or if the real problem is that the .dll file I'm using is just incompatible with PHP 5.3 x64 and I should be trying to compile the PECL extension instead of libxdiff).
Does anyone have any advice?
OK, by virtue of this message I assume you are runnning the 32bit Wampserver. Thats ok, 32 code runs on a 64bit OS, but not the other way round.
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.13/ext/php_xdiff.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0
So you will need to download the 32bit version of php_xdiff
Because of the way WampServer configures Apache & PHP you will need the Thread Safe dll i.e. download filename contains -ts- and not -nts-
As you are trying to add this to PHP5.3.x you will probably need the version compiled with VC9 unless PHP5.3.you_dont_specify is so old it is compiled with VC6 in which case I am not sure where you can get a version from. In that case you may be looking at upgrading you Apache and PHP version at least.
php_xdiff from here
pecl dependancies compiled libraries from here, like libxdiff
Complementary to what RiggsFolly has already posted, which is correct, please keep in mind that you need to include xdiff in your php.ini file to be able to use xdiff* functions in Wamp.
This can be tricky, because there are actually two php.ini files in your wamp\bin\php directory. One is called php.ini and the other is called phpForApache.ini, and the active one is the one called phpForApache.ini (or at least that's how it is on my set-up)
To include the xdiff extension, you need to search the php.ini file for extension= and add the xdiff extension, like so:
PHP 7.1 or earlier
extension=... (other extensions)
extension=php_xdiff.dll
PHP 7.2+
extension=... (other extensions)
extension=xdiff
Okay, I've read the php.net docs, I've browsed numerous sites including stackoverflow for solutions and nothing has helped. So I'm asking, is there anyone who can post a definitive guide for getting enchant to work on Windows?
My set up is:
Windows 7
WAMP Server 2.0
PHP 5.3.0
PHP is located in
C:/wamp/bin/php/php5.3.0
I downloaded the php_enchant.dll from http://downloads.php.net/pierre/php_enchant-1.1.0-5.3-vc9-x86.zip and unzipped its contents. I did as the readme stated and
moved php_enchant.dll into C:/wamp/bin/php/php5.3.0/ext (my
extensions path)
moved all other dll files into C:/wamp/bin/php/php5.3.0
added extension=php_enchant.dll to my php.ini
restarted httpd
For dictionaries, I followed the first answer here PHP: Enchant Spell Checking not working. Configuration in Windows?
I downloaded the correct dictionary zips from Mozilla
I placed them inside of C:/wamp/bin/php/php5.3.0/share/myspell/dicts
After all of this trying to run
enchant_broker_init();
gives a fatal error. I really don't know what else to do. If anyone can give me some advice I'd really appreciate it.
Edit: Okay so my apache error log gives the following error
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.0/ext/php_enchant.dll' - The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.\r\n in Unknown on line 0 <b>Warning</b>: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.3.0/ext/php_enchant.dll' - The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.in <b>Unknown</b> on line <b>0</b>[Wed Mar 05 15:28:02 2014] [notice] Child 6128: Child process is running
Pulling out my hair now.
Do you really mean WAMPServer 2.0?
That enchant was compiled with VC9, check that your PHP and Apache were also compiled with VC9, if not you need an enchant dll that was compiled with the same compiler as your Apache and PHP.
As you have PHP5.3.0 I would guess they are compiled with VC6.
Had the same problem. Add PHP path to Windows PATH variable and restart wampserver.