PHP Toolkit for IBM iConnect your PHP applications to resources on your IBM i (evolved from AS/400, iSeries) using the open source (free!) PHP Toolkit for IBM i.

Co-developed by Alan Seiden and maintained by the IBM i community, the toolkit is also known as the XML Toolkit because the PHP front end and the XMLSERVICE RPG back end communicate via XML.

Start Here with Alan’s Presentation Slides

Get the most complete information about the PHP Toolkit by reading Alan’s presentation Bring RPG/COBOL Business Logic to the Web with the PHP Toolkit (PDF format). Note: these slides date from about 2017 and don’t reflect RPM-based PHP paths and other changes.

Other Toolkit Resources

Install the PHP Toolkit: a myriad of ways

  • Download from https://github.com/zendtech/IbmiToolkit
  • Install via Composer (“composer require zendtech/ibmitoolkit”)
  • The toolkit is also installed with Zend Server
  • Note: XMLSERVICE is now shipped by IBM in the QXMLSERV library

11 replies
  1. Brian Zeuske
    Brian Zeuske says:

    Hello Allan,
    I’ve been working on a project converting net.data to php. For the most part, I’ve been having pretty good success. But every now and then I run into a snag. One such snag is with tool kit. In net.data, you can call a CL program directly from a net.data document that can create a workfile in qtemp that you can later run sql over in the same net.data document. I’m not able to do that in tool kit because it runs in a different job. So instead, I’m loading a multidimensional array using a prototype program. It works if I call the prototype program directly. But if I call a CL program in-between for the purpose of running an opnqry statement, the process errors. It seems to be working until it gets to the IPLUGR512K procedure.

    Any thoughts?

    Thank you,

    Brian Zeuske

    Reply
    • Alan Seiden
      Alan Seiden says:

      Hi, Brian, if you use stateless mode then the CL program would run in the same job as SQL, if called within the same PHP request, thus QTEMP should be fine. I get the impression that there is more to your question. It seems a little complicated for a comment on this page. Maybe you should email me with more details. — Alan

      Reply
  2. Alessandro Scolavino
    Alessandro Scolavino says:

    I tried xml toolkit but it seems it doesn’t support large query, i tried to fetch 10000 records and it generate an error on AS400, is there some limitation that you are aware of?

    Reply
  3. Avrohom Notik
    Avrohom Notik says:

    If You have problems with passing parameters, just write to database file, and the target program will read it. Just as simple as that.

    Reply
  4. Praveen
    Praveen says:

    I am trying to connect ibm iseries using zend framework 2 through localhost. I have configured database details in global.php now need to call stored procedure using database object. I have gone through the questions answered by you on stackoverflow but I am unable to do anything and I have blocked.
    Can please help me in this,

    Reply
  5. Alan Seiden
    Alan Seiden says:

    Hi, Peter,

    I’m working on a toolkit update to support PCML with PgmCall. Do you use PCML heavily?

    PCML is currently supported only by the compatibility wrapper [CW], but because new projects should use the new toolkit API (PgmCall, etc.) instead of CW, I intend to add PCML support for PgmCall.

    Tell me more about your requirements if you would like, perhaps through my contact page.

    Best regards,
    Alan

    Reply
  6. Klaus-Peter Luttkus
    Klaus-Peter Luttkus says:

    Hello Alan, last year I attended one of your presentations on PHP on IBM i. Very interesting. I now have a problem with the API Toolkit, and so farI didn’t find any answers. Is there a way to declare parameters für the PgmCall method by way of using PCML? A short answer would be appreciated.

    Regards from Germany
    Peter

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

11 replies
  1. Brian Zeuske
    Brian Zeuske says:

    Hello Allan,
    I’ve been working on a project converting net.data to php. For the most part, I’ve been having pretty good success. But every now and then I run into a snag. One such snag is with tool kit. In net.data, you can call a CL program directly from a net.data document that can create a workfile in qtemp that you can later run sql over in the same net.data document. I’m not able to do that in tool kit because it runs in a different job. So instead, I’m loading a multidimensional array using a prototype program. It works if I call the prototype program directly. But if I call a CL program in-between for the purpose of running an opnqry statement, the process errors. It seems to be working until it gets to the IPLUGR512K procedure.

    Any thoughts?

    Thank you,

    Brian Zeuske

    Reply
    • Alan Seiden
      Alan Seiden says:

      Hi, Brian, if you use stateless mode then the CL program would run in the same job as SQL, if called within the same PHP request, thus QTEMP should be fine. I get the impression that there is more to your question. It seems a little complicated for a comment on this page. Maybe you should email me with more details. — Alan

      Reply
  2. Alessandro Scolavino
    Alessandro Scolavino says:

    I tried xml toolkit but it seems it doesn’t support large query, i tried to fetch 10000 records and it generate an error on AS400, is there some limitation that you are aware of?

    Reply
  3. Avrohom Notik
    Avrohom Notik says:

    If You have problems with passing parameters, just write to database file, and the target program will read it. Just as simple as that.

    Reply
  4. Praveen
    Praveen says:

    I am trying to connect ibm iseries using zend framework 2 through localhost. I have configured database details in global.php now need to call stored procedure using database object. I have gone through the questions answered by you on stackoverflow but I am unable to do anything and I have blocked.
    Can please help me in this,

    Reply
  5. Alan Seiden
    Alan Seiden says:

    Hi, Peter,

    I’m working on a toolkit update to support PCML with PgmCall. Do you use PCML heavily?

    PCML is currently supported only by the compatibility wrapper [CW], but because new projects should use the new toolkit API (PgmCall, etc.) instead of CW, I intend to add PCML support for PgmCall.

    Tell me more about your requirements if you would like, perhaps through my contact page.

    Best regards,
    Alan

    Reply
  6. Klaus-Peter Luttkus
    Klaus-Peter Luttkus says:

    Hello Alan, last year I attended one of your presentations on PHP on IBM i. Very interesting. I now have a problem with the API Toolkit, and so farI didn’t find any answers. Is there a way to declare parameters für the PgmCall method by way of using PCML? A short answer would be appreciated.

    Regards from Germany
    Peter

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.