我在上一篇博客在centos下处理PHP+WebSphere客户端中提到了一个英文网站:http://blog.phpdeveloper.org/?p=140,我也是参考它才完成了最终的配置,为此我也写了中文的说明,但感觉文笔不行,所以我还是贴上原文吧: During a recent project at work I had
我在上一篇博客在centos下处理PHP+WebSphere客户端中提到了一个英文网站:http://blog.phpdeveloper.org/?p=140,我也是参考它才完成了最终的配置,为此我也写了中文的说明,但感觉文笔不行,所以我还是贴上原文吧:
During a recent project at work I had to get PHP linked with IBM’s WebSPhere MQ software we have running on another internal server. Our goal was to use our existing web service to take the requests from external vendors and push their XML data back into the queue inside our firewall. Thankfully there’s an extension in PECL that does just that.
Here’s the basic steps I took – hopefully it’ll be useful to someone else out there in the same spot I was. This all assumes you’re working on a web server that doesn’t have an MQ server installed already:
Now for the fun part – if everything’s working and the extension shows up in your phpinfo() as active, give this script a shot and see if you can connect to your MQ server:
1 |
$mq_host_ip = '127.0.0.1' ;
|
2 |
$queue_name = 'HOST.REMOTE.Q' ;
|
3 |
$mq_server = 'WBRK_QM_U49' ;
|
4 |
$mqcno = array (
|
5 |
'Version' => MQSERIES_MQCNO_VERSION_2,
|
6 |
'Options' => MQSERIES_MQCNO_STANDARD_BINDING,
|
7 |
'MQCD' => array (
|
8 |
'ChannelName' => 'CLIENT.CHANNEL' ,
|
9 |
'ConnectionName' => $mq_host_ip
|