Solved

Compiling php

Posted on 2013-06-05
5
273 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 57

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 17

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 7

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 110

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to dynamically set the form action using jQuery.
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…

691 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