Adding the ZeroMQ PHP extension to XAMPP on Windows 10 and PHP7 - php

I am having issues adding the ZeroMQ PHP extension to XAMPP.
Setup: Windows 10, PHP7, XAMPP (7.0.9)
Steps I already took:
Added PHP (D:\xampp7\php) and PHP extensions (D:\xampp7\php\ext) directories to system variable (PATH)
Followed the instructions on zeromq.org. I downloaded x86ts version from the pecl repository as the listed snapshot link (http://snapshot.zero.mq/) was down.
Copied libzmq.dll into PHP directory and php_zmq.dll into the PHP extension directory
Updated php.ini (D:\xampp7\php\php.ini) by adding extension=php_zmq.dll and checked the extensions directory which is extension_dir="D:\xampp7\php\ext"
Restarted XAMPP via the control panel.
The Apache error log shows the following:
[Sat Nov 26 18:30:27.461679 2016] [ssl:warn] [pid 15280:tid 588] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sat Nov 26 18:30:27.546320 2016] [core:warn] [pid 15280:tid 588] AH00098: pid file D:/xampp7/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Nov 26 18:30:27.630955 2016] [ssl:warn] [pid 15280:tid 588] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\xampp7\\php\\ext\\php_zmq.dll' - Das angegebene Modul wurde nicht gefunden.\r\n in Unknown on line 0
[Sat Nov 26 18:30:27.662208 2016] [mpm_winnt:notice] [pid 15280:tid 588] AH00455: Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/7.0.9 configured -- resuming normal operations
[Sat Nov 26 18:30:27.662208 2016] [mpm_winnt:notice] [pid 15280:tid 588] AH00456: Apache Lounge VC14 Server built: Jul 1 2016 11:09:37
[Sat Nov 26 18:30:27.662208 2016] [core:notice] [pid 15280:tid 588] AH00094: Command line: 'd:\\xampp7\\apache\\bin\\httpd.exe -d D:/xampp7/apache'
[Sat Nov 26 18:30:27.662208 2016] [mpm_winnt:notice] [pid 15280:tid 588] AH00418: Parent: Created child process 964
[Sat Nov 26 18:30:28.363210 2016] [ssl:warn] [pid 964:tid 616] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
Update:
It looks like the module cannot be found, but if I add the x64 Version the Apache error log indicates that the module is not a not a valid Win32 application.
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\\xampp7\\php\\ext\\php_zmq.dll' - %1 ist keine zul\xef\xbf\xbdssige Win32-Anwendung.\r\n in Unknown on line 0
Solution:
Adding LoadFile "D:/xampp7/php/libzmq.dll"to httpd.conf fixed my issue.

these steps worked for me (php 7.1.7 - xampp - window 10 x64)
Step 1
download x86 dll files from this site
Step 2
copy php_zmq.dll to C:\xampp\php\ext
Step 3
copy libsodium.dll and libzmq.dll to C:\xampp\php
Step 4
add extension=php_zmq.dll to php.ini file
Step 5
restart apache

I know this is an old question although I just spent 2 days trying to get ZeroMQ to load properly. If anyone still cant get it to work after following all the basic instructions, I have 2 more steps you can look into.
Got it working with php 7.3.12, Win10 x64
1st. Make sure you edit all php.ini files.
If you use wamp server, Apache will have it's own php.ini that is opened up when you click on the wamp icon in the bottom right of windows and go to php->php.ini. Then manually add the same extension=php_zmq.dll there as well as your php.ini under D:\xampp7\php\php.ini. To be honest, I'm not 100% sure that this is necessary but including it on both cant hurt.
2nd. Run deplister.exe on libzmq.dll
This is what got it working for me. Any php download from windows.php.net should have deplister.exe (it is included in wamp php versions too). Go to your php version library on your wamp server where libzmq.dll and deplister.exe are located. Then open up cmd and run the line: deplister php_zmq.dll This will show you a list of the dependencies that php_zmq.dll requires to run. You may notice that it requires a VERY specific version of libzmq.dll so go and rename your dll file to the requested file name. Then run php -m to see if zmq is displayed on the list of modules. If so, you should be able to run commands like composer update to get the required library versions imported into your project without error!

Related

XAMPP Apache won't open

I have been pulling my hair out for the last hour or so trying to get the Apache service to work for class. I have been running apache-control.exe as an admin and I tried it as both an installed and uninstalled service. I have changed the ports it runs on, I have reinstalled XAMPP many times, and I have reinstalled the Microsoft VCRuntime.
Here is what my error log looks like:
[Mon Sep 26 12:52:35.034165 2022] [ssl:warn] [pid 5988:tid 352] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
PHP Warning: 'C:\\WINDOWS\\SYSTEM32\\VCRUNTIME140.dll' 14.0 is not compatible with this PHP build linked with 14.29 in Unknown on line 0
[Mon Sep 26 12:52:35.088318 2022] [:emerg] [pid 5988:tid 352] AH00020:
Configuration Failed, exiting

Need to update Xampp php 7.3 to 7.4. Shows Apache error

I need Xampp for Windows 32 bit with a php version of at least 7.4. I can only find a php version 7.3 which is too low. So I need to upgrade it.
I downloaded vc15 x86 threadsafe/zip from, php.net. I extracted it. Renamed xampp\php to xammp\php-old. I then copied php.ini-development to php.ini and made all the changes to php.ini as per this tutorial https://www.youtube.com/watch?v=ir_ZewB_PHY
I restarted Xampp but its giving the error message: Error: Apache shut down unexpectedly. This may be due to a blocked port, missing dependencies..."
I dont have Skype/ Team Viewer or Anydesk open.
I changed the port settings of the httpd.conf File to listen to port 8080 instead of port 80. In http-ssl.conf I changed listen 443 to listen 4433.
I restarted Xampp but I'm still having errors. The Apache (error.log) reflects there errors.
[Wed Aug 24 12:39:53.747228 2022] [ssl:warn] [pid 4220:tid 460] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Wed Aug 24 12:39:53.922456 2022] [core:warn] [pid 4220:tid 460] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Wed Aug 24 12:39:53.922456 2022] [ssl:warn] [pid 4220:tid 460] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
PHP Warning: 'vcruntime140.dll' 14.0 is not compatible with this PHP build linked with 14.16 in Unknown on line 0
[Wed Aug 24 12:39:53.938089 2022] [:emerg] [pid 4220:tid 460] AH00020: Configuration Failed, exiting
I really dont know how to solve this and support will be greatly appreciated. My os is Windows 10 32 bit. I was told my laptop cant be upgraded to 64 bit.
Many thanks in advance.
Edit 24 August 2022 !7h30 Johannesburg
I checked PHP module lines in my httpd-xamp.conf is correct.
LoadFile "C:/xampp/php/php7ts.dll"
LoadFile "C:/xampp/php/libpq.dll"
`LoadModule php7_module "C:/xampp/php/php7apache2_4.dll"
I ran httpd.exe -t from the windows command prompt it it shows that the syntax is OK.
I ran httpd.exe -v and it shows Server version: Apache/2.4.38 (Win32)

Softaculous Ampps 3.8 Apache not starting if i change PHP version to 7.1

I have a recent problem in Ampps Software on Windows 10, Apache stopping automatically if PHP version is 7.1 but if I change back PHP Version to 5.6 it's working fine
and here's the error log for Apache
<pre>
[Mon Oct 22 10:28:12.413768 2018] [mpm_winnt:notice] [pid 12484:tid 684] AH00455: Apache/2.4.27 (Win32) OpenSSL/1.1.0f PHP/5.6.31 configured -- resuming normal operations
[Mon Oct 22 10:28:12.413768 2018] [mpm_winnt:notice] [pid 12484:tid 684] AH00456: Apache Lounge VC15 Server built: Jul 7 2017 11:43:51
[Mon Oct 22 10:28:12.413768 2018] [core:notice] [pid 12484:tid 684] AH00094: Command line: 'apache\\bin\\httpd.exe -d D:/Ampps/apache'
[Mon Oct 22 10:28:12.417758 2018] [mpm_winnt:notice] [pid 12484:tid 684] AH00418: Parent: Created child process 5924
[Mon Oct 22 10:28:13.307885 2018] [mpm_winnt:notice] [pid 5924:tid 740] AH00354: Child: Starting 64 worker threads.
[Mon Oct 22 10:28:45.068164 2018] [mpm_winnt:notice] [pid 9816:tid 700] AH00455: Apache/2.4.27 (Win32) OpenSSL/1.1.0f PHP/7.1.8 configured -- resuming normal operations
[Mon Oct 22 10:28:45.068164 2018] [mpm_winnt:notice] [pid 9816:tid 700] AH00456: Apache Lounge VC15 Server built: Jul 7 2017 11:43:51
[Mon Oct 22 10:28:45.068164 2018] [core:notice] [pid 9816:tid 700] AH00094: Command line: 'apache\\bin\\httpd.exe -d D:/Ampps/apache'
[Mon Oct 22 10:28:45.070158 2018] [mpm_winnt:notice] [pid 9816:tid 700] AH00418: Parent: Created child process 15180
[Mon Oct 22 10:28:47.563384 2018] [mpm_winnt:crit] [pid 9816:tid 700] AH00419: master_main: create child process failed. Exiting.
</pre>
I didn't change anything or install anything new, and I reinstalled it many times and tried XAMPP it's working fine
Thank you.
Its solved by disabling Ioncube loader extension for me, Thanks for all replies
Try changing the php version used by AMPPS by following their guide here ->
http://www.ampps.com/wiki/How_to_change_php_version
In the AMPPS control panel, select options and then select change php version. The changed version should now be displayed in the control panel.
Try run httpd.exe with as administrator and it worked.
C:\Program Files (x86)\Ampps\apache\bin
I know this is 4 months old, but I have had significant problems with PHP on windows and today I got this problem fixed.
AMPPS - It won’t run PHP 7.1 with out changing the executables to run as administrator mode. Apache will terminate without an error. I believe this is because even if AMPPS is running in admin priviledges these are not granted to the php.exe when it is run. Go to the file location of php.exe, right click and click on properties, click the compatibility tab and select the check box for ‘run as administrator’. Do the same for the httpd.exe under apache->bin->httpd.exe. (Not sure if the httpd priviledge change matters but I did it and it worked.)
Run AMPPS and hopefully like me, your php/apache problems are gone.
i solved mine following steps below:
i switched PHP version to 5.6 which everything works normally,
then went to this URL:
http://localhost/ampps/index.php?
there i found some updates available
notification on top of the page below url bar on the page
if you see updates available for your php 7.0 7.1 ...
90% you will resolve this issue like mine
i tried update all available updates
then restart the ampps app
now working with PHP 7.1 great.
i hope it works for you as well.
A bit late but since i've been using Ampps for 5 years , i provide similar solutions for my common errors maybe someone find it useful .
If you changed Document Root path in "httpd.conf" , make sure that folder still exists.
If you see the logs about InnoDB files, follow the path and delete that dump files and logs.
If you got this error "master_main: create child process failed" in log files :
Change PHP version to 7.1 and Try this:
Open AMPPS panel --> PHP --> Configuration.
Search for the following line and comment it by adding ';' at the beginning of the line: zend_extension="{$path}\php-7.1\ioncube_loader_win_7.1.dll"

Unable to load dynamic library 'C:\\xampp\\php\\ext\\php_oci8_12c.dll. The specified module could not be found

I am using netbeans+xampp+Xdebug
I have set up following xdebug configuration in php.ini
[XDebug]
zend_extension = "C:\Program Files\PHP5\ext\php_xdebug-2.4.1-5.4-vc9-nts.dll"
xdebug.default_enable=1
xdebug.remote_mode=req
xdebug.idekey="netbeans-xdebug"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_autostart=0
xdebug.remote_connect_back=0
my c:\xampp\php folder contains all the required dlls
my php_oci8_12c.dll file is also placed on C:\xampp\php\ext
On restarting apache server from xampp . I am getting this error log on apache
[Sun Sep 18 01:49:21.075508 2016] [ssl:warn] [pid 9372:tid 540] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sun Sep 18 01:49:21.191401 2016] [core:warn] [pid 9372:tid 540] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
Failed loading C:\Program Files\PHP5\ext\php_xdebug-2.4.1-5.4-vc9-nts.dll
ww.example.com:443:0 server certificate does NOT include an ID which matches the server name
PHP Warning: PHP Startup: mysql: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20151012\nThese options need to match\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\xampp\\php\\ext\\php_oci8_12c.dll' - The specified module could not be found.\r\n in Unknown on line 0
[Sun Sep 18 01:49:21.360576 2016] [mpm_winnt:notice] [pid 9372:tid 540] AH00455: Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.2 configured -- resuming normal operations
[Sun Sep 18 01:49:21.360576 2016] [mpm_winnt:notice] [pid 9372:tid 540] AH00456: Apache Lounge VC14 Server built: Dec 9 2015 10:17:39
[Sun Sep 18 01:49:21.360576 2016] [core:notice] [pid 9372:tid 540] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Sun Sep 18 01:49:21.360576 2016] [mpm_winnt:notice] [pid 9372:tid 540] AH00418: Parent: Created child process 8204
[Sun Sep 18 01:49:22.191842 2016] [ssl:warn] [pid 8204:tid 504] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
Failed loading C:\Program Files\PHP5\ext\php_xdebug-2.4.1-5.4-vc9-nts.dll
ww.example.com:443:0 server certificate does NOT include an ID which matches the server name
PHP Warning: PHP Startup: mysql: Unable to initialize module\nModule compiled with module API=20131226\nPHP compiled with module API=20151012\nThese options need to match\n in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\\xampp\\php\\ext\\php_oci8_12c.dll' - The specified module could not be found.\r\n in Unknown on line 0
[Sun Sep 18 01:49:22.494042 2016] [mpm_winnt:notice] [pid 8204:tid 504] AH00354: Child: Starting 150 worker threads.
[Sun Sep 18 01:49:37.124565 2016] [ssl:warn] [pid 800:tid 420] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name
[Sun Sep 18 01:49:37.240484 2016] [core:warn] [pid 800:tid 420] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
my php_xdebug-2.4.1-5.4-vc9-nts.dll file are properly in place in
C:\Program Files\PHP\v5.6 folder
My url also attech xdeug path fine
like :
http://localhost/wordpress/?XDEBUG_SESSION_START=netbeans-xdebug
One post gave a solution to move the icu*.dll files to your Apache's bin directory .. but they are already there
what this error log is telling that I am missing ? please suggest . Regards
This might be the problem of port that apache using.
Try these steps.
If you're using Skype disable it.
Try starting xampp as Administrator
Open xampp and click on Config then click on Services & Ports Settings. Change main port 80 to 8080 and SSL port 443 to 4433. Then save and restart xampp
You can also change the apache 's default port settings by editing .config files. To do that follow the below steps
Open xampp click on Config button and select httpd.conf. Now this will open with Notepad. Now search for Listen 80 and change this to Listen 8080
After that search for ServerName localhost:80 and change it to ServerName localhost:8080
Save and exit.
Now once again click on Config and select httpd-ssl.conf. Search for Listen 443,<VirtualHost _default_:443> and ServerName www.example.com:443 change 443 to 4433 save and exit.
And finally restart your xampp.
Note: If you change default port address it's necessary to mention which port number under apache is running. For example in your browser use http://localhost:8080/project_name/index.php

XAMPP + PostgreSQL = Errors

I installed XAMPP and PostgreSQL on a Windows 7 machine.
I configured the apache httpd.conf and PHP.ini files just fine, and they work.
I uncommented the "extension php_pgsql.dll" line in the php.ini file and added \php, \php\ext, and the PostgreSQL \bin and \lib directories to my PATH variable.
C:\Program Files\PostgreSQL\9.2\lib;C:\Program Files\PostgreSQL\9.2\bin;C:\xampp\php\ext;C:\Program Files (x86)\PostgreSQL\EnterpriseDB-ApachePHP\php;C:\xampp\php;
I downloaded the php_pgsql.dll file that is compatible with windows and copied it to \php\ext
When I attempt to start the apache server, I get two errors:
"The procedure entry point _regexec#20 could not be located in the dynamic link library php5ts.dll."
and
"PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_pgsql.dll' - The specified procedure could not be found."
So, these errors are obviously not fatal, meaning the server then continues to start and completes starting.
Also, if I comment out the "extension php_pgsql.dll" line in php.ini, the error disappears.
Here are the relevant error logs from PHP and apache:
Apache:
[Thu Nov 15 10:48:11.763770 2012] [mpm_winnt:notice] [pid 5420:tid 320] AH00455: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations
[Thu Nov 15 10:48:11.763770 2012] [mpm_winnt:notice] [pid 5420:tid 320] AH00456: Server built: Aug 18 2012 12:41:37
[Thu Nov 15 10:48:11.763770 2012] [core:notice] [pid 5420:tid 320] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache'
[Thu Nov 15 10:48:11.764770 2012] [mpm_winnt:notice] [pid 5420:tid 320] AH00418: Parent: Created child process 5728
[Thu Nov 15 10:48:13.489869 2012] [ssl:warn] [pid 5728:tid 328] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Thu Nov 15 10:48:16.520042 2012] [mpm_winnt:notice] [pid 5728:tid 328] AH00354: Child: Starting 150 worker threads.
PHP:
[15-Nov-2012 15:48:11 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_pgsql.dll' - The specified procedure could not be found.
in Unknown on line 0
[15-Nov-2012 15:48:16 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_pgsql.dll' - The specified procedure could not be found.
in Unknown on line 0
I want to get this set up so I can write a PHP interface for a PostgeSQL database. This is just for fun, not in a professional context.
Try this, i had this problem with Windows 7 (64bit), i added the full path of libpq.dll from the PostgreSQL server installation path into httpd.conf, and the problem was solved.

Categories