Compile PHP

Reply

Join Date: Jun 2004
Posts: 1
Reputation: cyberwisdom is an unknown quantity at this point 
Solved Threads: 0
cyberwisdom cyberwisdom is offline Offline
Newbie Poster

Re: Compile PHP

 
0
  #11
Jun 2nd, 2004
What he is trying to do is protect his code when he distributes it as a commercial application.
You can use Turck mmCache but it appears that it may be able to be decrypted:
Since version 2.3.10, Turck MMCache contains a PHP encoder and loader. You can encode PHP scripts using encoder.php in order to distribute them without sources. Encoded files can be run on any site which runs PHP with Turck MMCache 2.3.10 or above. The sources of encoded scripts can't be restored because they are stored in a compiled form and the encoded version doesn't contain the source. Of course, some internals of the scripts can be restored with different reverse engineering tools (disassemblers, debuggers, etc), but it is not trivial.
I would suggest http://www.ioncube.com ($199) to protect your code if Zend is too expensive for you. They also have an online version which is A LOT CHEAPER. http://www.ioncube.com/online_encoder.php
It costs like $.50 per file.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 12,057
Reputation: cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light cscgal is a glorious beacon of light 
Solved Threads: 131
Administrator
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: Compile PHP

 
0
  #12
Jun 3rd, 2004
OK - Turck mmCache is software which compiles php code to lessen the server load (by as much as 500 to 1000%) when the code is interpreted at run time. There is software such as that that cyberwisdom mentioned which can be used to encode php files so that the php code itself can be distributed. Note that when you put php files on the web, and someone loads a .php page, there is absolutely no way for them to determine or get the php code that was used to build the page.
Dani the Computer Science Gal
Follow my Twitter feed! twitter.com/DaniWeb
And if you're interested in Internet marketing there is twitter.com/DaniWebAds
Reply With Quote Quick reply to this message  
Join Date: May 2004
Posts: 10
Reputation: Patrickske is an unknown quantity at this point 
Solved Threads: 0
Patrickske's Avatar
Patrickske Patrickske is offline Offline
Newbie Poster

Re: Compile PHP

 
0
  #13
Jun 10th, 2004
It is possible to compile PHP code into a standalone application. I've seen a media-database that was written in PHP, but all I had to to is run an EXE file.

I googled a bit and this is what I found:
--quote from website http://www.roadsend.com/home/index.p...ageID=compiler --
Compile Stand Alone Applications

PCC allows you to compile your PHP source into stand alone applications. No interpreter is required. Your source is compiled into an optimized machine executable program. The program is distributable with or without the source code and cannot be decompiled back into it's original PHP source. Distribution (or sale) of your compiled programs is royalty free.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 1,135
Reputation: samaru is just really nice samaru is just really nice samaru is just really nice samaru is just really nice 
Solved Threads: 5
Team Colleague
samaru's Avatar
samaru samaru is offline Offline
a.k.a inscissor

Re: Compile PHP

 
0
  #14
Jun 10th, 2004
Originally Posted by Patrickske
It is possible to compile PHP code into a standalone application. I've seen a media-database that was written in PHP, but all I had to to is run an EXE file.

I googled a bit and this is what I found:
--quote from website http://www.roadsend.com/home/index.p...ageID=compiler --
Compile Stand Alone Applications

PCC allows you to compile your PHP source into stand alone applications. No interpreter is required. Your source is compiled into an optimized machine executable program. The program is distributable with or without the source code and cannot be decompiled back into it's original PHP source. Distribution (or sale) of your compiled programs is royalty free.
Yes, I've heard of this, but it doesn't make sense to start an application from scratch using PHP. I guess if you already had plenty of code, APIs and what not that you wanted to reuse, you could utilize PHP. However, It doesn't make sense to me creating a server or a desktop application using a language that was designed for the web.
Check out my blog at http://www.shinylight.com for more stuff about web dev.
Reply With Quote Quick reply to this message  
Join Date: May 2004
Posts: 10
Reputation: Patrickske is an unknown quantity at this point 
Solved Threads: 0
Patrickske's Avatar
Patrickske Patrickske is offline Offline
Newbie Poster

Re: Compile PHP

 
0
  #15
Jun 10th, 2004
Originally Posted by inscissor
Yes, I've heard of this, but it doesn't make sense to start an application from scratch using PHP. I guess if you already had plenty of code, APIs and what not that you wanted to reuse, you could utilize PHP. However, It doesn't make sense to me creating a server or a desktop application using a language that was designed for the web.
I agree that it doesn't make that much sence, but the question was if it was possible to compile PHP.
The only reason I can think of why someone would compile/build an executable is because PHP has huge support of databases and other stuff, as well as lots of cross-platform things. But again, you could use C(++) or Java, as well as other languages to build cross-platform things.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 1,135
Reputation: samaru is just really nice samaru is just really nice samaru is just really nice samaru is just really nice 
Solved Threads: 5
Team Colleague
samaru's Avatar
samaru samaru is offline Offline
a.k.a inscissor

Re: Compile PHP

 
0
  #16
Jun 11th, 2004
Originally Posted by Patrickske
I agree that it doesn't make that much sence, but the question was if it was possible to compile PHP.
Yup, I know. I was only throwing in my two cents on how I thought it didn't make much sense. I know that almost nothing is impossible because I'm always surprised that someone, somewhere, has done it.
Check out my blog at http://www.shinylight.com for more stuff about web dev.
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 1
Reputation: IsaacSchlueter is an unknown quantity at this point 
Solved Threads: 0
IsaacSchlueter IsaacSchlueter is offline Offline
Newbie Poster

Re: Compile PHP

 
0
  #17
Jul 7th, 2004
Great reason to use PHP to develop a stand-alone exe:
You've got a bunch of php programmers, and you want to either speed up the execution of your scripts, or you just need to make an exe for some reason, and you know php, so why not use that and do it faster, rather than re-invent the wheel?

Also, php is a forgiving and easy language to develop with, especially due to the loose typing and memory management features, as well as the nearly seamless integration with raw PL output and data-layer elements. You can do more faster with less effort.
Reply With Quote Quick reply to this message  
Join Date: Feb 2002
Posts: 1,135
Reputation: samaru is just really nice samaru is just really nice samaru is just really nice samaru is just really nice 
Solved Threads: 5
Team Colleague
samaru's Avatar
samaru samaru is offline Offline
a.k.a inscissor

Re: Compile PHP

 
0
  #18
Jul 7th, 2004
In an extreme situation, where it was an emergency and I had plenty of PHP libraries in store, did not know another language as well, and performance was not an issue, then yes, I would use PHP. Otherwise I would go with C/VC++.
Check out my blog at http://www.shinylight.com for more stuff about web dev.
Reply With Quote Quick reply to this message  
Join Date: May 2005
Posts: 1
Reputation: TheTurk is an unknown quantity at this point 
Solved Threads: 0
TheTurk TheTurk is offline Offline
Newbie Poster

Re: Compile PHP

 
0
  #19
May 27th, 2005
I may answer why do I use PHP and why would I love to compile it... :p

I am analyzing lots of data from lots of anemometers all around the world. Basicaly, the data comes in, as TXT files, mostly daily in 10 minutes statistics. That means 144 files a day.

Most of the data structure are the same but of course different people has different ideas on achiving the data. But, for my analyz I need a database to keep them all in a standart format. That speeds up my analyz time. So, I need a tool, which is flexiable, to dump this data into the DB as I wish.

I had two options first time I started to do that, either a good C++ code which can be compiled and works fast, OR a scripting tool that can communicate with MySQL server easily. I was familier with PHP so I have used it. According to my tests my very first C++ code was dumping a file in 6 seconds. But, PHP was dumping in 13 seconds. What the hell all I miss is 7 seconds for each file.

PHP is easy to edit. I do not need to worry about memory allocation and I have good ready functions to edit strings. And when I show to PHP where is the MySQL server, it kills ...

And all I need is PHP and a little switch in php.ini.

So, if anyone can compile PHP on Win32 system FOR FREE, I am buying a round of beer. :cheesy:
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 1
Reputation: anima[aw] is an unknown quantity at this point 
Solved Threads: 0
anima[aw] anima[aw] is offline Offline
Newbie Poster

Re: Compile PHP

 
0
  #20
Aug 25th, 2005
Originally Posted by TheTurk
I may answer why do I use PHP and why would I love to compile it... :p

I am analyzing lots of data from lots of anemometers all around the world. Basicaly, the data comes in, as TXT files, mostly daily in 10 minutes statistics. That means 144 files a day.

Most of the data structure are the same but of course different people has different ideas on achiving the data. But, for my analyz I need a database to keep them all in a standart format. That speeds up my analyz time. So, I need a tool, which is flexiable, to dump this data into the DB as I wish.

I had two options first time I started to do that, either a good C++ code which can be compiled and works fast, OR a scripting tool that can communicate with MySQL server easily. I was familier with PHP so I have used it. According to my tests my very first C++ code was dumping a file in 6 seconds. But, PHP was dumping in 13 seconds. What the hell all I miss is 7 seconds for each file.

PHP is easy to edit. I do not need to worry about memory allocation and I have good ready functions to edit strings. And when I show to PHP where is the MySQL server, it kills ...

And all I need is PHP and a little switch in php.ini.

So, if anyone can compile PHP on Win32 system FOR FREE, I am buying a round of beer. :cheesy:
I may be able to help you on that one...I'm going to buy a RoadSend license in something like less than a month, so I will be able to compile whatever you want to compile FOR WIN32
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 64530 | Replies: 29
Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC