Re: [PHP-GTK] Re: i found a php compiler

[email protected] ("James Moore") Thu, 9 Aug 2001 11:58:44 +0100
Newsgroups php.gtk
Message-ID <002f01c120c2$4c1a2290$638601d5@hound>
Plots program works well.. dont get me wrong but the correct way of doing
this would be to do the following:

Write a PHP runtime libary in a dll which the exe loads, this runtime
contains the SAPI to the Zend_TS.dll libary which it then loads and
exectures.
On the compilation side you need to compile the the textual code into Zend
Op Code and then have this as part of the exe that loads the PHP Runtime,
the PHP Runtime needs to take this op code and run it through the Zend
Execute API (the API to do this is inplace but I do not know if the opcode
is Memory Address Independent.. IE if you can just copy the compiled opcode
and it will still work if things move about in memory, perhaps Andrei
knows..). This way the original code would no longer be visable by chucking
the created exe into a text editor as it is with Plot's program.

It shouldnt take too much work but its just a question of sitting down and
writing the dll's and the compiler to do it and sorting out the Zend stuff,
which is somthing I havnt looked at yet but if you look at any opensource
encoder/compiler (If there are any, I think ZIMT were going to make one but
ZIMT seem to have been converted to the Zend Way as far as I can tell..).
they should have code that shows how to do it.

- James

----- Original Message -----
From: "Geoff A. Virgo" <[email protected]>
To: <[email protected]>
Sent: Thursday, August 09, 2001 11:33 AM
Subject: Re: [PHP-GTK] Re: i found a php compiler


> At 02:42 AM  Thursday, 08/09/2001, you wrote:
> >It seems to work for console apps, great!!
>
> Yeppers, the PHPCompiler proggie's been around since mid-April.  Of course
> it isn't really a compiler, but it will create a exe for you by tacking
> your code onto the end of a copy of php.exe.  However, for whatever reason
> it doesn't seem to be able to bond more than about 8 - 10 KB of code to
the
> exe.  If your script runs long than that you'll need to cut it's size down
> by require()'ing or include()'ing some of your code.  Bit annoying, but
> Plot seems to have disappeared:)
>
>
>
> >In article <[email protected]>, [email protected]
> >says...
> > > for those looking for a php compiler that makes your php-gtk apps into
> > .exe
> > > files.
> > > somebody just pointed me to a chineze? site.
> > > the readme is in english though.
> > >
> > > http://phpuser.com/download/files/dev-tool/phpcompiler/
> > >
> > > havent tried it yet but i will tonight.
> > >
> > > hope this works!
> > >
> > > gilles
> > >
> >
> >--
> >PHP GTK Mailing List (http://www.php.net/)
> >To unsubscribe, e-mail: [email protected]
> >For additional commands, e-mail: [email protected]
> >To contact the list administrators, e-mail: [email protected]
>
>
>
> Cheers,
>
> Geoff A. Virgo
> http://www.mithril.ca/
> -------------------------------------------------------------------------
> I'm not lazy..... at the cellular level I'm really quite busy.
>
>
> --
> PHP GTK Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> To contact the list administrators, e-mail: [email protected]