Topic
  • 8 replies
  • Latest Post - ‏2012-06-14T07:44:26Z by D6XV_Golaf_Altov
SystemAdmin
SystemAdmin
8523 Posts

Pinned topic SAM: A PHP interface to messaging providers

‏2006-12-18T11:46:58Z |
SAM, or Simple Asynchronous Messaging, is a project to make accessing
messaging and queueing systems simpler. We have produced an
implementation which allows PHP systems to connect with IBM WebSphere MQ
queue managers, IBM WebSphere Business Integration Brokers over
Real-Time Transport, or with the default messaging provider found in IBM
WebSphere Application Server v6.

Project SAM is currently at version 0.3.0 - this includes publish /
subscribe functionality, along with point-to-point connectivity.

More details on the project, along with links to download the package,
can be found at the website http://project-sam.awardspace.com, or on the
Pecl site at http://pecl.php.net/package/sam.

Ian.

ian.burnett@uk.ibm.com :: IBM, Hursley, UK
Updated on 2012-06-14T07:44:26Z at 2012-06-14T07:44:26Z by D6XV_Golaf_Altov
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: SAM: A PHP interface to MQ (Unable to create XMS consumer)

    ‏2010-08-13T11:31:48Z  
    Hi Ian,

    I managed to install PHPSAM and test the provided codes in my Windows machine. I was able to connect, put, get and publish messages to WebSphere MQ v7 using PHP with WebSphere MQ client v7 and XMS installed in my windows machine. But the Subscribe feature did not work, here's the error I encountered after running the phpsam subscribe script:

    Attempting subscribe -
    -->SAMConnection.Subscribe(topic://ZPERF)
    SAMConnection.Subscribe() subscribe failed (211) Unable to create XMS consumer!
    <--SAMConnection.Subscribe() rc=
    FAILED Subscribe failed with errno=211 Unable to create XMS consumer!

    Please help.

    Thanks.

    Best regards,

    Dave
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: SAM: A PHP interface to MQ (Unable to create XMS consumer)

    ‏2011-02-11T08:27:55Z  
    Hi Ian,

    I managed to install PHPSAM and test the provided codes in my Windows machine. I was able to connect, put, get and publish messages to WebSphere MQ v7 using PHP with WebSphere MQ client v7 and XMS installed in my windows machine. But the Subscribe feature did not work, here's the error I encountered after running the phpsam subscribe script:

    Attempting subscribe -
    -->SAMConnection.Subscribe(topic://ZPERF)
    SAMConnection.Subscribe() subscribe failed (211) Unable to create XMS consumer!
    <--SAMConnection.Subscribe() rc=
    FAILED Subscribe failed with errno=211 Unable to create XMS consumer!

    Please help.

    Thanks.

    Best regards,

    Dave
    hi,

    could i know what is your step on running the SAM extension?

    i've downloaded the php_sam.dll and php_sam_xms.dll. Even install the MQC 6.0, Microsoft distribution package for c++ runtime and yet my apache couldn't be start.
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: SAM: A PHP interface to MQ (Unable to create XMS consumer)

    ‏2011-02-11T14:13:00Z  
    hi,

    could i know what is your step on running the SAM extension?

    i've downloaded the php_sam.dll and php_sam_xms.dll. Even install the MQC 6.0, Microsoft distribution package for c++ runtime and yet my apache couldn't be start.
    Hi,

    Download the DLLs here: http://project-sam.awardspace.com/downloads.htm

    Be sure to install the Apache and PHP version specified in the link above. Include the DLLs in your php.ini file before restarting apache. This might be enough if PUT/GET is the only requirement, we are forced to learn JAVA/JSP to implement publish and subscribe feature of MQv7.

    Best regards,

    Vade
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: SAM: A PHP interface to MQ (Unable to create XMS consumer)

    ‏2011-02-14T11:34:39Z  
    Hi,

    Download the DLLs here: http://project-sam.awardspace.com/downloads.htm

    Be sure to install the Apache and PHP version specified in the link above. Include the DLLs in your php.ini file before restarting apache. This might be enough if PUT/GET is the only requirement, we are forced to learn JAVA/JSP to implement publish and subscribe feature of MQv7.

    Best regards,

    Vade
    I'm using the latest php 5.3 and apache 2.2.17

    Do you mean the php_sam.dll and php_sam_xms.dll are not meant to work in the above environment? If no, then how to make it work in above environment?

    Thanks.
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: SAM: A PHP interface to MQ (Unable to create XMS consumer)

    ‏2011-02-14T17:09:08Z  
    I'm using the latest php 5.3 and apache 2.2.17

    Do you mean the php_sam.dll and php_sam_xms.dll are not meant to work in the above environment? If no, then how to make it work in above environment?

    Thanks.
    "Do you mean the php_sam.dll and php_sam_xms.dll are not meant to work in the above environment?"

    Yes, the latest DLL provided in the link (http://project-sam.awardspace.com/downloads.htm) was compiled in PHP 5.1.6 and Apache 1.5. I installed the specified versions of PHP and Apache so that I can use the downloaded DLL.
    "how to make it work in above environment?"

    You have to build the SAM DLL extensions as directed in this link: http://project-sam.awardspace.com/docs/ref.sam.html

    I guess due to lack of updates and responses from the author, it's a pain to make PHP SAM work in either Windows or Linux so we have to use JMS in JAVA to satisfy our requirements.

    I hoped I helped you with the best possible way I can. Good luck!
  • SystemAdmin
    SystemAdmin
    8523 Posts

    Re: SAM: A PHP interface to MQ (Unable to create XMS consumer)

    ‏2011-02-15T03:55:55Z  
    "Do you mean the php_sam.dll and php_sam_xms.dll are not meant to work in the above environment?"

    Yes, the latest DLL provided in the link (http://project-sam.awardspace.com/downloads.htm) was compiled in PHP 5.1.6 and Apache 1.5. I installed the specified versions of PHP and Apache so that I can use the downloaded DLL.
    "how to make it work in above environment?"

    You have to build the SAM DLL extensions as directed in this link: http://project-sam.awardspace.com/docs/ref.sam.html

    I guess due to lack of updates and responses from the author, it's a pain to make PHP SAM work in either Windows or Linux so we have to use JMS in JAVA to satisfy our requirements.

    I hoped I helped you with the best possible way I can. Good luck!
    Thanks Vade. :)
  • Jonatha.Costner
    Jonatha.Costner
    1 Post

    Re: SAM: A PHP interface to messaging providers

    ‏2011-03-08T00:53:59Z  
    Vade wrote:
    Hi,

    Download the DLLs here: http://project-sam.awardspace.com/downloads.htm

    Be sure to install the Apache and PHP version specified in the link above. Include the DLLs in your php.ini file before restarting apache. This might be enough if PUT/GET is the only requirement, we are forced to learn JAVA/JSP to implement publish and subscribe feature of MQv7.


    Best regards,

    Vade


    Thanks for your analysis! It's quite useful.
  • D6XV_Golaf_Altov
    D6XV_Golaf_Altov
    1 Post

    Re: SAM: A PHP interface to messaging providers

    ‏2012-06-14T07:44:26Z  
    Hello!
    Please help me with the SAM extension.
    I have installed all of MQ components under CentOS, got and built a php-SAM extension with SAM_XMS successfully.
    I have set up default queue manager, local queue and listener. Telnet 127.0.0.1 1414 connecting successfully. dspmq shows that manager is running.
    When I connect from PHP(SAM_WMQ method) script to this manager (or with empty string), i got 208 error: Unable to create XMS connection. None shown in the error log files of MQ.
    Do you have any thoughts?