Setup react/zmq on windows - php

I am setting up Ratchet on my system following instructions from official site
I have performed the following:
Downloaded and installed zeromq from the official site
Followed instructions of http://zeromq.org/bindings:php for PHP bindings and copied the dll files(as the mentioned url is down, I got the dll files from [http://178.79.157.189/~mikko/win32/php-zmq-win32.zip])
3.Made changes in php.ini file.
But when I restart the server, I get the error:
PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/5.4.3/ext/php_zmq.dll' - %1 is not a valid Win32 application.

Check out the official zeromq PHP binding. I know from experience that it will work.
Download the extension from the PHP pecl site. Make sure that you download the right ext for your PHP distro.

Related

solr php configuration moodle , unable to detect php_solr dll in ext folder windows server

Could you let me know the steps you did for installing solr on windows server 2012? I'm struggling to install it. I appreciate your help.
Below are the steps I did:
I have followed all the instructions but still couldn't install php solr on my windows server 2012.
I have installed APACHE solr and started it through command prompt and it started at port 8983 on my localhost, but not sure how to integrate with my moodle.
For PHPsolr are there any specific instructions to install, except to drag the specific compiled dll to the ext folder, or something else? I have checked the PHP info page and could not see the solr enabled. Please let me know. I'm stuck here.
Please consider as mine is a WINDOWS server 2012 IIS7
When I looked at the php error log it says
PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\v5.6\ext\php_Solr.dll' - %1 is not a valid Win32 application.
When I tried to install from php_solr-2.4.0-5.6-ts-vc11-x86
PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\v5.6\ext\php_solr.dll' - The specified module could not be found.
When I go to moodle manage global search -- it says
"No solr configuration found"

install ext-zmq for ratchet push integration

I'm trying to install ZeroMQ for the push integration on Ratchet, I have successfully integrated Ratchet unto my Laravel 5 app. I downloaded and install the zeroMQ software and in the PHP binding instruction page, I followed the set up instruction for windows section since I'm on windows 10
Download the latest snapshot from http://snapshot.zero.mq/
Copy libzmq.dll into your php directory (e.g.
C:\wamp\bin\php\php5.3.8)
Copy the appropriate version of php_zmq.dll to your php extension
directory (e.g. C:\wamp\bin\php\php5.3.8\ext)
Add the following line to your php.ini:
extension=php_zmq.dll
since http://snapshot.zero.mq/ is a broken link so I look around the internet for other source and I found this link and downloaded the php_zmq-1.1.3-7.0-ts-vc14-x64.zip one. I copy the libzmq.dll to C:\wamp\bin\php\php5.5.12 as instructed as well as the php_zmq.dll to C:\wamp\bin\php\php5.5.12\ext and then I add
extension=php_zmq.dll
to my php ini and restarted my wamp server but it throws me this warning,
PHP Startup: Unable to load dynamic library
'c/wamp/bin/php/php5.5.12/ext/php_zmq.dll' - The specified module
could not be found
Any ideas, help please?
I downloaded the correct file from here https://pecl.php.net/package/zmq that match unto my php version and then restart my computer and now its working.
Get the version from here:
https://pecl.php.net/package/zmq/1.1.2/windows
In my case, the correct version that works was 1.1.2

Solr for PHP gives "GLIBC_2.14 not found" error on Heroku

Heroku does not support PHP officially, so I needed to add PHP extensions manually. I have created a php.ini file on my main directory:
extension_dir = "/app/www/ext/"
extension=mongo.so
extension=oauth.so
extension=solr.so
All the extension files are on the ext folder which is on the main directory also. Mongo and OAuth extensions are working perfectly but when Solr added, apache is giving me the error below:
PHP Warning: PHP Startup: Unable to load dynamic library '/app/www/ext/solr.so' - /lib/libc.so.6: version `GLIBC_2.14' not found (required by /app/www/ext/solr.so) in Unknown on line 0
...and Solr extension is not working, obviously. I'm using Websolr add-on on Heroku and unfortunately neither Heroku nor Websolr is willing to help me about the issue. Heroku says "PHP is not officially supported," and Websolr says "ask Heroku."
So, any help will be appreciated.
It seems that there are no direct solutions but I have found a workaround. Instead of using solr.so extension, one can use open-source solr-php-client from here. It does note require a compiler, so no apache errors on Heroku.

Connect to RabbitMQ from PHP - Windows

I have RabbitMQ running on one of our servers and am trying to connect to it via PHP. I am developing on a Windows7 machine and my first line of code reads:
$cnn = new AMQPConnection();
It gives me the error:
Fatal error: Class 'AMQPConnection' not found in
I know that it is something that I need to install but what is it ? I am new to PHP so a little help would be nice.
Ps: I can connect to the RMQ server via the RabbitMQ admin web interface.
Thank you
Jack
Installation guide for php_amqp 1.4.0 (Stable version):
Download proper package for your php version from https://pecl.php.net/package/amqp/1.4.0/windows
Unpack php_amqp.dll to X:/php/ext/ directory
Unpack rabbitmq.1.dll to X:/Windows/system (not system32) directory
Modify php.ini file and add "extension=php_amqp.dll" line at the end of extensions list
Verify module installation by executing command "X:/php/php.exe -m" in command line
Restart webserver
I am developing on a Windows7 machine
You may be out of luck using that specific code. That class is from the PECL aqmp extension. Inside the installation instructions, it states:
Note to Windows users: This extension does not currently support Windows since the librabbitmq library does not yet support Windows.
You will want to use another library to speak to your message queue instead.
The rabbitmq-c library supports windows now, and the php_amqp pecl extension builds on windows as well. The documentation just hasn't been updated, nor are there any official binary builds in the wild. However, I managed to get them to build and have some 32 bit dll's available for download here:
http://www.nathanjohnson.info/?p=77
# AMQP installation php.net:
Note to Windows users: This extension does not currently support Windows since the librabbitmq library does not yet support Windows.
But here at RabbitMQ website is a windows installer...
Apparently this php.net page is outdated
To install do like this:
Download the correct package for your php from this official PECL amqp 1.4.0 page
unzip
add amqp.dll to your php ext folder
add rabbitmq.1.dll to your windows system 32 folder.
This according to the post on the blog I found here i think it is from the same #NathanJohnson who posted also here.
How I got it working:
My System Config: Win 7 Pro, (x64) XAMPP running PHP 5.6(x86)
Follow instruction from here to install RabbitMQ:
https://www.rabbitmq.com/install-windows.html
Now download compatible extension from here
https://pecl.php.net/package/amqp/1.4.0/windows
in my case it is "5.6 Thread Safe (TS) x86"
Now from zip file (php_amqp-1.4.0-5.6-ts-vc11-x86.zip) downloaded copy dll "php_amqp.dll" to your php extension folder in my case it is "xampp/php/ext" and copy dll "rabbitmq.1.dll" to "Windows\system" directory.
now register your php_amqp dll in php.ini file as
"extension=php_amqp.dll"
now restart apache.
Done. Now you should not get AMQPConnection not found exception.

php_mcrypt extension for windows server 2008 R2

I found lots of articles about this problem, however none of them helped me.
Here is a I list of what I 've already tried:
uncomment the semicolon on php.ini
add the dependence file (libmcrypt.dll) on php folder, windows and
windows/system32
I 've restarted the IIS Server after each attempt
I cannot use this method, it was installed with a zip file.
On IIS Manager the extension is shown as enabled but checking the php error log I found this message multiple times:
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\v5.3\ext\php_mcrypt.dll' - %1 is not a valid Win32 application. in Unknown on line 0
Here is a the screenshot of phpinfo()
I have Windows Server 2008 R2 64bit with IIS 7.5 and PHP 5.3.10. Maybe the file (php_mcrytp.dll) is not the good one, where can I download it? On php site I cannot find the php_mcrytp.dll file under ext folder.
Thank you
If you downloaded PHP for Windows from php.net and are running the FastCGI version of PHP (as you should with PHP 5.3.x and IIS), mcrypt library is already compiled statically in the PHP engine. You don't need to install any extra DLL.
If you see the mcrypt section in phpinfo's output then it means mcrypt is already enabled (otherwise the mcrypt section would be missing).
And that's also the reason there is no mcrypt DLL.

Categories