Stand alone PHP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tom Jones

    Stand alone PHP

    I want to use PHP as a stand alone scripting language. By that I mean
    without a web server present and without any HTML in the code. I have done
    this in a few tests on a Win 2000 platform and, with just PHP.exe and a DLL
    and the ADOdb stuff in a lone directory, I have successfully run some
    scripts to talk to a database. All fine and good.



    But the real goal is to make this into a tiny runtime environment that I can
    deliver to any machine ... Linux or Windows ... and run some performance
    tools on the local database engines ... all without any installations on
    those host machines (i.e. just copy the files ... run the analysis scripts
    and copy the results for post analysis . without changing the host system).



    Is there a discussion anywhere about:



    Keeping the runtime size to a minimum?

    Cross platform got-ya's ? (I read a couple of messages about this, just
    now in this group)



    If this is a topic that has been covered to death .. then I apologize and
    will continue my search of back news articles.



    However, if anyone else is interested in this or would care to shed some
    light on these issues for me, please contact me either here or directly.



    Thanks to all,



    Tom




  • Keith Bowes

    #2
    Re: Stand alone PHP

    Tom Jones wrote:[color=blue]
    > I want to use PHP as a stand alone scripting language. By that I mean
    > without a web server present and without any HTML in the code. I have done
    > this in a few tests on a Win 2000 platform and, with just PHP.exe and a DLL
    > and the ADOdb stuff in a lone directory, I have successfully run some
    > scripts to talk to a database. All fine and good.
    >
    >
    >
    > But the real goal is to make this into a tiny runtime environment that I can
    > deliver to any machine ... Linux or Windows ... and run some performance
    > tools on the local database engines ... all without any installations on
    > those host machines (i.e. just copy the files ... run the analysis scripts
    > and copy the results for post analysis . without changing the host system).
    >
    >
    >
    > Is there a discussion anywhere about:
    >
    >
    >
    > Keeping the runtime size to a minimum?
    >
    > Cross platform got-ya's ? (I read a couple of messages about this, just
    > now in this group)
    >
    >
    >
    > If this is a topic that has been covered to death .. then I apologize and
    > will continue my search of back news articles.
    >
    >
    >
    > However, if anyone else is interested in this or would care to shed some
    > light on these issues for me, please contact me either here or directly.
    >[/color]

    You should be able to write basic scripts that run everywhere. Just
    don't use Windows-only stuff (like COM) or Unix-only stuff (like POSIX).
    But, of course, the interpreter will have to be installed too. On
    Windows, this is easy; just include php.exe and the needed .dll files in
    your set-up program, and create a batch file to execute the php script.
    There used to be a program to generate .exe files from PHP source, but
    it doesn't work with newer versions of PHP.

    On Linux, it should be even easier, being that modern Linux systems ship
    with an interpreter for PHP, as well as those for Perl, Python, bash,
    awk, and possibly others.


    Comment

    Working...