Sign in to follow this  

[web] Compiled Scripts

This topic is 4589 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can someone inform me about Compiled Webscripts. I'm seeking a way to hide PHP source code from the server by using PHP compiled into binary. Is this possible? What other solutions are (not necessarily PHP) there?

Share this post


Link to post
Share on other sites
anything that can be run on most unix systems if you use apache.

That means anything like perl, python, binaries (C++) .etc as long as it is in the cgi-bin directory and you have the interpreter.

Don't forget to output "content-type:text/html\n\n" before your html though.



#!/bin/sh

echo -en "content-type:text/html\n\n";

echo -en "<p>Hello, World</p>"




http://localhost/cgi-bin/hello

Share this post


Link to post
Share on other sites
There are a couple popular methods using php. One is Zend the other is Ion Cube. I've never used either on my own code but I've used Zend applications before. I can't speak for speed increases but if you're just looking to hide code either should work fine.

Share this post


Link to post
Share on other sites
Hmm.. I was more of hoping to find something like this:

<?php
include_compiled("functions.phpc");

functions_cool();
?>



Perhaps there is a scripting language that can be bound with PHP?

Share this post


Link to post
Share on other sites
Quote:
Original post by Pipo DeClown
Hmm.. I was more of hoping to find something like this:*** Source Snippet Removed ***

Perhaps there is a scripting language that can be bound with PHP?


With Zend you have to have the Zend optimizer installed on the server then the compiled files act just like regular php file and can be included like normal. The problem however is the price! If you want to use it directly from php like a normal function call you could look into writing your own php extension (overkill) or look for some more compiler options. I haven't found anything free yet but you might want to check out Source Guardian which is considerably cheaper then Zend Encoder.

Share this post


Link to post
Share on other sites
Hiding PHP's scource code is simply not possible without some kind of application installed that sits between the script and PHP itself... such as the Zend Optimiser or various other script cachers. I've heared good things about MM Chache though.

Share this post


Link to post
Share on other sites
Quote:
Original post by Pipo DeClown
Thanks for all the resources.. But there isn't much I can do with the servers my clients are on.


Sounds like the only option with PHP then would be the Zend encoder which most servers have installed by default. Worth a look. Too bad it's so expensive.

Share this post


Link to post
Share on other sites
Yeah, exactly. I'm not using any licenses or something like that. We simply create a website and transfer it to the clients server (configuring databases and stuff also). Since we do not have any licenses the client can simply copy all the scripts.
Even my 'boss' uses my scripts on some other clients, which really bothers me. So I told him, and we agreed that the stuff is my property. Anyway, the problem are the clients.

Share this post


Link to post
Share on other sites
I'd recommend using e-accelerator. Turck was good, but development has ceased (it was forked into eaccel). You can compile a script to php bytecode, save it to disk, and then execute the code by loading from said disk.

Personally, though, I can't see any practical reason for doing this. License the software like everyone else, and go about your business. If someone violates the license, you sue them. It really is that simple.

Share this post


Link to post
Share on other sites

This topic is 4589 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this