Solved

Compiling php

Posted on 2013-06-05
5
268 Views
Last Modified: 2013-06-12
Hi,

Is it possible to compile php code. I have a single php file which I  want to compile before uploading to the web server.

ayha
0
Comment
Question by:ayha1999
5 Comments
 
LVL 52

Accepted Solution

by:
Julian Hansen earned 50 total points
ID: 39224778
0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 50 total points
ID: 39224781
The answers are yes and no.  You can compile PHP to run on the command line of your own computer.  But compiled PHP code won't execute on a standard web server that supports PHP.  If you are trying to 'hide' your code, there are programs like IonCube that encrypt and decrypt your code to execute it.  But they are not free and must be installed as a service on the web server.  http://www.ioncube.com/  Zend Guard is another.  http://www.zend.com/en/products/guard/
0
 
LVL 16

Assisted Solution

by:Chris Harte
Chris Harte earned 50 total points
ID: 39225033
No. Php is an interpreted script not a compiled language. It needs a server to run.
0
 
LVL 6

Assisted Solution

by:Robert Saylor
Robert Saylor earned 50 total points
ID: 39225265
Is this what you are trying to do?

http://www.exeoutput.com/

I use to use something similar for Perl on stand-a-lone windows computers to gather log files and parse data.
0
 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 50 total points
ID: 39225564
If your application is as big as Facebook, you might want to have something like HipHop.  PHP is intended to be an interpreted language, and not a compiled language. It's better to ride the horse in the direction he is going!

But that said, if you can explain why you would want compiled code instead of interpreted code, maybe we can offer some better suggestions.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now