Important: Please read the Qt Code of Conduct -

Performing cross-platform calls to php from Qt5

  • I'm developing a Qt desktop GUI.

    I need to be able to run:

    php myWonderfulScript.php parameter from the Qt app.

    php is available on the command line on my development computer, however it's unlikely to be available on the user's computer. I also need php5-curl installed...

    Can I reliably distribute php .so/.a/.dll files with my Qt desktop application so it will run on Mac/Windows/Linux? (I know there are big licensing issues that arise in this situation and I will be sure to not steal anyones work)

    I'm using Qt Creator 3.1.2 (based on Qt 5.3.1)

    Many thanks for your help,

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Out of curiosity what does your php script do ? I might be simpler to translate it in C++ to avoid have to install PHP on each target.

  • Hi,

    Thanks for your reply.

    I guess that may be an option, but the script is 3,000 lines long.

    I would prefer to continue to maintain the PHP as-is and just put a Qt wapper around it.

    Is including PHP possilbe in a reliable way?

  • Lifetime Qt Champion

Log in to reply